To know Table name in Join Query

mmb

Active member
Joined
Aug 1, 2004
Messages
42
Programming Experience
1-3
I have called a Join Query from MS-Access.

Now I want to know the Table name of each column.
If this is possible then HOW?

Urgent help needed.
 
in the join you can find it here:
VB.NET:
 SELECT [color=red]A[/color].BusinessName, [color=red]B[/color].GrandTotal 
FROM tblAccount [color=red]A[/color] INNER JOIN
tblBilling [color=red]B[/color] ON A.ID = B.MainID

if you need it after the join, name them differently:
VB.NET:
SELECT A.BusinessName [color=red]AS tblAccountBusinessName[/color], B.GrandTotal [color=red]AS tblBillingGrandTotal[/color]
FROM tblAccount A INNER JOIN 
tblBilling B ON A.ID = B.MainID
the above statement returns 2 columns. One named tblAccountBusinessName and one named tblBillingGrandTotal

hope that is what you were looking for
 
I Want To Know The Table Names Of Each Column

Thanks for the reply.

But this is not I am looking for. I WANT TO KNOW THE TABLE NAMES OF EACH COLUMN from the Result the join query has put forward.

Help me out pls
 
you need to use my second example. when you do a SQL join, it creates a virtual table. The Result set of the query thinks that all of the fields are from the same table. If you need to keep track of what field is from what original table, rename them to something unique using the AS statement.
 
by metadata u mean like selecting the tables of the join query individually and then comparing/finding the column names ?
 
Back
Top