Sql Statement (select Top)

Results 1 to 2 of 2

Thread: Sql Statement (select Top)

  1. #1
    Join Date
    Dec 1969

    Default Sql Statement (select Top)

    TableA:<BR><BR>Country CountItem CatDescription<BR>-----------------------------------<BR>Hong Kong 50 Gifts Premium<BR>Hong Kong 2 Literature<BR>Hong Kong 2 Advertisement<BR>Hong Kong 1 Sports<BR>Australia 8 Gifts Premium<BR>Australia 5 Sports<BR><BR>I would like to query it to have result below.<BR>How to query?<BR>(Select only Top 3- based on CountItem DESC)<BR><BR>Country Top1 Top2 Top3 <BR>-----------------------------------------------------<BR>Hong Kong Gifts Premium Literature Advertisement<BR>Australia Gifts Premium Sports -nil-<BR><BR><BR>Pls help.<BR>Thanks<BR>

  2. #2
    Join Date
    Dec 1969

    Default I'm not an expert with SQL, but...

    ...I don&#039;t think you can do what you want. You&#039;ll have to write some ASP to select the top three products and then write them out in columns.<BR><BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts