I need to run an update query to remove the dash - from the end of my column data but I'm unsure of the syntax
example of the data: 980890121-
239451-
4865000-
The lengths of the data in that column are not the same size which makes it difficult for...
I'm in desperate need of some help with an SQL Update
query...
I have a column that contains serial numbers and a fail
code divided by a dash. I would like to split the columns
into two separate columns but, the problem is they aren't
the same length.
example: 980890121-1, 239451-1...
Thomas,
This is the message I get when I run it!
Server: Msg 174, Level 15, State 1, Line 2
The substring function requires 3 arguments.
update CallLog
set test= substring(cause,charindex(cause,'-')+1)
, cause = substring(cause,1,charindex(cause,'-')-1)
;
Where did I go wrong?
Thanks, Gabby
Thomas,
Remember I'm new to SQL so when you say to "populate the new column and adjust the original/old column" I'm not
really sure where I'm suppose to go or what to do. Can you give me detailed instructions Please?
Thanks, Gabby
SQLBill,
Here is an example of what the data in that column looks like! rn-123567 I would like to split it into 2 separate columns and drop the - if possible.
Thanks for you help! Gabby
I have a column in my sql table that contains 2 different values, I would like to separate them into 2 different columns! How do I go about doing this? I'm a beginner to sql so my knowledge is very limited! Thanks in advance for your help!
Gabby
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.