Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

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

Flowing Fount of Yak Knowledge

2780 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  
 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.02 seconds. Powered By: Snitz Forums 2000