|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
BCP IN: create table on-the-flyHello!
I have a BCP file (.BCP) and I want to do a BCP IN but I don't have a table associated with it. (Lets say table got dropped). I am curious if there is a way to create a table on-the-fly while doing BCP IN? Any neat solution? Thanks! *** Sent via Developersdex http://www.developersdex.com *** Whats wrong with CREATE TABLE xxx?
-- Show quoteAndrew J. Kelly SQL MVP "Test Test" <farooqhs_2***@yahoo.com> wrote in message news:eTq4h7FGGHA.3080@TK2MSFTNGP10.phx.gbl... > Hello! > > I have a BCP file (.BCP) and I want to do a BCP IN but I don't have a > table associated with it. (Lets say table got dropped). I am curious if > there is a way to create a table on-the-fly while doing BCP IN? Any neat > solution? > > Thanks! > > > *** Sent via Developersdex http://www.developersdex.com *** Lets say ..I dont know the table structure. All I have found is a .BCP
file which is a binary file and can not be opened in text editor. *** Sent via Developersdex http://www.developersdex.com *** Test Test (farooqhs_2***@yahoo.com) writes:
> Lets say ..I dont know the table structure. All I have found is a .BCP You now have a challenge. You see, there is not one possible table for> file which is a binary file and can not be opened in text editor. this file - but many. Some of them, makes more sense than others. The file itself contains records only - there is no metadata. So all you can to is to analyse combinations of bytes. Hm, here is a long sequence of bytes with the ASCII codes of letter. Probably a character string. And here is a sequence where every second byte is 0. Might be Unicode. In short, this will keep you busy a couple of days! -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx In addition to what Erland suggested, I'd start looking for the format file -
if there ever was one, or some documentation to what this BCP file was used for. ML --- http://milambda.blogspot.com/ |
|||||||||||||||||||||||