I'm in the process of converting my VB app from Access 2000 to MSDE 1.0 (SQL Server 7). I've been modifying the queries as necessary, but have one question for which I can't seem to find an answer. Here's a query example:
SELECT E1.EmpNo, E2.EmpNo
FROM (Trxn_Mast AS TM
LEFT JOIN Employee AS E1 ON TM.EmpID1 = E1.ID)
LEFT JOIN Employee AS E2 ON TM.EmpID2 = E2.ID
WHERE TM.ID = 1323
In Access, the result set returns field names [E1.EmpNo] and [E2.EmpNo], but SQL returns [EmpNo] and [Column0]. Is there any way for SQL to "auto-alias" using the format [TABLE_NAME.FIELD_NAME]? This would greatly reduce the coding changes on many queries. Thanks in advance.
SELECT E1.EmpNo, E2.EmpNo
FROM (Trxn_Mast AS TM
LEFT JOIN Employee AS E1 ON TM.EmpID1 = E1.ID)
LEFT JOIN Employee AS E2 ON TM.EmpID2 = E2.ID
WHERE TM.ID = 1323
In Access, the result set returns field names [E1.EmpNo] and [E2.EmpNo], but SQL returns [EmpNo] and [Column0]. Is there any way for SQL to "auto-alias" using the format [TABLE_NAME.FIELD_NAME]? This would greatly reduce the coding changes on many queries. Thanks in advance.