dbTalk Databases Forums  

Assign SQL Script to global variable

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


Discuss Assign SQL Script to global variable in the microsoft.public.sqlserver.dts forum.



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

Default Assign SQL Script to global variable - 04-27-2004 , 02:32 PM






How do I assign the contents of a script.sql file to a global variable?
Do I have to read it in line by line? Can you show me the code to do it?


Ron Sissons, DBA
Information Technology Services
Riverside County Office of Education
3939 Thirteenth Street, Riverside, CA 92502-0868
Telephone: (909) 826-6471; FAX: [909] 826-6451


Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Assign SQL Script to global variable - 04-27-2004 , 04:01 PM






In message <e7ETk5ILEHA.332 (AT) TK2MSFTNGP11 (DOT) phx.gbl>, Ron Sissons
<RSISSONS (AT) rcoe (DOT) k12.ca.us> writes
Quote:
How do I assign the contents of a script.sql file to a global variable?
Do I have to read it in line by line? Can you show me the code to do it?


You could do this in ActiveX Script Task using the text stream object
and Read and ReadLine methods, but easier still you can use the Dynamic
Properties Task.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.