AndyMcDonald
Programmer
Hi,
I'm working on a problem where we use the same SQL SELECT statement to create a normalised view of three tables (called "JOBS", "EXTRA" and "JOBSETTINGS"). All three tables use "UniqueJobCode" as their key.
The SQL statement we are using is:
SELECT * FROM ([JOBS] INNER JOIN [EXTRA] ON
[JOBS].[UniqueJobCode] = [EXTRA].[UniqueJobCode])
INNER JOIN [JOBSETTINGS] ON
[JOBS].[UniqueJobCode] = [JOBSETTINGS].[UniqueJobCode]
This query works fine, except:-
When I run the query connected to an Access database, the normalised table contains three entries called [JOBS.UniqueJobCode], [EXTRA.UniqueJobCode] and [JOBSETTINGS].UniqueJobCode whereas if I run the query connected to an SQL Server based database (of exactly the same structure) I get three entries called [UniqueJobCode], [UniqueJobCode1] and [UniqueJobCode2].
I would "code round" this problem except that I would rather get to the bottom of it to ensure that it isn't causing me problems elsewhere.
Thanks,
Andy
I'm working on a problem where we use the same SQL SELECT statement to create a normalised view of three tables (called "JOBS", "EXTRA" and "JOBSETTINGS"). All three tables use "UniqueJobCode" as their key.
The SQL statement we are using is:
SELECT * FROM ([JOBS] INNER JOIN [EXTRA] ON
[JOBS].[UniqueJobCode] = [EXTRA].[UniqueJobCode])
INNER JOIN [JOBSETTINGS] ON
[JOBS].[UniqueJobCode] = [JOBSETTINGS].[UniqueJobCode]
This query works fine, except:-
When I run the query connected to an Access database, the normalised table contains three entries called [JOBS.UniqueJobCode], [EXTRA.UniqueJobCode] and [JOBSETTINGS].UniqueJobCode whereas if I run the query connected to an SQL Server based database (of exactly the same structure) I get three entries called [UniqueJobCode], [UniqueJobCode1] and [UniqueJobCode2].
I would "code round" this problem except that I would rather get to the bottom of it to ensure that it isn't causing me problems elsewhere.
Thanks,
Andy