Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Problem with sql statement in vb script using variables. Expand / Collapse
Author
Message
Posted Thursday, January 3, 2013 6:23 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 2, 2013 11:09 AM
Points: 97, Visits: 180
Thanks guys....the single quote works!!!!!!!!! So glad:) Love this forum!
Btw guys i am wrapping up my work after this. I am asked to prepare for a rerun scenario. I have thought of what to do but i am not sure how to make use of package variable in SQL statements inside the Execute SQL task. For now my plan would be, having a batch file to pass in a current DATE parameter to my package variable called ExecDate. Then i would like to use this ExecDate inside my Execute SQL task such as:
Delete * from Table where CreationDate = @ExecDate.

how can this be done in Execute Sql Task? Btw thanks for suggesting stored procedures, i know that's a better approach, i definitely agree but for this project i am kinda restraint from using stored procedure due to some security issue.
Post #1402631
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse