MS SQLServer Binary datatype issue

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
info_ds
Charter Member
Charter Member
Posts: 88
Joined: Thu Feb 10, 2005 4:36 am
Location: B\'lore

MS SQLServer Binary datatype issue

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Read the part of the DataStage manual where it informs you that binary data type is not supported.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply