Knowledgebase
[QODBC-Desktop] How to use SQL functions in QODBC
Posted by Rajendra Dewani (QODBC Support) on 14 April 2014 04:01 PM

QODBC does support standard SQL queries, but the function is implemented differently.

Please refer to the below functions & try to execute them in QODBC Test Tool.

Functions in Select Query:

You can use distinct like:

SELECT DISTINCT CustomerRefFullName FROM InvoiceLine

Please refer to the below article for more information:
QODBC Function-List

You can use SubQuery in QODBC like:
SELECT * from customer WHERE TimeModified IN (SELECT TimeModified from customer WHERE TimeCreated < {ts '2007-06-17 00:00:00.000'})

Functions in Update Query:

You can Replace functions in the Update query like:

UPDATE TableName SET ColumnName = {fn REPLACE("ColumnName",'ValueToFind','ValueToReplace')} WHERE (condition)

For Example:

UPDATE Invoice SET RefNumber = {fn REPLACE("RefNumber",'71047','0777')} WHERE (TxnDate>{d '2012-12-31'})

You can change the table name & column name as per your requirement.

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).