Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
KRichradson1127
Starting Member
20 Posts |
Posted - 2009-07-31 : 15:25:04
|
I am currently populating an empty column in SQL using the following code:update dbo.applicationset company_id_mysql = (select convert(bigint, dbo.fn_hexStrToVarbin(a.new_client_id))from [application] awhere a.application_id > 0)Yet when I try to do this I get the following error message:Msg 512, Level 16, State 1, Line 1Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. All I want to do is take the data that I get from the SELECT CONVERT statement and have that data placed in the empty column that is filled with NULL values.HELP!!! |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-07-31 : 15:27:26
|
Are you updating the same table?? If not, how are both the tables related...how can you join them?EDIT: Maybe you need thisupdate dbo.applicationset company_id_mysql = convert(bigint, dbo.fn_hexStrToVarbin(new_client_id)where application_id > 0) |
 |
|
|
KRichradson1127
Starting Member
20 Posts |
Posted - 2009-07-31 : 15:44:17
|
| They are the same table... |
 |
|
|
KRichradson1127
Starting Member
20 Posts |
Posted - 2009-07-31 : 15:46:43
|
| Thanks....Here is the right scripting:update dbo.applicationset company_id_mysql = convert(bigint, dbo.fn_hexStrToVarbin(new_client_id)) |
 |
|
|
|
|
|