F
Fie Fie Niles
I have a table with 3 columns: SUBJECT_KEY, TOPIC_KEY, FIELD_KEY, DTEXT .
For example:
SUBJECT_KEY TOPIC_KEY FIELD_KEY DTEXT
100 1 10
Microsoft
100 1 10
Dell
100 1 12
Computer
200 1 10
Compaq
200 1 12
Computer
300 1 10
IBM
I need to create a sql statement from the table so that it returns me
SUBJECT_KEY where (DTEXT = 'Microsoft' or 'Dell')
AND
(DTEXT = 'Computer')
In my example above, the sql statement will return SUBJECT_KEY = 100
Is it possible to create a sql statement to do that, and how ?
Thank you very much.
For example:
SUBJECT_KEY TOPIC_KEY FIELD_KEY DTEXT
100 1 10
Microsoft
100 1 10
Dell
100 1 12
Computer
200 1 10
Compaq
200 1 12
Computer
300 1 10
IBM
I need to create a sql statement from the table so that it returns me
SUBJECT_KEY where (DTEXT = 'Microsoft' or 'Dell')
AND
(DTEXT = 'Computer')
In my example above, the sql statement will return SUBJECT_KEY = 100
Is it possible to create a sql statement to do that, and how ?
Thank you very much.