I need help.
I have a sql table t2 related to two other tables t1 and t3.
t2 has fields:
idFromt3 idFromt1 Value
1 14 text1
2 14 text2
1 44 text1
2 44 text2
3 44 text3
I’m searching for values, where ifFromt3 is missing.
I want to fint in this example, the value ifFromt3 = 3, because of it’s not present.
I’m doing it like this example, but it doesn’t work correctly.
SELECT t3.idFromt3, t3.idFromt1
FROM t3
INNER JOIN t2
ON t3.LanguageMessageCodeID <> t2.idFromt2
This are the 3 tables.
CREATE TABLE [dbo].[t3](
[t3ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) NOT NULL,
)
CREATE TABLE [dbo].[t2](
[t2ID] [int] IDENTITY(1,1) NOT NULL,
[t3ID] [int] NOT NULL,
[t1ID] [int] NOT NULL,
)
CREATE TABLE [dbo].[t1](
[t1ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) NOT NULL,
)
UPDATE:
Tables with data:
http://www.2shared.com/photo/40yY6FC-/Untitled.html
And I need a query, that returns all missing combinations in table LangugageMessageCodes.
In this case:
LanguageMessageCodeID LanguageID
3 14
1 47
2 47
3 47
please. help.
regards.
or
or
Update:
Try this: