Hi all 

I'm trying to use OPENQUERY using sequel and I'm always getting syntax 
error 
 

> @db["SELECT * FROM OPENQUERY(\"SQL02.DEV\" , 'SELECT @@version')"].all


*The error is *

Sequel::DatabaseError: TinyTds::Error: Incorrect syntax near 'SQL02.DEV'.
from 
/var/lib/gems/2.7.0/gems/sequel-5.34.0/lib/sequel/adapters/tinytds.rb:217:in 
`fields'
Caused by TinyTds::Error: Incorrect syntax near 'SQL02.DEV'.
from 
/var/lib/gems/2.7.0/gems/sequel-5.34.0/lib/sequel/adapters/tinytds.rb:217:in 
`fields'
Caused by Sequel::DatabaseError: TinyTds::Error: Unclosed quotation mark 
after the character string '''.
from 
/var/lib/gems/2.7.0/gems/sequel-5.34.0/lib/sequel/adapters/tinytds.rb:217:in 
`fields'
Caused by TinyTds::Error: Unclosed quotation mark after the character 
string '''.
from 
/var/lib/gems/2.7.0/gems/sequel-5.34.0/lib/sequel/adapters/tinytds.rb:217:in 
`fields'

I've tried various ways to by changing double-quotes to single-quotes, 
quotes escaping but no luck. 

PS: Queries such as SELECT @@version work well. The issue I'm facing is 
only with OPENQUERY.

-> Sequel::VERSION 
=> 5.34.0


Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/39c61745-d1ef-4bf8-aeb9-943c6deea8f9o%40googlegroups.com.

Reply via email to