CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 change ORDER BY when using custom SQL

Print topic Send  topic

Author Message
Paul
Posted: 03/15/2002, 3:10 AM

I am using the following custom SQL:

SELECT contact.*, location.*
FROM contact, location
WHERE contact.location_id = location.location_id AND contact.country_id = " & GetCountry & "

How do i display these in alphabetical order by "location"

Thanks in advance
Alex Alexapolsky
Posted: 03/15/2002, 4:54 AM

This depends on by what column in location table you want to sort , ot coulbe
be like this :

SELECT contact.*, location.*
FROM contact, location
WHERE contact.location_id = location.location_id AND contact.country_id = " & GetCountry & " ORDER BY location.name" & "

Paul
Posted: 03/15/2002, 5:11 AM

Alex

I tried your code:
SELECT contact.*, location.*
FROM contact, location
WHERE contact.location_id = location.location_id AND contact.country_id = " & GetCountry & " ORDER BY location.location" & "

but it just seems to error! any ideas? what am i doing wrong?

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.