Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : SQL JOIN syntax in Flex ODBCSearch Forum

Forum Home > FlexODBC - ODBC Driver for DataFlex Embedded DBMS > FlexODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 SQL JOIN syntax in Flex ODBC 
 Author   Message 
  Casey 
  
 Group: Members 
 Posts: 1 
 Joined: 2006-07-27 
 Profile
 Posted : 2006-07-27 14:38:30

Hi,
I'm experiencing some problems! I’ve just begun querying my data flex data source, which I’ve set up as a linked server on our MS SQL Server (2000). Simple table SELECTs are working fine, but as soon as I try to perform a JOIN the statement fails with the error below. I’ve checked my syntax against the documentation included with a driver, and it seems spot-on. I’m at a loss!

What I send:
select * from openquery( CBA, 'select apmaster.record_number from apmaster INNER JOIN aptran ON apmaster.number = aptran.apm#  order by record_number')

Error Returned:
Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB provider 'MSDASQL'.
[OLE/DB provider returned message: [Flex/ODBC] Unexpected extra token: JOIN]
OLE DB error trace [OLE/DB Provider 'MSDASQL' ICommandPrepare::Prepare returned 0x80040e14].

... can anyone help point out where I’m going wrong?

Thanks in advance,
Casey.
Casey.raats@moffat.co.nz

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-28 09:23:35

I can't run your queries as I don't have your data, but the standard format goes like this:

SELECT CUSTOMER.NUMBER, ORDERHEA.ORDER_DATE, ORDERHEA.TOTAL,
CUSTOMER.CUSTOMER, ORDERHEA.ORDER_NUMBER
FROM CUSTOMER
INNER JOIN ORDERHEA ON CUSTOMER.NUMBER=ORDERHEA.CUSTOMER_NUMBER
ORDER BY CUSTOMER.CUSTOMER

Try:

select apmaster.record_number
FROM apmaster
INNER JOIN aptran ON apmaster.number = aptran.apm# 
ORDER BY apmaster.record_number

You can also try turning on FlexODBC detail tracing and check what is actually being sent by SQL Server to FlexODBC.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to