I have a work table in DB2 in which I would like to arrange the records in a particular order. I use an insert statement to append records into the table and I would like to have them odered as I want.
I tried:
Insert Into tblXXX (Field1, Field2,...)
Select FieldA, FieldB,...
From tblZZZ
Where YYYYYYY
Order By FieldC, FieldD
Error message says the "Order" reserved word is invalid.
I tried to create a view selecting all fields from tblXXX and ordering on the fields I want, I get an error stating that the Order By clause is not allowed.
I just want to get a set of data in the order I want so that I can use tblXXX or a view based on tblXXX as a datasource for a Crystal report.
I am relatively new to DB2 and I am amazed and frustrated by the fact that I can't seem to perform a basic operation.
Am I out of my mind here?
I tried:
Insert Into tblXXX (Field1, Field2,...)
Select FieldA, FieldB,...
From tblZZZ
Where YYYYYYY
Order By FieldC, FieldD
Error message says the "Order" reserved word is invalid.
I tried to create a view selecting all fields from tblXXX and ordering on the fields I want, I get an error stating that the Order By clause is not allowed.
I just want to get a set of data in the order I want so that I can use tblXXX or a view based on tblXXX as a datasource for a Crystal report.
I am relatively new to DB2 and I am amazed and frustrated by the fact that I can't seem to perform a basic operation.
Am I out of my mind here?