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 |
rajasekhar857
Constraint Violating Yak Guru
396 Posts |
Posted - 2010-01-25 : 00:34:04
|
hi iam having table A where c and d are columns.now my reqirement is like if c is null then i need to take first 20 characters of d column value and put it into column c.how to do this |
|
rohan_chikhale
Starting Member
7 Posts |
Posted - 2010-01-25 : 00:46:56
|
Check from front end whether whether any data is returned in c, if not then read the d column and fire an insert statement for c column.Rohan Chikhale |
|
|
rajasekhar857
Constraint Violating Yak Guru
396 Posts |
Posted - 2010-01-25 : 00:48:25
|
update emrdiagnosissnippets set TITLE=(substring(DIAG_SNIPPET_DESC,1,20))where TITLE is nullcan i do like this |
|
|
rohan_chikhale
Starting Member
7 Posts |
Posted - 2010-01-25 : 00:53:22
|
Cant say, try it...if it works good for u... :)Rohan Chikhale |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-01-25 : 02:33:35
|
"can i do like this"Yes |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-25 : 02:46:22
|
quote: Originally posted by rajasekhar857 update emrdiagnosissnippets set TITLE=(substring(DIAG_SNIPPET_DESC,1,20))where TITLE is nullcan i do like this
[See if you come back to reply to this]What happens when new data are added periodically?[/See if you come back to reply to this]MadhivananFailing to plan is Planning to fail |
|
|
|
|
|