Are you sure that bigInt is what you think it is? I thought it was just a
signed integer (2billion+ to -2billion+).

Meanwhile, the code below will throw a syntax error on the ampersand...
BigIntCol & CAST(...)   ... The ampersand is not the concatenation operator
in T-SQL. You have to use a plus sign. If you are trying to concatenate you
would have to do something like


CAST(  CAST(bigintCol AS varchar(8)) + '#filter#'  AS bigInt)  


In other words - cast your column to a character type, concatenate them and
then cast them back to a biginto type.  Seems like a lot of work :)

-Mark
 

-----Original Message-----
From: Dennis Powers [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 05, 2008 12:01 PM
To: CF-Talk
Subject: Transact SQL question has me stumped

I am hoping an SQL guru can assist me with what I am sure is a stupid little
oversight or misunderstanding on my part.

I hope I can explain this. I need to do a bit evaluation against data in the
database where the data is stored in a BigInit column. Within my code I
construct a bit filter and need to select all records where the logical AND
of that value against the BigInt field is "true".

For example If my bit filter = 129 (1*2) + (8*2) What I need to do is select
all records Where the BigInt Column has bit 1 AND bit 8. I am not sure how
to evaluate this function in a where clause.


SELECT  mycolumns
FROM  mytable
WHERE  BigIntColumn & CAST(#filter# as BigInt)) = {and this is where I fall
down}

Any help is appreciated.


Best Regards,

Dennis Powers
UXB Internet - A website design and Hosting Company 690 Wolcott Road P.O.
Box 6029 Wolcott, CT  06716
Tel: (203)879-2844
http://www.uxbinternet.com/
http://www.uxb.net/





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298238
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to