Ask a Question related to ASP Database, Design and Development.
-
Vince B #1
There has to be a way !
Here is the deal, it has been bugging me for a while...
I am building a ordering system administration. I have a table for
clients.
I'm gonna try to simplify...
This is the table I am pulling.
ID CLIENT
1 JOE BLOW
2 MIKE SANDERS
.... ....
When entering a new order, I use the ID from the 'clients' table and
store in the table 'orders'.
I am not storing the name, so that if a change is made to the client
name or address, the change will be reflected when I open the order.
Now, when I list all of my orders from the 'orders' table on one page,
using an RS.movenext, I have a link on top of each column to sort by
orderid, cost, and CLIENT. If I click once it sorts with ASCD, click
again, without it. That works well with the 2 first columns.
orderid cost client
1112121 $55.00 5
1112122 $33.00 8
.... ... ...
Now, when it comes to clients, I need to classify them alphabetically.
That's where I'm stuck. I'm sure there is a simple way to do that with
a join, but all my tries failed.
I'm sure somebody came accross that before and will be able to enlight
me.
Thanks in advance.
Vince Beck
Vince B Guest
-
Atrax #2
Re: There has to be a way !
this just sounds like a basic inner join to me
SELECT order.id, order.somethingelse FROM tblOrders order INNER JOIN
tblClients clients ON clients.clientID = order.clientID ORDER BY
clients.clientName
________________________________________
Atrax. MVP, IIS
[url]http://rtfm.atrax.co.uk/[/url]
newsflash : Atrax.Richedit 1.0 now released.
[url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Atrax Guest
-
Vince B #3
Re: There has to be a way !
Thanks a million. I was trying to figure this out this JOIN. That did the trick.
Vince
Atrax <atrax@dontspamatrax.co.uk> wrote in message news:<u6xvQJz3DHA.3360@tk2msftngp13.phx.gbl>...> this just sounds like a basic inner join to me
>
>
> SELECT order.id, order.somethingelse FROM tblOrders order INNER JOIN
> tblClients clients ON clients.clientID = order.clientID ORDER BY
> clients.clientName
>
>
>
>
> ________________________________________
> Atrax. MVP, IIS
> [url]http://rtfm.atrax.co.uk/[/url]
>
> newsflash : Atrax.Richedit 1.0 now released.
> [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!Vince B Guest



Reply With Quote

