Posted by Erland Sommarskog on 12/22/06 11:23
Mintyman (mintyman@ntlworld.com) writes:
> I want to run queries on a table that has binary fields in it. How do I
> filter on a binary field? E.g. One of the fields is called
> 'Account_Manager_ID' which is binary - I would like to do a simple
> Select * from company where Account_Manager_ID = 'blah blah blah'
>
> When I do this, it returns no data. How do I get round this?
WHERE Account_Manager_ID = convert(varbinary, 'blah blah blah')
is what I woudl guess from your description.
But it's probably better if you post the CREATE TABLE statement for
the table, some sample data and an actual query. That would reduce the
amount of guessing.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|