Advertisement

06.12.2008 at 07:46AM PDT, ID: 23479672
[x]
Attachment Details

Search more than one SQL Server Table

Asked by Mike_Stevens in .Net Editors & IDEs, MS SQL Server

I am wondering if it is possible to search for records in two different SQL Server database tables.  I need to have the ability to search for records using criteria provided by the user.  As an example:  "Return all records FROM tblTable1 and/or tblTable2 where CustID = "ABC"."

The tables that I am searching are both exactly the same except they have different names.   I then need to be able to populate a gridview with the search result.   Is this possible?  Can someone give me examples of how to do this?  Thanks.  I am using vb.net and SQL server 2000.

Start Free Trial
[+][-]06.12.2008 at 07:59AM PDT, ID: 21770178

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .Net Editors & IDEs, MS SQL Server
Sign Up Now!
Solution Provided By: frankytee
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.12.2008 at 08:17AM PDT, ID: 21770426

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.12.2008 at 12:15PM PDT, ID: 21772732

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628