dbTalk Databases Forums  

Using parameters with OpenRowset in ExecuteSQL Task

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


Discuss Using parameters with OpenRowset in ExecuteSQL Task in the microsoft.public.sqlserver.dts forum.



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

Default Using parameters with OpenRowset in ExecuteSQL Task - 05-14-2004 , 11:04 PM






I'm getting a syntax error when I try to use parameters in the WHERE
clause of a select from an openrowset (text file). If I have specific
string values, i.e., WHERE col1 = 'text' and col2 = 'text2', there is no
error on parsing, and it executes successfully. However, if I substitute
question marks, i.e., WHERE col1 = ? and col2 = ?, a syntax error
appears, and the task doesn't see any parameters nor will the task
execute successfully.

Actually, I'm using a select into statement from an openrowset source
(text file) INTO a temporary table WHERE columns in the openrowset equal
parameters. It won't let me set the parameters to global variables in
the UI.

Thanks,

Gerald

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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.