SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Pass a boolean variable to a SQL query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gbritton
Aged Yak Warrior

663 Posts

Posted - 11/08/2013 :  10:23:18  Show Profile  Reply with Quote
I have a SSIS variable called MyBoolean defined as type Boolean. I want to pass it to this toy query:

SELECT 42 where ? <> 0

so that the value 42 is returned iff ? = 1 -- that is, if the value of MyBoolean is set to True. I see that I can't specify bit (the SQL Server equivalent of a boolean type) in the Parameter mapping tab of the Execute Sql Task editor. What type should I use? I've tried VARIANT_BOOL, SHORT, SIGNED_CHAR and NUMBER, but these don't seem to work. That is, I'm not getting any rows returned when I execute the task with this sort of setup.


Edited by - gbritton on 11/08/2013 10:28:12
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000