While I have looked at different examples on the internet I am having trouble selecting data from multiple tables. I have 2 tables.
1st has 'logUID', 'groupUID' field.
the other
2nd has 'logUID' , 'User ID' , 'LogEntry' , 'LogTypeUID'
What I am trying to accomplish is to get the log entries where the LogUID match each other and return the groupUID field , so I know which group the log was against. When I have tried select’s or joins I seem to be getting one logUID field repeating.
SELECT TOP 10000 [log].[dbo].[Logs].[LogUID], [log].[dbo].[LogGroups].[LogUID], [Weblog].[dbo].[LogGroups].[GroupUID]
FROM [log].[dbo].[LogGroups], [log].[dbo].[Logs] INNER JOIN [log].[dbo].[LogGroups] as LG
ON [log].[dbo].[Logs].[LogUID] = LG.LogUID ;
Any help.
You have the
[LogGroups]table in there twice…FROM table1, table2meanstable1 CROSS JOIN table2So, just change your code to the following…