.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Rename a column in multiple Tables using sp_rename

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :ASP.Net
Hi,Any work around for the below issue?Originally "LoadDate" column (see below scripts) was there both in tables DIM_Table_1 and DIM_Table_2According to change in requirement, LoadDate in both the tables to be chnged to LOAD_DATE. It has to be done through script-----------------EXEC sp_rename 'dbo.DIM_Table_1.LoadDate',     'LOAD_DATE', 'COLUMN'         -- Successfully executedEXEC sp_rename 'dbo.DIM_Table_2.LoadDate',     'LOAD_DATE', 'COLUMN'         -- Error: See below Error: The new name 'LOAD_DATE' is already in use as a COLUMN name and would cause a duplicate that is not permitted.-----------------

View Complete Post

More Related Resource Links

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

merging multiple tables in a single dataset to single table


 i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset 

like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....

can some1 help me please.....

Configure BDC column to have multiple values selected


How do I Configure BDC column to have multiple values selected and make multiple entities data available in the same column.  Currently it supports only single value for an item.  This requirement is crucial need some solution immediately.

BDC Column with Ability to Select Multiple Values


Use Case:

We are creating a storage location for technical product articles. These will be SharePoint publishing pages. Each page will have metadata assigned to it to make it searchable by properties. The possible values for one of the columns (Part Number) could potentially be sourced by our ERP system. I'd like to do this to eliminate the possibility of free-text entry errors, but there are probably over 10,000 parts so a drop-down list isn't feasible.


Ideal Situation:

The end user enters the part number and clicks a button to verify it against a BDC entry from our ERP system. If they weren't sure on the part number they needed, they could do a lookup from that metadata entry screen. They'd need to have the option to add multiple part numbers as one technical product article could reference multiple part numbers.



Is BDC an option for all of this or am I looking at a custom metadata solution? I thought I heard along the way that BDC only supported one value choice, but I couldn't find a verification for that in the forums.



How to get character count in 'Multiple Text 'column using Calculated Column?


Hi All,

I have a multiple text box in a list

I want

  • A column which lists number of characters in multiple list column example 188, 199 etc
  • Multiple character column must not have more than 200 chars
Is this possible?

Appreciate all the help!


SUM col from multiple tables

I am trying to SUM a column from each of 3 tables, where an ID field is the same in each table and the date range is the same also It would look something like this: table1      table2      table3      table4  amt         amt         amt         t4ID  ID           ID           ID  date        date        date SELECT SUM(t1.amt),SUM(t2.amt),SUM(t3.amt) WHERE (each table).ID = @t4ID AND (each table).date BETWEEN @date1 AND @date2 the t4ID, date1 and date2 will be chosen by the user from controls and supplied to the statement via a parameter array. I have tried many variations ( with more to go) to send 1 @t4ID parameter, for example, and use that in all 3 tables (same with the dates). Any help to nudge me in the right direction would be appreciated. Thanks

Sharepoint: In Calculated Column, Code with multiple "IF" condition does not work.

Implemantation:  Calculate expected resolve date exclude "Saturday" and "Sunday"  based on Priority and Severity.Columns are:1. Priority:2. Severity:3. Raised on: Date record createdCode: Below is the code which contains multiple "If" conditions. For quick undersatnding, i separated major If condition. Below code does not work and sharepoint gives me Sytax error message. =IF(OR(Priority="Critical",Severity="Critical"),IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+3,[Raised on]+1),     IF(OR(Priority="HIGH",Severity="HIGH"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+4, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+4,[Raised on]+2)) ,   IF(OR(Priority="MEDIUM",Severity="MEDIUM"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+3),"dddd")="Saturday",[Raised on]+5,[Raised on]+3)) ) ,   IF(OR(Priority="LOW",Severity="LOW"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+6, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+6, IF(TEXT

split a column into multiple columns

Hi i have a column with the following values from my source FILENAME ComplianceStatus_ER_06022010.xml ComplianceStatus_AZER_07052010.xml ComplianceStatus_GEL_06022010.xml ComplianceStatus_AFF_05022010.xml ComplianceStatus_Good_2010.xml   I want to split the date into different columns as follows using ssis   FILENAME                            CLIENT      DATE ComplianceStatus_ER_06022010.xml    ER          06022010 ComplianceStatus_AZER_07052010.xml  AZER        07052010 ComplianceStatus_GEL_06022010.xml   GEL         06022010 ComplianceStatus_AFF_05022010.xml   AFF         05022010 ComplianceStatus_Good_2010.xml      Good        2010  

WPF Datagrid with multiple row selection/checkbox column template

Hello, I am using the WPF Toolkit Datagrid with a checkbox defined in a template column/template cell. We are using the checkbox template so that selecting the checkbox will also highlight the row in the datagrid. Here is the template definition: <dg:DataGridTemplateColumn MinWidth="50" Width="Auto" Header="" CanUserReorder="False"> <dg:DataGridTemplateColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding Path=IsCheckedm, Mode=TwoWay}" /> </DataTemplate> </dg:DataGridTemplateColumn.CellTemplate> </dg:DataGridTemplateColumn> We are allowing multiple row selection in the datagrid and using MVVM (using MVVM Light). We would like to keep a list in the View Model of selected rows as they are selected/unselected. Any suggestions on how we can leverage MVVM to keep the list of selected/unselected elements current. Many Thanks --Sam

MOSS 2007: list column that lookup to multiple documents stored in doc library

Hi All, I'm trying to understand how to customise MOSS to achieve the following: I need to lookup from a list to multiple documents stored in a documetn library. Example: - List item 1 --------> Lookup to Doc 2                   --------> Lookup to Doc 5 - List item 2 --------> Lookup to Doc 3                   --------> Lookup to Doc 5                   --------> Lookup to Doc 8 - List item 3 --------> Lookup to Doc 1 How can I achieve this? is it possible that in the lookup I have a "search" option? Thanks all Vit

Need to link multiple External Content List items to a single document metadata column

I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint. Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata. Any ideas for how I can make this work?

Select column from all tables in database

I want to retrieve the name and phone columns from all the tables in my database not in systables....   Ok this works but i dont want to get it from just the test table I want to get it from all the tables that I create "USE mrpoteat SELECT name, phone FROM mrpoteat.dbo.test where name = name and phone = phone"

Multiple indexes using same column

I am writing an extensive query and have multiple non-clustered indexs on a table.  I have one index for a single column [Column1] and another index for [Column2], [Column1].  I am using different querys where I sometimes just use [Column1] and other times use many columns including both [Column1], and [Column2]. My question is: If you have multiple indexes that contain the same column will they ever cause a conflict?


Hi Friends, I am creating an application for a jewellery shop (MINOR PROJECT) in VB.Net but my problem is that I dont know how to insert multiple records for same bill number. consider the following condition Bill Number Customer Name   ............................................... Customer Address ................................................ S.No                 Item name                Rate    Qty                            Total 1                      abc                            5        5                                 25 2                 &nb

conditional update a column base on multiple result

Hi, I have a requirement that to conditional update a column base on the table result within a single update statement.     declare @TableStageStatus table ([OldTable] [varchar](100) NULL, [OldKey] [varchar](100) NULL, [StatusCode] [varchar](10) NULL) declare @Table table ([Key] [varchar](100) NULL, [row_stus_cd] [varchar](10) NULL) INSERT INTO @TableStageStatus ([OldTable],[OldKey],[StatusCode]) VALUES ('a' ,'1','I') INSERT INTO @TableStageStatus ([OldTable],[OldKey],[StatusCode]) VALUES ('a' ,'1','I') INSERT INTO @TableStageStatus ([OldTable],[OldKey],[StatusCode]) VALUES ('a' ,'1','E') INSERT INTO @TableStageStatus ([OldTable],[OldKey],[StatusCode]) VALUES ('a' ,'1','I') INSERT INTO @TableStageStatus ([OldTable],[OldKey],[StatusCode]) VALUES ('a' ,'2','E') INSERT INTO @TableStageStatus ([OldTable],[OldKey],[StatusCode]) VALUES ('a' ,'1','E') INSERT INTO @Table ([Key],[row_stus_cd]) VALUES ('1',null) INSERT INTO @Table ([Key],[row_stus_cd]) VALUES ('2',null) UPDATE A SET A.row_stus_cd = case when row_stus_cd is null then B.StatusCode when B.StatusCode='E' then 'E' else B.StatusCode end FROM @Table A INNER JOIN @TableStageStatus B ON A.[Key]=B.OldKey and B.OldTable='a' WHERE B.StatusCode in ('E','I') select * from @Tab

Updating multiple tables simultaneously

Hi all, Was wondering if someone can help me out with this multi update problem I have a webform that populates a single table but due to certain dropdown data conditions it could also potentially populate 3 other tables The tables information populates a gridview with amounts from accounts etc.. e.g. Table 1 Site          DataType            account           update 34                  SS                       12.50              N Table 2 Site             account 34                    12.50   Say the above entry has the updated column changed to Y via the webform the amount 12.50 should disappear from the gridview. I was a bit shortsighted and added the additional tables afterward. The information on the gridview pulls from the additional tables and since the first table and the additio

extracting from multiple tables in an odbc call/ssis

Hi,   I have an odbc for DBISAM, and can use it to import into sql server, but only one table at a time.  (when it get's to the choose table screen, it will only let me create a single SQL query.   does anyone know if I can extract from multiple tables using this?   If not - what would I need to change in the DTSX file so that my query goes from "select * from tablea" to "select * from tableb" and the destination table is also "tableb"?   also - can the DTSX file be change to run for multiple tables?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend