RE: Query sorting help
- From: Darren <Darren@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 Jan 2008 08:25:00 -0800
This is a single flat database with all data posted in colums like excell. I
now it is very basic but it works for this user. What I have currently is a
query that simply filters by due date in ascending order for all active data.
Each of the Press1-3 data is in its own column of the database. The desired
result is to sort by press column first then sort found data by date. I just
don't get how to order the search but a spacific column first and also show
duplicate items. By duplicate items I mean if a job has pieces on all three
presses I want to show it in all three sorts. Example I want to sort by
press1 first. Many items from press1 have pieces on Press2 and press3. Then
at the end of the Press1 sort and display press2 items with any and all
pieces for Press1 and press3.
I have screen captures of the sections of the query results and a screen
capture of the query in design view however I cant seem to be able to attatch
them to this post. Thanks Carl for your assistance.
--
Darrenc
"KARL DEWEY" wrote:
Try this --.
SELECT YourTable.Press1, YourTable.Press2, YourTable.Press3, YourTable.DueDate
FROM YourTable
ORDER BY YourTable.Press1, YourTable.Press2, YourTable.Press3,
YourTable.DueDate;
If this is not what you need then put your example output data in an Excel
and then paste in a post.
--
KARL DEWEY
Build a little - Test a little
"Darren" wrote:
I am in need of assistance with a Query. I have a query that assembles a
daily production schedule. The shedule consists of many fields however for
the sake of this question i wish to sort the query by a series of four
fields. the first fiedld in the query is "DueDate" then by field "press1"
then by "Press2" then Press3". The data in the field Due date is the actual
date due. The data in "press1" will only be "6c" or nothing. The data in
"Press2" will be one of three Strings: "25", "29", or "25/29". The data in
"Press3" will only be a string of "17" or nothing. NOTE:It is possible that
one column to have data in all three press fields or any combination of press
fields.
KO, Now the desired result;
I wish to display the data first by Field "Press1" if data exists display it
first and display it in assending order by field "DueDate". Then display
field "Press2" if data exists display it emdiatly after the data from field
"Press1" in order by field "DueDate" displaying duplicate data. Then display
field "Press3" if data exists display it emdiatly after the data from field
"Press2" in order by field "DueDate" displaying duplicate data.
Please Help!!!!!!!!!!!!
DarrenC
--
ITKid
- Follow-Ups:
- Re: Query sorting help
- From: John Spencer
- Re: Query sorting help
- Prev by Date: Re: Order by ignored after upgrade from SQL Server 2000 to 2005
- Next by Date: Multiple records for one parameter
- Previous by thread: Re: Order by ignored after upgrade from SQL Server 2000 to 2005
- Next by thread: Re: Query sorting help
- Index(es):
Relevant Pages
|