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

Boolean Value in MS SQL Server. Expand / Collapse
Author
Message
Posted Thursday, January 8, 2004 8:33 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, March 29, 2005 2:31 PM
Points: 393, Visits: 1

I've been following this thread... was thinking maybe some form of the following may be usable...

-- In T-SQL
Create Table TestTable (ID Int, TestF Bit)
-- Then change:
--   Insert into TestTable (ID, TestF) Values (10, True)
-- to something like:
Insert into TestTable (ID, TestF) SELECT 10, True -- Won't Work, but
Insert into TestTable (ID, TestF) SELECT 10, True  From (Select 1 as True, 0 as False) DerivedTB
-- or
Insert into TestTable (ID, TestF) SELECT 10, False  From (Select 1 as True, 0 as False) DerivedTB

where all but the new values are "constant" texts.

 





Once you understand the BITs, all the pieces come together
Post #94101
Posted Thursday, January 8, 2004 9:21 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, November 21, 2014 6:34 AM
Points: 6,259, Visits: 2,031

The problem is that the SQL CAN'T BE CHANGED




* Noel
Post #94112
Posted Thursday, January 8, 2004 9:31 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, March 29, 2005 2:31 PM
Points: 393, Visits: 1

Yeh Noel, I hear ya. Just wanted to maybe give you some "ammo" or thoughts that might help.

Is the statement hard coded into an app some where, and is now being issued to SQLSrv. instead of Access?

 





Once you understand the BITs, all the pieces come together
Post #94115
Posted Thursday, January 8, 2004 9:39 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, November 21, 2014 6:34 AM
Points: 6,259, Visits: 2,031
What happened in this case is that Access is Smart Enough to convert True to 1 when sending the query to sql server


* Noel
Post #94117
Posted Thursday, January 8, 2004 9:42 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, November 21, 2014 6:34 AM
Points: 6,259, Visits: 2,031

I have no clue.

I didn't post the question

 




* Noel
Post #94118
Posted Thursday, January 8, 2004 12:20 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Tuesday, August 13, 2013 1:18 AM
Points: 5,956, Visits: 285

Yes, would be interesting to hear why the statement can't be changed.

If that's a third party app, I wouldn't hesitate to contact the vendor.

Just a thought!

Would there be any gain when this front-end would fire the query against an ADP project with linked SQL Server tables? I don't know what ADP exactly does, but the statement wouldn't need to be changed.

 



--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/
Post #94166
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse