Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

patindex in openquery

Status
Not open for further replies.

reecem

Programmer
Mar 11, 2002
15
0
0
BE
I'm trying to run a query which searches for a - in a field then selects all characters before the -

If I use the patindex in a select statement it works fine but as soon as I use openquery command I cannot get it to work.

Can patindex be used in an openquery statement or is there an alternative command?
 
Are you getting an error? I'm sure you've checked this out on Books-Online, but here it is:

OPENQUERY
Executes the specified pass-through query on the given linked server, which is an OLE DB data source. The OPENQUERY function can be referenced in the FROM clause of a query as though it is a table name. The OPENQUERY function can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement, subject to the capabilities of the OLE DB provider. Although the query may return multiple result sets, OPENQUERY returns only the first one.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top