Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / April 2008



Tip: Looking for answers? Try searching our database.

SQLQuestion

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Walid_38 - 04 Apr 2008 10:09 GMT
Hi All,

I've a table that displays something like this:
clientid  order  OrderDate
-------- ------  ---------
1        Printer
2        mouse
1        monitor
3        printer
4        keyboard
2        keyboard

But I'd like to get this result:
Where I display the latest 4 orders in the same row.

clientid order1   order2  order3 order4
-------- -------  ------- ------ ------
1        printer  monitor
2        mouse    keyboard
3        printer
4        keyboard

Thanks for your help.
Bob Barrows [MVP] - 04 Apr 2008 14:15 GMT
> Hi All,
>
[quoted text clipped - 19 lines]
>
> Thanks for your help.

What database (type and version please) are you using. The answer to
this question strongly depends on that information, which you should
make a point of supplying whenever you ask a database-related question.

Signature

Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.