[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Data being truncated when converting from a flat file



If the variable you are trying to unstring contains the delimiter within
quotes you will run into problems.  For example, if the variable has the
following...
ABCD,1234,'AB,CD',4321

The , between AB and CD will throw off your UNSTRING.

Hope this helps,
D

-----Original Message-----
From: Jamie Harris [mailto:JHarris@FCC.CC.MD.US]
Sent: Friday, June 29, 2001 10:55 AM
To: SQR-USERS@list.iex.net
Subject: Re: Data being truncated when converting from a flat file


What delimiter are you using to unstring?  Are you able to post any code or
sample data?  That may help us find the problem.

-----------------------------------------------------
Jamie Harris
Junior Programmer/Analyst/Software Integrator
Office of Information Technology
Frederick Community College
-----------------------------------------------------

>>> Margaret-Anne_Bett@LEARNINGTREE.COM 6/28/2001 12:04:08 PM >>>
I'm using the unstring command to split the data into various data fields.
I
then use rtrim to remove any spaces from the end of the data.  There are no
special characters.

Thanks for all the suggestions so far, but I'm still having problems!

Margaret-Anne




Rhonda Hudgins <RHudgins@GENENCOR.COM> on 26/06/2001 12:49:13

Please respond to sqr-users@list.iex.net

To:   SQR-USERS@list.iex.net
cc:    (bcc: Margaret-Anne Bett/LearningTree/GB)
Subject:  Re: Data being truncated when converting from a flat file



How are you defining your input (flat) file?   If you are using "substr"
to move the information to a field check the format.
 for example:  LET $Address                = substr ($RECIN, 48, 35)   This
starts in column 48 of the input record and includes 35 characters.


Thanks!

Rhonda Hudgins
@}---'----,----
Genencor International, Inc
716/256-5266
rhudgins@genencor.com



                    Margaret-Anne Bett
                    <Margaret-Anne_Bett@LEARNIN        To:
SQR-USERS@list.iex.net
                    GTREE.COM>                         cc:
                    Sent by: "Discussion of            Subject:     Re: Data
being truncated when converting from a flat file
                    SQR,Brio Technology's
                    database reporting
                    language"
                    <SQR-USERS@list.iex.net>


                    06/25/2001 08:20 PM
                    Please respond to sqr-users






The data will definitely fit into the fields - the text file field has 30
characters and the database is 55.  A lot of the time the data is truncated
to
just one character.

Margaret-Anne




cshelton <cshelton@INDIANA.EDU> on 25/06/2001 22:30:40

Please respond to sqr-users@list.iex.net

To:   SQR-USERS@list.iex.net
cc:    (bcc: Margaret-Anne Bett/LearningTree/GB)
Subject:  Re: Data being truncated when converting from a flat file



Have you verified that the fields that are being truncated are defined
large enough in the database to be able to accept the largest values from
your flat files?

I haven't worked much with SQL server, but in Sybase (the grandparent of
SQL server) if you attempt to insert a value too large to fit in a column,
the database will silently truncate your value to the size of the column
in the database.

chris

On Mon, 25 Jun 2001, Margaret-Anne Bett wrote:

> PeopleSoft 8.13
>   Microsoft Sequel Server 2000
>   Windows 2000
>
> I am trying to convert data from a flat file into the PS_VENDOR_ADDR
table.
> Several of the data fields are being truncated.  This happens on
different
> fields on different vendors, but is consistent each time I run the
conversion
> SQR.  There doesn't seem to be any logic as to which field is truncated
on
which
> vendor.  I have show statements in the SQR which return the correct
value.
>
> Margaret-Anne
>
>