Pass Through Query Problem

G

gumby

SELECT DISTINCT
CREATED,
INS_PRODUCT,
FROM dbo.S_SRV_REQ
WHERE (INS_PRODUCT = 'Data Compromise') AND (CREATED >
CONVERT(DATETIME, '2006-08-07 00:00:00', 102))


I am trying to query a database on a SQL server. I am unable to link it
because the tables has to many indexes.

I have also tried

SELECT CREATED, INS_PRODUCT
FROM dbo.S_SRV_REQ
WHERE (INS_PRODUCT = 'Data Compromise') AND (CREATED >
CONVERT(DATETIME, '2006-08-07 00:00:00', 102))


In the properties for the Pass through query I have this Connect Str.

ODBC;DSN=SQL SERVER
NAME;Description=OSCAR;UID=UserName;PWD=Password;DATABASE=Pubs


I am getting a error ODBC Call failure.Inccorect snytax near the key
word FROM.

Please help, thanks -
 
G

gumby

I got this to work, but I would like to only return a couple of fields.


SELECT *
FROM S_SRV_REQ
WHERE (INS_PRODUCT = 'Data Compromise') AND (CREATED >
CONVERT(DATETIME, '2006-08-07 00:00:00', 102))

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top