Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP out a table with an identity column

Status
Not open for further replies.

tusker

Technical User
Mar 4, 2002
8
GB
I have a table with an identity column, how can I unload this table with the bcp command.

I get the following error message:

DB-LIBRARY error:
Unknown variable-length datatype encountered.

Regards
Malkit
 
The identity column shouldn't be a problem. What is the "unknown datatype"? Can you post a schema of your table?

Greg.
 
Name Owner
Type
------------------------------ ------------------------------
----------------------
malkit dbo
user table

Data_located_on_segment When_created
------------------------------ --------------------------
default Mar 5 2002 1:39PM

Column_name Type Length Prec Scale Nulls Default_name
Rule_name Identity
--------------- --------------- ------ ---- ----- ----- ---------------
--------------- --------
cust_ac_no char 8 NULL NULL 0 NULL
NULL 0
sms_account_no numeric 4 7 0 0 NULL
NULL 1
Object does not have any indexes.
No defined keys for this object.
Object is not partitioned.

(return status = 0)
1>

 
The problem was that the $SYBASE variable is pointing to /sybase/syb492 (A REALLY old version). The bcp binary for this version cannot handle certain datatypes (they didn't exist in 4.9.2!!),

/sybase/syb113/bin/bcp


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top