 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[11.1.125 Pro] - VALUES formatting issues (MariaDB) |
|
I've got the following formatting rules:
#1
 |
 |
VALUES (..., ...)
,(..., ...);
|
#2
 |
 |
(..., ... AND ... OR ...)
|
Rule #1 transforms this:
 |
 |
VALUES (
1
,`lv_totd_tid`
,`lv_foc_sfs_normal`
,`lv_transport_number_1`
,'ACTIVE'
,`lv_current_test_case`
)
,(
2
,`lv_totd_tid`
,`lv_foc_sfs_normal`
,`lv_transport_number_2`
,'ACTIVE'
,`lv_current_test_case`
)
,(
3
,`lv_totd_tid`
,`lv_foc_sfs_normal`
,`lv_transport_number_2`
,'ACTIVE'
,`lv_current_test_case`
)
,(
4
,`lv_totd_tid`
,`lv_foc_sfs_normal`
,`lv_transport_number_2`
,'ACTIVE'
,`lv_current_test_case`
);
|
into this
 |
 |
VALUES (1, `lv_totd_tid`, `lv_foc_sfs_normal`, `lv_transport_number_1`, 'ACTIVE', `lv_current_test_case`)
,(2
,`lv_totd_tid`
,`lv_foc_sfs_normal`
,`lv_transport_number_2`
,'ACTIVE'
,`lv_current_test_case`)
,(3
,`lv_totd_tid`
,`lv_foc_sfs_normal`
,`lv_transport_number_2`
,'ACTIVE'
,`lv_current_test_case`)
,(4
,`lv_totd_tid`
,`lv_foc_sfs_normal`
,`lv_transport_number_2`
,'ACTIVE'
,`lv_current_test_case`);
|
instead of this
 |
 |
VALUES (1, `lv_totd_tid`, `lv_foc_sfs_normal`, `lv_transport_number_1`, 'ACTIVE', `lv_current_test_case`)
,(2, `lv_totd_tid`, `lv_foc_sfs_normal`, `lv_transport_number_2`, 'ACTIVE', `lv_current_test_case`)
,(3, `lv_totd_tid`, `lv_foc_sfs_normal`, `lv_transport_number_2`, 'ACTIVE', `lv_current_test_case`)
,(4, `lv_totd_tid`, `lv_foc_sfs_normal`, `lv_transport_number_2`, 'ACTIVE', `lv_current_test_case`);
|
I have to select the rows with id 2-4 and apply rule #2 to them so that I can get the desired result.
Any hints on why that happens?
|
|
Mon Apr 27, 2020 8:20 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
In the formatting rules, at the formatting style level there is a separate option for handling CSV items. From the result it appears that you are currently using the "Stacking (leading)" option. I think for this case you want a different style using the "Wrapped" option.
|
|
Tue Apr 28, 2020 1:34 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Are you referring to this one mentioning the commas, marked in green? Yes, that was is to Stacked (leading).
I always believed the second line of rule #1 would define how it should format subsequent values sets after the first one.
I guessed that only modified the rules in the current ruleset, I'd never have thought it would affect the contents of the editor this way. Changing that from the Options dialog would be a very bad idea as it would instantly ruin my customized rules (and not only the note in red says so). Regardless, I tried, just to be sure, and it still works the same. It properly formats the first set of data with the id of 1 (one line), and "expands" all the rest into multiple lines.
|
|
Tue Apr 28, 2020 7:42 pm |
|
 |
|
|
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
|
|
|