Page 1 of 1

MS SQLServer Binary datatype issue

Posted: Sun Dec 02, 2007 1:49 pm
by info_ds
Hi all,

I have a doubt regarding binary datatype in SQLServer.

Here is the scenario.

I have my source data in sequential file(comma delimited) with two columns user_id int(4) and user_pwd varchar(50).

Sample input data:
1,0x3055D2E2DAD6F9E8C41126A95DABCDD4

Now I have to insert the records into SQLServer database where the datatype of user_pwd column is binary(16)

when i tried inserting via ODBC stage i got the error message as 'Invalid character value for cast specification' but if I insert data manually using SQL Query Analyser then it is getting inserted.

I searched the forum,then used OCONV(user_pwd,"MX0C")
and got the output value as 0x30783330353544324532444144364639 which is not similar to the input.

So how to handle this?Any ideas or suggestions much appreciated.

Posted: Sun Dec 02, 2007 2:37 pm
by ray.wurlod
Read the part of the DataStage manual where it informs you that binary data type is not supported.