You need to have quotes around spaces.  You might try a different way of
treating datetimes. 
Create a view on your MS SQL table and bcp from that. 

The ISO date format is not compatible between the 2 databases.
DB2 format is yyyy-mm-dd-hh.mm.ssss (into the nanoseconds)
MS SQL has a space between dd and hh and did not go into as much detail with
nanoseconds.

create view Vd2ISO_date as
  select
 case when (x_date = NULL) 
         then NULL
          else (stuff(stuff(convert(char(10),x_date,102),5,1,'-'),8,1,'-') +
'-'                                                 
          +
stuff(stuff(stuff(convert(char(12),x_date,14),3,1,'.'),6,1,'.'),9,1,'.') +
'000' )
  end  as d2_x_date, 
...
 
go

-----Original Message-----
From: udb question [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 12, 2001 12:15 PM
To: [EMAIL PROTECTED]
Subject: DB2EUG: MS-SQL to UDB


Hi.

I am trying to load data from MS-SQL to UDB. I have
created the similar table present on MS-SQL in UDB
and  I did a BCP from MS-SQL .

While loading I am getting errors as its not taking
space for some of the columns. The error is

SQL3116W  The field value in row "F0-1" and column "4"
is missing, but the target column is not nullable.

The columns have been declared as XXX   CHARACTER(5) 
NOT NULL in both MS-SQL and UDB and is having spaces
now in MS-SQL table. I checked the BCP file and
confirmed that spaces are there for the 4th column and
it is not null.

The load statement I am using is

load from xxx.out of del modified by coldel{
timstampformat="yyyy/mm/dd hh:mm:ss:uuuuuu" messages
xxx.msg replace into instance-name.xxx

Can some time tell me if there is a way to load data
from MS-SQL to UDB having some columns in the input
file for load with spaces??

Thanks.

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod



=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to