all groups > sql server programming > june 2005 >
You're in the

sql server programming

group:

Can i join the same table with different aliases?


Can i join the same table with different aliases? Soumya S
6/21/2005 11:54:41 PM
sql server programming:
Can i join the same table with different aliases?
Plz refer the below query....

SELECT
STVendorShipToCountry.StoreVersionId AS StoreVersionId,
STVendorShipToCountry.VendorId AS VendorId,
STVendorShipToCountry.CountryCode AS CountryCode,
PVendor.VendorName AS VendorName,
P1.LocaleValue AS CountryName,
P2.LocaleValue AS CartText,
STVendorShipToCountry.CustomerServiceURL AS CustomerServiceURL,
P3.LocaleValue AS CustomerServiceText,
P4.LocaleValue AS CustomerServicePrintReceiptText,
P5.LocaleValue AS VATTaxChargeLineLabel,
STVendorShipToCountry.ShiptoCountryVATConfigFlag AS
ShiptoCountryVATConfigFlag
FROM STVendorShipToCountry
INNER JOIN PVendor ON PVendor.VendorId = STVendorShipToCountry.VendorId
INNER JOIN PCountry ON PCountry.CountryCode =
STVendorShipToCountry.CountryCode
INNER JOIN PLocalizedValue AS P1 ON P1.PhraseGUID = PCountry.CountryName
INNER JOIN PLocalizedValue AS P2 ON P2.PhraseGUID =
STVendorShipToCountry.CartText
INNER JOIN PLocalizedValue AS P3 ON P3.PhraseGUID =
STVendorShipToCountry.CustomerServiceText
INNER JOIN PLocalizedValue AS P4 ON P4.PhraseGUID =
STVendorShipToCountry.CustomerServicePrintReceiptText
INNER JOIN PLocalizedValue AS P5 ON P5.PhraseGUID =
STVendorShipToCountry.VATTaxChargeLineLabel
--WHERE LocaleCode LIKE 'en-us'


Thanks & Regards,
Soumya.

Re: Can i join the same table with different aliases? Steve
6/22/2005 12:00:00 AM
In news:OhgtEdvdFHA.3048@TK2MSFTNGP12.phx.gbl,
Soumya S <cute_ssoumyaa@rediffmail.com> said:
[quoted text, click to view]

You, you can. Are you having a problem with this?

--
Steve

AddThis Social Bookmark Button