Hi Guys
I think I have an easy one for you.
I am currently using the following script to display records from 2 different tables (SQL server 2007) onto my page.
-------------script--------------
sSQL = "SELECT make, model, orderid, picturelink,reg year, engine, transmission, colour, mileage, price, county, vendor FROM TABLE1"
sSQL = sSQL & " UNION"
sSQL = sSQL & " SELECT makeofcar, requiredmodelof car, orderid ,orderid, regyear, vehiclecc, transmission, colour, requiredmiles, requiredcarpric e, yourcounty, terms FROM TABLE2"
sSQL = sSQL & " WHERE paymentReceived = 'X'"
sSQL = sSQL & " ORDER BY orderid"
--------------end--------------
However, I wish to display random records onto my page from both tables.
My database contains thounsands of records. How is this easily acheived in the most efficient way?
Any help would be fully appreciated
Best regards
Rod from the UK
I think I have an easy one for you.
I am currently using the following script to display records from 2 different tables (SQL server 2007) onto my page.
-------------script--------------
sSQL = "SELECT make, model, orderid, picturelink,reg year, engine, transmission, colour, mileage, price, county, vendor FROM TABLE1"
sSQL = sSQL & " UNION"
sSQL = sSQL & " SELECT makeofcar, requiredmodelof car, orderid ,orderid, regyear, vehiclecc, transmission, colour, requiredmiles, requiredcarpric e, yourcounty, terms FROM TABLE2"
sSQL = sSQL & " WHERE paymentReceived = 'X'"
sSQL = sSQL & " ORDER BY orderid"
--------------end--------------
However, I wish to display random records onto my page from both tables.
My database contains thounsands of records. How is this easily acheived in the most efficient way?
Any help would be fully appreciated
Best regards
Rod from the UK
Comment