Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple order by question

Hi all.. I employed a order by function but I discovered that never worked. My syntax is:

History:

LOAD
user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);
    
Concatenate

LOAD

     user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);

Store History into ;

LOAD
     bug_id,
     user_id,
     date_modified,
     prioridad,
     reabierto
Resident Historial
order by bug_id , date_modified, prioridad;         

Store History into ;

drop table History;

What could the problem be?

Thank.

Ivan. 

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

I think you need to declare a name for the second table load, and don't forget to drop the first.  So:

Historial_temp:

LOAD
user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);
    
Concatenate (Historial_temp)


LOAD user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);

Historial:
NoConcatenate

LOAD
bug_id,
user_id,
      date_modified,
     prioridad,
     reabierto
Resident History
order by bug_id ,date_modified, prioridad;

Store Historial into ;

DROP TABLE Historial_temp;

Give that a go.

Jason

View solution in original post

7 Replies
Not applicable
Author

Sorry.. in Resident i employed History. thank!.

Ivan

Jason_Michaelides
Luminary Alumni
Luminary Alumni

I think your issue is that the RESIDENT load is concatenating to the main table.  Try changing your last script section to:

NoConcatenate

LOAD

     bug_id,

     user_id,

     date_modified,

     prioridad,

     reabierto

Resident History

order by bug_id , date_modified, prioridad;        

Store History into ;

drop table History;

Also, I don't know why you are storing to the same QVD file twice.  Remove the first STORE command?

Hope this helps,

Jason

Not applicable
Author

Hi, thank very much Jason, i remove the first store, it was a mistake to copy and paste. i change my script but also it doesnt work.

My new script:

Historial:

LOAD
user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);
    
Concatenate

LOAD user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);


NoConcatenate

LOAD
bug_id,
user_id,
      date_modified,
     prioridad,
     reabierto
Resident History
order by bug_id ,date_modified, prioridad;

Store Historial into ;

Please take a look at the qvd.

Thanks in advance.

Ivan.

Not applicable
Author

I need only order by: first bug_id, second  date_modified and third prioridad.

Thanks!.

Ivan.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

I think you need to declare a name for the second table load, and don't forget to drop the first.  So:

Historial_temp:

LOAD
user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);
    
Concatenate (Historial_temp)


LOAD user_id,
     bug_id,
     date_modified,
     prioridad,
     reabierto
FROM

(qvd);

Historial:
NoConcatenate

LOAD
bug_id,
user_id,
      date_modified,
     prioridad,
     reabierto
Resident History
order by bug_id ,date_modified, prioridad;

Store Historial into ;

DROP TABLE Historial_temp;

Give that a go.

Jason

Not applicable
Author

Jason, it works!.

Thank you very much.

Regards.

Ivan.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Coolio. You're welcome.