UPDATE tblDignosis_Test1 SET RnlSelTbSodium='115.0', RnlSelTbPotessium='3.4', RnlSelTbChloride='80.0', RnlSctTbValue='1.0', RnlSelTbSodium='117.0',
RnlSelTbSodium='120.0' WHERE ID = (SELECT ISNULL(MAX(ID),0) FROM tblDignosis_Test1)
Msg 264, Level 16, State 1, Line 1 The column name 'RnlSelTbSodium' is specified more than once in the SET clause. A column cannot be assigned more than one value in the same SET clause. Modify the SET clause to make sure that a column is updated only once. If the SET clause updates
columns of a view, then the column name 'RnlSelTbSodium' may appear twice in the view definition.
Remove duplicate coloumns in Update Statement.....
Now i getting this error, so can any give me solution or method which check if string contains or exixst(RnlSelTbSodium) like that so can compare and check it out or better solution.
what is the purpose of doing this? there is column name repeated in update statement... why cant u simply remove one....
is there any scenario which automatically creats the query..... may be we can suggest a solution based on the scenario.... instead of dynamically adjusting sql query (using dynamic sql)
Cheers!
KK
Please mark as Answer if post helps in resolving your issue
My Site
Now i getting this error, so can any give me solution or method which check if string contains or exixst(RnlSelTbSodium) like that so can compare and check it out or better solution.
Hi,
It seem that you have some setting codes to create update query automatically, please post that code to provide us more information about your problem. Thanks for understanding.
Thanks.
Please mark the replies as answers if they help or unmark if not.
Feedback to us
bhargav5126
Member
153 Points
71 Posts
Remove duplicate coloumn in Update statement
Feb 27, 2012 11:28 AM|LINK
UPDATE tblDignosis_Test1 SET RnlSelTbSodium='115.0', RnlSelTbPotessium='3.4', RnlSelTbChloride='80.0', RnlSctTbValue='1.0', RnlSelTbSodium='117.0', RnlSelTbSodium='120.0' WHERE ID = (SELECT ISNULL(MAX(ID),0) FROM tblDignosis_Test1)
Msg 264, Level 16, State 1, Line 1
The column name 'RnlSelTbSodium' is specified more than once in the SET clause. A column cannot be assigned more than one value in the same SET clause. Modify the SET clause to make sure that a column is updated only once. If the SET clause updates columns of a view, then the column name 'RnlSelTbSodium' may appear twice in the view definition.
Remove duplicate coloumns in Update Statement.....
Now i getting this error, so can any give me solution or method which check if string contains or exixst(RnlSelTbSodium) like that so can compare and check it out or better solution.
kedarrkulkar...
All-Star
35563 Points
5700 Posts
Re: Remove duplicate coloumn in Update statement
Feb 27, 2012 11:42 AM|LINK
what is the purpose of doing this? there is column name repeated in update statement... why cant u simply remove one....
is there any scenario which automatically creats the query..... may be we can suggest a solution based on the scenario.... instead of dynamically adjusting sql query (using dynamic sql)
KK
Please mark as Answer if post helps in resolving your issue
My Site
Chen Yu - MS...
All-Star
21829 Points
2513 Posts
Microsoft
Re: Remove duplicate coloumn in Update statement
Mar 01, 2012 09:00 AM|LINK
Hi,
It seem that you have some setting codes to create update query automatically, please post that code to provide us more information about your problem. Thanks for understanding.
Thanks.
Feedback to us
Develop and promote your apps in Windows Store