Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 15th, 2004, 08:45 AM
Registered User
 
Join Date: May 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Select lot tables...

How can i select a lot of tables in order to do the same command?

For example, i wan to delete a data from 3 tables. The data i wan to delete haf an ID which all the tables haf.
So how to select them all.

Normally we use

Select *
From Table1 Where ............

How aboyt now???

 
Old May 15th, 2004, 09:08 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I think this works:

SELECT * FROM table1, table2, table3 WHERE ....

HTH,

Snib

<><
 
Old May 15th, 2004, 09:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Should be something like this, as I am not sure about what tables you have and from which table the records are to be deleted.

Select A.*
from TableForDelete A, TableRef1 as B, TableRef2 as C
Where A.IDField=B.IDField and A.IDField=C.IDField

The where clause might change depending on the relationship between the tables that are involved.

Hope that helps.
Cheers!

-Vijay G
 
Old May 18th, 2004, 07:07 AM
Registered User
 
Join Date: May 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah....
Tats help.
i settle the problem.
Thaks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Select from Two Tables Problem gaurav_jain2403 SQL Server 2000 2 May 18th, 2006 07:18 AM
list all tables using SELECT Statement rylemer Access 5 March 7th, 2005 08:58 PM
Select to all user tables in db Moueg SQL Server 2000 5 December 13th, 2004 10:56 AM
select from 66 tables using checkboxes - how gilgalbiblewheel Classic ASP Databases 29 August 11th, 2004 12:31 AM
Grant SELECT on multiple tables oidhche SQL Server 2000 3 June 16th, 2003 06:26 PM





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