SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[11.5.355 Pro] - BUG: $COLUMNS$ with quoted pre/suffix

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[11.5.355 Pro] - BUG: $COLUMNS$ with quoted pre/suffix
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2100

Post [11.5.355 Pro] - BUG: $COLUMNS$ with quoted pre/suffix Reply with quote
Using the $COLUMNS(...)$ macro with quoted prefix makes it go haywire. The snippet below
Code:

-- 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:

Code:

-- 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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.