OPENQUERY

  • How do I use a WHERE clause in an OPENQUERY statment. For example (select * from openquery(server,'select col1,count(*) from test..test_table where col1 = 'I' group by carriermemid'))

    The extra quotes around the I seems to be failing it. How do you specify something in this clause to do that? I tried double quotes but than it treated it as a column

  • Try:

    select * from openquery(server,'select col1,count(*) from test..test_table where col1 = ''I'' group by carriermemid')

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply