dbTalk Databases Forums  

Expression builder

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Expression builder in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Usha
 
Posts: n/a

Default Expression builder - 03-18-2009 , 12:14 PM






I am trying to build the below sql expression to store it in a variable but
it is giving me cast error for the operands.

"select * from OrclTbl where load_date <"
+(DT_DBTIMESTAMP)@[User::varFromDate]

I even tried the below still it gives me the same error
"select * from OrclTbl where load_date <"
+ getdate()


Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: Expression builder - 03-24-2009 , 11:48 AM






Try the (DT_DBDATE) conversion.

Do you have a representative value in the varFromDate when you go to build
your expression? You will need something in the variable during desing time,
otherwise the SQL Syntax checker might fail.

One last question: Where are you building this expression? In a Data Flow
Source Adapter? Can you give us an overall view of your package design?
(Control Flow elements and Data Flow transforms, etc)

Todd C


"Usha" wrote:

Quote:
I am trying to build the below sql expression to store it in a variable but
it is giving me cast error for the operands.

"select * from OrclTbl where load_date <"
+(DT_DBTIMESTAMP)@[User::varFromDate]

I even tried the below still it gives me the same error
"select * from OrclTbl where load_date <"
+ getdate()


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.