I have some bcp archive files without the data format. Is there a way to get
the data format from the archive files.
ThanksHi
This is not possible. You may want to use DTS/Import wizard to graphically
assign data to columns. If you know your destination table maps onto the dat
a
file or have access to the source table, then you can use the format option
to create a format file from the table definition.
John
"Tom" wrote:
> I have some bcp archive files without the data format. Is there a way to g
et
> the data format from the archive files.
> Thanks|||No you cant get it from the output file but if you know what table the data
came from you can use the code below to make a format file of the table so
you can reassociate the columns with data values.
EXEC master.dbo.xp_cmdshell 'BCP dbname.dbo.tablename FORMAT -Usa -Ppass -N
-fc:\TBL_Format.fmt'
From what I have experienced with format files the column width that gets
outputted from using the format option does not always match whats in the
table. From my experience the format option outputs more width than what is
stored in the table its self.
Hope this helps.
"Tom" wrote:
> I have some bcp archive files without the data format. Is there a way to g
et
> the data format from the archive files.
> Thanks
没有评论:
发表评论