[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] RE: error while using "unstring" function
- Subject: RE: [sqr-users] RE: error while using "unstring" function
- From: Bob Stone <bstone@fastenal.com>
- Date: Thu, 10 Feb 2005 15:06:30 -0600
- Delivery-date: Thu, 10 Feb 2005 16:07:43 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
The error looks like it's saying the line you're putting the unstring on is
too long. With an unstring command you don't have to put all the $variables
on the same line. Here's a few lines of code we have in an SQR that
unstrings everything how we want it. ($sepchar is the tab character, we're
reading in from a 33 column excel sheet that was saved as a tab-delimited
file).
............
UNSTRING $LOADRECORD BY $SEPCHAR INTO
$INV_ITEM_ID
$COMMENTS
$TANC_INTERFACE
$STD_PKG_UOM
$RESTOCK_FLG
$BREAK_PKG
$UOM1 $UOMQTY1 $UOMINT1
$UOM2 $UOMQTY2 $UOMINT2
$UOM3 $UOMQTY3 $UOMINT3
$UOM4 $UOMQTY4 $UOMINT4
$UOM5 $UOMQTY5 $UOMINT5
$UOM6 $UOMQTY6 $UOMINT6
$UOM7 $UOMQTY7 $UOMINT7
$UOM8 $UOMQTY8 $UOMINT8
$UOM9 $UOMQTY9 $UOMINT9
................
so instead of
Unstring $Input by ',' into $V1 $V2 $V3 $V4 $V5 $V6 $V7 $V8 $V9 $V10 $V11
$V12 $V13...
Unstring $Input by ',' into
$V1 $V2 $V3 $V4 $V5
$V6 $V7 $V8 $V9 $V10
$V11 $V12 $V13...
...
$V46 $V47 $V48 $V49 $V50
-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of
ruscs ___
Sent: Thursday, February 10, 2005 2:55 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] RE: error while using "unstring" function
I am trying to "Unstring" a line from a flat file.
line XX:
Unstring $Input by ',' into $V1 $V2 $V3 $V4 $V5 $V6 $V7 $V8 $V9 $V10 $V11
$V12 $V13...
(into 50 values)
and am getting the following error:
Error on line XX:
(SQR 4705) Program line too long; maximum is 511.
Is there a solution?
Thanks
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users