docs.intersystems.com
Home  /  Application Development: Core Topics  /  InterSystems SQL Reference  /  SQL Functions  /  %ODBCIN


InterSystems SQL Reference
%ODBCIN
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


A format-transformation function that returns an expression in Logical format.
Synopsis
%ODBCIN(expression)

%ODBCIN expression
Arguments
expression The expression to be converted.
Description
%ODBCIN returns expression in the Logical format after passing the value through the field or data type’s OdbcToLogical method. The Logical format is the in-memory format of data (the format upon which operations are performed).
%ODBCIN is an InterSystems SQL extension.
For further details on display format options, refer to Data Display Options in the “InterSystems IRIS SQL Basics” chapter of Using InterSystems SQL.
Examples
The following example shows the default display format, the %ODBCIN, and the %ODBCOUT formats for the same field.
SELECT FavoriteColors,%ODBCIN(FavoriteColors) AS InVal,
%ODBCOUT(FavoriteColors) AS OutVal
FROM Sample.Person
The following example uses %ODBCIN in the WHERE clause:
SELECT Name,DOB,%ODBCOUT(DOB) AS Birthdate
FROM Sample.Person
WHERE DOB BETWEEN %ODBCIN('2000-01-01') AND %ODBCIN('2018-01-01') 
See Also
%EXTERNAL, %INTERNAL, %ODBCOUT