Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS expression question

$
0
0

I have a orderdate and ordertime in two separate columns of a text file, I want to load them from the text file into orderdatetime column of a table.
for example in the text file, those two columns are as follows:
orderdate: 01/21/2012
ordertime: 01:53:01

I want to load them into a datetime column in a table as follows:
orderdatetime: 01/21/2012 01:53:01

I wrote the following expression which is erroring out:
ISNULL(orderdate) ? NULL(DT_DATE) : (DT_DBTIMESTAMP)(orderdate + " " + ordertime)

Please let me know how I can rewrite the above expression for checking for blanks or nulls and if they are blanks or nulls then I want to insert Null else I want to concatenate orderdate and ordertime columns and insert into orderdatetime column of the table.

Thanks


sqldev


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>