ODBC Driver for Microsoft Bing

Build 22.0.8462

SQL Functions

The driver provides functions that are similar to those that are available with most standard databases. These functions are implemented in the CData provider engine and thus are available across all data sources with the same consistent API. Three categories of functions are available: string, date, and math.

The driver interprets all SQL function inputs as either strings or column identifiers, so you need to escape all literals as strings, with single quotes. For example, contrast the SQL Server syntax and driver syntax for the DATENAME function:

  • SQL Server:
  • driver:

String Functions

These functions perform string manipulations and return a string value. See STRING Functions for more details.

SELECT CONCAT(firstname, space(4), lastname) FROM WebSearch WHERE SearchTerms = 'Microsoft'

Date Functions

These functions perform date and date time manipulations. See DATE Functions for more details.

SELECT CURRENT_TIMESTAMP() FROM WebSearch WHERE SearchTerms = 'Microsoft'

Math Functions

These functions provide mathematical operations. See MATH Functions for more details.

SELECT RAND() FROM WebSearch WHERE SearchTerms = 'Microsoft'

Function Parameters and Nesting SQL Functions

The driver supports column names, constants, and results of other functions as parameters to functions. The following are all valid uses of SQL functions:

', Title,'

') FROM WebSearch WHERE SearchTerms = 'Microsoft'

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462