I am creating a query with the following spects.
BT_ID = Member ID
BT_IDCompanyName = Company Name
ST_ID = Member ID
ST_IDCompanyName = Company Name
The query pulls the Advertiser and Advertising Agencies, If the member advertise directly with us the BT_ID and ST_ID will be the same including CompanyName===
but if it comes thru an Advertising Agency the BT_ID is assigned to the Agency and ST_ID is assigned to the Member(Advertiser).
I wrote the following
Select o.ST_ID,n.Company,o.BT_ID, n.Company
FROM name AS n INNER JOIN orders AS o
ON n.ST_ID = o.ST_ID
The problems is when o.ST_ID is different than o.BT_ID the company name remains the same. Canyou please assist.
Regards,
Jimmy
BT_ID = Member ID
BT_IDCompanyName = Company Name
ST_ID = Member ID
ST_IDCompanyName = Company Name
The query pulls the Advertiser and Advertising Agencies, If the member advertise directly with us the BT_ID and ST_ID will be the same including CompanyName===
but if it comes thru an Advertising Agency the BT_ID is assigned to the Agency and ST_ID is assigned to the Member(Advertiser).
I wrote the following
Select o.ST_ID,n.Company,o.BT_ID, n.Company
FROM name AS n INNER JOIN orders AS o
ON n.ST_ID = o.ST_ID
The problems is when o.ST_ID is different than o.BT_ID the company name remains the same. Canyou please assist.
Regards,
Jimmy