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

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Binary conversion

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-08 : 11:49:14
David writes "I want to show all contacts for a specific customer.
There are two tables(Customers,Contacts)where the keyfields are binary values.
I have used the keyfield from the Customer table as a string and want to use it in the SQLstmt.

How do I write the SQLstmt using the string that equals all binary keyfields in the Contacts table?

SELECT *
FROM Contact
WHERE CONVERT(CHAR(32),Contact_keyfield) = %String variable%

The keyfields are datatype:binary and lenght:16"
   

- Advertisement -