Hi all, I tried searching for a previous example however using the work 'like' gives many, many results
I have a report I've inherited and I'm stuck on a problem. Querying MS SQL Server and I'm trying to get a list of Object_IDs.
Example of table 1
Date_field, object_id, data_field1, data_field2...
20081201, CS4_1_194, 524, 23.....
Example of table 2
Object_ID, Object_Name, Object_Type...
CS4_1_194, 396628@dsm_siemens_hicom, 4
Obviously I can use Object_ID from both tables however the data handed to me includes an extensive list of items, all given with Object_Name instead of Object_ID. What I want to do is find the Object_IDs to build another query.
I know I can
select Object_ID from Table2 where Object_Name like '396628@%'
What is the format if I want to include several of those names? The following error gives me syntax errors.
Select Object_ID from Table2 where Object_Name
like ('396628@%', '396629@%', '396630@%')
Thanks in advance for any help!
I have a report I've inherited and I'm stuck on a problem. Querying MS SQL Server and I'm trying to get a list of Object_IDs.
Example of table 1
Date_field, object_id, data_field1, data_field2...
20081201, CS4_1_194, 524, 23.....
Example of table 2
Object_ID, Object_Name, Object_Type...
CS4_1_194, 396628@dsm_siemens_hicom, 4
Obviously I can use Object_ID from both tables however the data handed to me includes an extensive list of items, all given with Object_Name instead of Object_ID. What I want to do is find the Object_IDs to build another query.
I know I can
select Object_ID from Table2 where Object_Name like '396628@%'
What is the format if I want to include several of those names? The following error gives me syntax errors.
Select Object_ID from Table2 where Object_Name
like ('396628@%', '396629@%', '396630@%')
Thanks in advance for any help!