I have code that connects from MS Excel to an Oracle Database, queries the DB and returns the results.
Everything barring this one issue is working correctly. There is one column called Service_ID. There are 3 drop down boxes in excel for this, as you may want to query multiple services. E.g. Service1 AND Service2 AND Service3.
I have defined Service_ID as
C.SERVICE_ID || '-' || G.TYPE_ID AS SERVICE_ID
And when I query
C.SERVICE_ID LIKE :cmbSelectServiceType
It finds the service and works as expected. However, trying to look up Service2 and 3 is where I have the issue.
I have tried:
C.SERVICE_ID || '-' || G.TYPE_ID AS SERVICE_ID2
C.SERVICE_ID || '-' || G.TYPE_ID AS SERVICE_ID3
Which doesn't work.
I have tried also in the WHERE (with and without the lines above) cmbSelectService is the name of the dropdown in the Excel GUI:
C.SERVICE_ID LIKE :cmbSelectServiceType
AND C.SERVICE_ID LIKE :cmbSelectServiceType2
AND C.SERVICE_ID LIKE :cmbSelectServiceType3
Obviously, I don't normally work in this field, I'm just helping out and could do with some input.