|
-
Mar 6th, 2002, 04:46 PM
#1
RESOLVED Sql Server Sql Question
In SQL SERVER how would I write a SQL statement to set a column of null values to an emptry string?
so that any value in a column that is <null> would change to ""
Last edited by kleinma; Mar 7th, 2002 at 08:20 AM.
-
Mar 6th, 2002, 05:04 PM
#2
update tablename
set columnname = ''
where samecolumnname is null
-
Mar 6th, 2002, 06:06 PM
#3
Originally posted by rickm
update tablename
set columnname = ''
where samecolumnname is null
I tried that but it gave me an error
-
Mar 6th, 2002, 06:10 PM
#4
Originally posted by kleinma
I tried that but it gave me an error
Did you replace the tablename with the actual tablename and the columnnames with the actual columnnames? What was the error.
-
Mar 6th, 2002, 06:13 PM
#5
lol ya...
I actually tried that before i posted this.. i am not at work anymore.. i can post the exact error tomorrow..
it was something like can't insert value try using a space instead or something like that.. and it is sql server 2000
-
Mar 6th, 2002, 06:14 PM
#6
By the way.. when i said i wanted to insert "" i mean i want to insert a zero length string.. i don't know why i didn't say that from the start..
-
Mar 7th, 2002, 08:21 AM
#7
ok you have to insert ' ' into the table... that is seen as a zero length string to SQL server... for some reason it needs the space...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|