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 below functions & try to execute it in VB Demo application.

Functions in Select Query:

You can use distinct like:

SELECT DISTINCT CustomerRefFullName FROM InvoiceLine

Please refer 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 function in 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 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).