Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 23rd, 2005, 10:50 PM
Friend of Wrox
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Anyone Expert in SQL Queries?


My Question is related to SQL Query. Let me explain it using an example.

Suppose an access table having records 001,002,003,004,005

Now what I want to do is using Select Query sort the records in such a way that it first display 004 and then the remaining records
So the list will display something like this


I can only use ONE sql query to sort and display the records in above mentioned format

Thank you,
Zeeshan Ahmed

Old May 24th, 2005, 01:08 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

If you're looking for Sql experts, I think you better ask your question in the Sql forum, and not in the Html forum, don' you think?

Over here, there are just Html experts..... ;)

Old June 3rd, 2005, 09:52 AM
Friend of Wrox
Join Date: May 2005
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts

Select count(*) from "your tab-name" where "fiel-name" <> "004"

...and later on in the script when you want to write the list to the screen, start with 004 (if this is current every time) and then you "response.write" the querry!

Old June 3rd, 2005, 09:57 AM
Friend of Wrox
Join Date: May 2005
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts

ok, I did misunderstand you just a bit! #-) You need to control the cursor to stop by the last record -1! Hmmmm...

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine sql queries snufse SQL Server 2005 16 June 17th, 2008 03:47 PM
Sql Query Expert! itHighway Classic ASP Basics 1 June 5th, 2005 11:00 PM
Anyone Expert in SQL Queries itHighway Classic ASP Basics 2 May 24th, 2005 03:37 AM
pls help SQL Queries sush_blr SQL Server 2000 2 February 1st, 2005 01:56 AM
pls help me to write sql queries sush_blr SQL Language 1 January 28th, 2005 10:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.