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 |
harrisw48
Starting Member
34 Posts |
Posted - 2012-04-13 : 08:47:29
|
Im trying to create a derived column which dates a string and makes it into a date when its loaded.The expression I have at the minute is:LEN([DATE-CREATED]) == 8 ? SUBSTRING([DATE-CREATED],1,2) + "/" + SUBSTRING([DATE-CREATED],3,2) + "/" + SUBSTRING([DATE-CREATED],5,4) : [DATE-CREATED]However i need to put a null in the column if the original details are blank.What do i need to change to do this? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-04-13 : 12:20:53
|
you've null for all data types available inside expression builder. for date useNULL(DT_DATE)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|