 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[11.5.355 Pro] - BUG: $COLUMNS$ with quoted pre/suffix |
|
Using the $COLUMNS(...)$ macro with quoted prefix makes it go haywire. The snippet below
 |
 |
-- plain
$COLUMNS(vertical,types)$
-- --------------------
-- prefix
"DECLARE lv_"$COLUMNS(vertical,types)$
-- --------------------
-- suffix
$COLUMNS(vertical,types)$";"
-- --------------------
-- both
"DECLARE lv_"$COLUMNS(vertical,types)$";"
-- --------------------
|
yields the following code for a select few columns from a table:
 |
 |
-- plain
`cart_tid` int(10),
`tariff_zone_tid` int(10),
`user_profile_tid` int(10),
`line_tid` int(10)
-- --------------------
-- prefix
DECLARE lv_cart_tid_ int(10),
DECLARE lv_tariff_zone_tid_` int(10),
DECLARE lv_user_profile_tid_ int(10),
DECLARE lv_line_tid_ile_tid_ int(10)
-- --------------------
-- suffix
`cart_tid` int(10);,
`tariff_zone_tid` int(10);,
`user_profile_tid` int(10);,
`line_tid` int(10);
-- --------------------
-- both
DECLARE lv_cart_tid_ int(10);,
DECLARE lv_tariff_zone_tid_` int(10);,
DECLARE lv_user_profile_tid_ int(10);,
DECLARE lv_line_tid_ile_tid_ int(10);
-- --------------------
|
It's definitely the prefix that causes the problems, it garbles the names, and there's even a delimiter stuck in the middle of the second row between the column (the original name `tariff_zone_tid`) and its type that none of the other columns have.
Also, I recall using a suffix prevented the macro from adding the commas after each item which would make the result syntactically incorrect even if the prefix didn't slaughter the column names.
|
|
Mon Jan 18, 2021 6:11 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you for letting us know. I have opened a defect for this issue with tracking number #SA0040050
|
|
Mon Jan 18, 2021 11:24 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|