[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



It is curious to see it work sometimes, and othertimes not.  My (lame)
suggestion, and this isn't much, change your INSERT statements so they are
only inserting the variable.  Move your ISNULL tests into a procedure so the
INSERTs only have variables and no SQL.  No real hope with this suggestion,
but SQR is sometimes a little flaky.

Add a procedure to SELECT from the table you are inserting just after the
INSERT.  SELECT only that row and SHOW the values.  I am interested to see
what is actually making it into the database.

Also, and this is a personal preference, you may want to investigate the
SHOW command instead of DISPLAY.  The SHOW allows you to put multiple items
(text, numeric/character variables) on one line.  The following is an
example...
FROM...
  Display 'SET ID: ' Noline
  Display $set_id
TO
  Show 'Set ID: ' $Set_ID

Also, when showing/displaying variables (especially character variables), I
use the "batwing" approach so I can see if the variable is null, space, or
something else...
  Show 'Set ID  >' $Set_ID '<'

This way, if $Set_ID is null it will show...
  Set ID  ><

Good luck,
Dave