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 : What System Functions can be used with QODBC?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
 What System Functions can be used with QODBC? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-21 11:26:00
QODBC System Functions

CONVERT(value_exp, data_type) - The function returns the value specified by value_exp converted to the specified data_type, where data_type is one of the following keywords:

SQL_BIGINT, SQL_BINARY, SQL_BIT, SQL_CHAR, SQL_DATE, SQL_DECIMAL, SQL_DOUBLE, SQL_FLOAT, SQL_INTEGER, SQL_LONGVARBINARY, SQL_LONGVARCHAR, SQL_NUMERIC, SQL_REAL, SQL_SMALLINT, SQL_TIME, SQL_TIMESTAMP, SQL_TINYINT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, SQL_VARBINARY, SQL_VARCHAR

Example:

SELECT ('0'+ {fn CONVERT(Id, SQL_VARCHAR)}) AS "IDString" From Company

Returns:

IDString

01

DATABASE() – Returns the name of the database in use at the time this function is called.

Example:

SELECT {fn DATABASE()} AS "OpenDatabase" FROM Company

Returns:

OpenDatabase

C:\Program Files\QODBC Driver for QuickBooks\sample_product-based.qbw

 

IFNULL(exp, value) – If exp is null, value is returned. If exp is not null, exp is returned. The possible data type(s) of value must be compatible with the data type of exp.

Example:

Select Name, {fn IFNULL(Fax, 'Missing Fax')} as "FixedFax" from Employee

Returns:

Name

FixedFax

Dan T. Miller

Missing Fax

Elizabeth N. Mason

480-134-1122

Gregg O. Schneider

Missing Fax

 

USER() – Returns the user’s authorization name. This value is not used by QODBC but will return the value passed in on the connection string.

Example:

SELECT {fn USER()} AS "CurUser" FROM Company

Returns:

CurUser

TestUser

 
For more functions click here.

 

  Top 
 New Topic 
 
 Post Reply 

Jump to