I have a basic query in Vbscript SQL:
"SELECT Link_ID, Link_Text FROM tblLinks WHERE Category_ID = "&gParentCategoryID&" ORDER BY Link_Text;"
I wish to change this query so instead of just retrieving records that meet a certain criteria i.e in this case Categoty_ID it retrieves all data from the table however i wish to display those records which meet the criteria of the particular Category_Id to be ordered at the top.
ie. query will look something like this
SELECT Link_ID, Link_Text FROM tblLinks ORDER BYCategory_ID = "&gParentCategoryID&" AND Link_Text;"
I know its an easy one but thanks for your help
do i have to have two select statments if so can i combine them?.
thanks for help to SQL newbie
-Gus
"SELECT Link_ID, Link_Text FROM tblLinks WHERE Category_ID = "&gParentCategoryID&" ORDER BY Link_Text;"
I wish to change this query so instead of just retrieving records that meet a certain criteria i.e in this case Categoty_ID it retrieves all data from the table however i wish to display those records which meet the criteria of the particular Category_Id to be ordered at the top.
ie. query will look something like this
SELECT Link_ID, Link_Text FROM tblLinks ORDER BYCategory_ID = "&gParentCategoryID&" AND Link_Text;"
I know its an easy one but thanks for your help
do i have to have two select statments if so can i combine them?.
thanks for help to SQL newbie
-Gus