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 |
|
venkath
Posting Yak Master
202 Posts |
Posted - 2007-05-07 : 14:46:03
|
| HIcan i assign a string column to a date columnstring column contain date data.UPDATE TABLE ENT SET EXPIRE_DATE = PREVIOUS_TRN_VALUEwhere EXPIRE_DATE is a datetime columnPREVIOUS_TRN_VALUE is a string column having the value '2007-05-07'thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-07 : 14:51:01
|
| [code]UPDATE ENT SET EXPIRE_DATE = CAST(PREVIOUS_TRN_VALUE as DATETIME)Where IsDate(PREVIOUS_TRN_VALUE) = 1[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
venkath
Posting Yak Master
202 Posts |
Posted - 2007-05-07 : 15:38:09
|
| I think it does implicit convertion to datetime..no need to covert explicitlyThanks for your response. |
 |
|
|
|
|
|