April 9, 2010 at 7:29 pm
hi - how can i restructure date based ProcessDataID. data show now like this in DB -
IdnoProcessDataIDNameColor
1-1- A-RED
2-2- B-GREEN
3-3- C-YELLOW
4-4- D-BLUE
5-5- E-ORANGE
6-6- F-PINK
aftre processing data it should look like this -
Idno -ProcessDataID -Name-Color
1-1- A-RED
3-3- C-YELLOW
2-2- B-GREEN
5-5- E-ORANGE
4-4- D-BLUE
6-6- F-PINK
2nd table should not be anything do with odd even.
thank you
neil
April 9, 2010 at 9:47 pm
Hi,
Check the DB table index is same with the second table.
Or these second tables for analysis/report purpose ie like the temp purpose than just select with order by class.
April 9, 2010 at 9:57 pm
NEAL-464478 (4/9/2010)
hi - how can i restructure date based ProcessDataID. data show now like this in DB -IdnoProcessDataIDNameColor
1-1- A-RED
2-2- B-GREEN
3-3- C-YELLOW
4-4- D-BLUE
5-5- E-ORANGE
6-6- F-PINK
aftre processing data it should look like this -
Idno -ProcessDataID -Name-Color
1-1- A-RED
3-3- C-YELLOW
2-2- B-GREEN
5-5- E-ORANGE
4-4- D-BLUE
6-6- F-PINK
2nd table should not be anything do with odd even.
thank you
neil
Sorry, Neil. I don't understand what you want. You'll have to be more explicit.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2010 at 3:26 am
It doesn't sound like a processing issue but rather an issue of finding the proper ORDER BY condition.
In order to do that it's required to define a sorting criteria. In your expected output there is none I can find. Neither is it sorted by name nor by color nor by "first odd Idno then even and within each group ascending" or any other consistent pattern.
Please clarify.
April 10, 2010 at 2:28 pm
well requirment suppose to show like 2nd table, order by processdataID
April 10, 2010 at 8:18 pm
NEAL-464478 (4/10/2010)
well requirment suppose to show like 2nd table, order by processdataID
There's nothing to sort on in the first table to present the data in the order of the second table. You'll need to build a "sister" table that has a predefined sort order.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 12, 2010 at 10:34 am
and how i can create sister table with the specific sort order which will show like 2nd table, i am new to sql any help will be much appreciated.
Thanks
April 12, 2010 at 12:47 pm
NEAL-464478 (4/12/2010)
and how i can create sister table with the specific sort order which will show like 2nd table, i am new to sql any help will be much appreciated.Thanks
Is there any business logic other than explicitly defining that the colors must be in a certain order?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply