Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Tools & Utilities
Ambassador

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi Malli,

DIF is an ancient format (from the ages of Multiplan and Lotus 1-2-3), why do you want to use it anyway?

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

HI Dieter,

Thank you so much for quick reply.

My requirement is i have to export 500 records data from table to excel sheet with column names as well.But data loading, column names not coming. Please help on this.

Thanks in advance

Mallik

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

HI ALL,

My text file like below format:

133232      mallik            6678783       980920

133342      anil                6678783       980920

133232      ravi                6678783       980920

i dont how much space for each gap. which delimetr i have to use with VARTEXT ?  [in BTEQ IMPORT].

Please help me .

Thanks in advance

Malli

Ambassador

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi Mallik,

in the exported DIF there's info about the column names, but Excel doesn't seem to use it. DO you need to run this export in a batch or manually? SQL Assistant can create Excel-files, run the query, CTRL-S and choose Excel 2003 or 2007.

Regarding the last format, this is fixed width, try REPORT format and define CHARs instead of VarChar. 

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi Dieter,

Thanks for your help first request worked.

For second one below is the .xls  data:

133232      mallik            6678783       980920

133342      anil                6678783       980920

133232      ravi                6678783       980920

Logic:

.logon tdprod/e_service_batch,o123$_1_1_12_9_8;

database supportdb;

.IMPORT REPORT FILE='/users/mbukkala/e108.xls';

.QUIET ON 

.PACK 

.REPEAT *

USING

ipkey(CHAR(50)),

ipname (CHAR(200)),

ownerkey (CHAR(50)),

rukey (CHAR(50))

insert into supportdb.tdp4 values(:ipkey,:ipname,:ownerkey,:rukey);

.logoff;

.quit;

Still i am getting the below error pls help me

 *** Failure 2673 The source parcel length does not match data that was defined.

Thanks in advance

Malli

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

HI ALL,

can any one help on the above issue.

Thanks in advance.

Malli

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

When using fixed length input file, variable declaration should match the table layout and inputfile characters.

133232      mallik              6678783       980920

133342      anil                6678783       980920

133232      ravi                6678783       980920

From given input file, guestimate the column length should be near close to:

Adjust the length based on exact input file format

ipkey (CHAR(13)),

ipname (CHAR(20)),

ownerkey (CHAR(14)),

rukey (CHAR(6))

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi TDThrottle,

Thank you so much It is worked.

One more doubt is    in oracle we have DUAL is the temporary table, like this TERADATA

Having any table?

Please help me

Thank you,

Malli

Enthusiast

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi Dieter/TDThrottle/ALL,

Please clarify below doubts:

1. in oracle we have DUAL is the temporary table, like this TERADATA Having any table?

2. i defined varchar(50)  but my value is not morethan 20 characters. what will happen remianing size ? is it automatically saved or some thing else ?

3. Why we ill not use VARCHAR in case of COMPRESS technique ?

Please help me on above doubts.

Thank you so much in advance.

Mallik.

Ambassador

Re: Receiving Failure 2673 The source parcel length does not match data that was defined while importing using BTEQ

Hi Mallik,

Q1: There's no need for DUAL as you don't need FROM: SELECT 1;

Q2: The name VarChar (= Character Varying) implies variable size

Q3: You can compress VarChars since TD13.10