hi,
i have two tables
Program Information:
ID Group ...
AAA 1
AA2 2
AA1 1
Environment:
ID DevEnvDescription TargetEnvDescription ...
AAA Some text here More text here
AA2 text in here some text
AA1 description description
The ID's in the two tables are the same. I want to find a distinct ID that belongs to group 2 and contains a certain word in DevEnvDescription or TargtEnvDescription. For this example say the word is "text". So i tried a query like this:
This gives me errors with the first ProgramID how can i fix this? Thanks
i have two tables
Program Information:
ID Group ...
AAA 1
AA2 2
AA1 1
Environment:
ID DevEnvDescription TargetEnvDescription ...
AAA Some text here More text here
AA2 text in here some text
AA1 description description
The ID's in the two tables are the same. I want to find a distinct ID that belongs to group 2 and contains a certain word in DevEnvDescription or TargtEnvDescription. For this example say the word is "text". So i tried a query like this:
Code:
SELECT DISTINCT ProgramID FROM [Environment] AS E, [Program Information] AS P WHERE E.ProgramID = P.ProgramID AND( DevEnvDescription LIKE '%text%' OR TargetEnvDescription LIKE '%text%' ) AND Group = 1
This gives me errors with the first ProgramID how can i fix this? Thanks