corretto order join
This commit is contained in:
@@ -163,21 +163,16 @@ sub trxelab {
|
||||
my $sthdo = $dbh->do(
|
||||
qq{
|
||||
select * from (
|
||||
(
|
||||
select 'ToolNameID', 'EventDate', 'EventTime', 'NodeNum', 'NodeType', 'NodeDepth',
|
||||
'XShift', 'YShift', 'ZShift' , 'X', 'Y', 'Z', 'HShift', 'HShiftDir', 'HShift_local',
|
||||
'week_shift', 'week_shift_x', 'week_shift_y', 'week_shift_z', 'T_node', 'water_level', 'pressure', 'load_value'
|
||||
)
|
||||
union all
|
||||
(
|
||||
select ToolNameID, EventDate, EventTime, NodeNum, NodeType, NodeDepth,
|
||||
XShift, YShift, ZShift , X, Y, Z, HShift, HShiftDir, HShift_local,
|
||||
week_shift, week_shift_x, week_shift_y, week_shift_z, T_node, water_level, pressure, load_value
|
||||
from ElabDataView
|
||||
where ToolNameID = '$tool' and created_at > '$matlab_timestamp'
|
||||
order by EventDate, EventTime, NodeDepth
|
||||
)
|
||||
|
||||
order by ToolNameID DESC, EventDate, EventTime, convert(`NodeNum`, decimal) DESC
|
||||
) resulting_set
|
||||
into outfile '$fileelab'
|
||||
fields terminated by ',' optionally enclosed by '"' lines terminated by '\n'}
|
||||
|
||||
Reference in New Issue
Block a user