Please enable JavaScript to view this site.

ESL Documentation

Inquiry Command

Return the data type of columns in a result table.

types SELECT_STATEMENT 

SELECT_STATEMENT 

A TRANSACT_SQL select statement.

Description

This command causes the SQL executable to parse the select statement and deliver an informational message describing the SQL data type of each column that will appear in the result table. The message has the form:

INFO_STRING TYPE1 TYPE2 ... TYPEn
 

The type strings delivered are as follows: This command is useful for preventing user-entered SQL commands from being executed if the SQL Executable cannot handle a returned type (for example, binary data).

SQL Server

DB/2

ORACLE

ODBC

int

date

date

char

smallint

time

number

widechar

tinyint

timestamp

raw

numeric

float

varchar

varchar

varchar

char

longvar

longraw

widevarchar

text

char

char

longvarchar

binary

float

long

widelongvarchar

bit

integer

 

decimal

money

smallint

 

integer

datetime

graphic

 

smallinteger

 

vargraph

 

biginteger

 

longraph

 

tinyinteger

 

 

 

float

 

 

 

real

 

 

 

double

 

 

 

datetime

 

 

 

date

 

 

 

time

 

 

 

timestamp

 

 

 

guid

 

 

 

interval

 

 

 

bit

 

 

 

binary

 

 

 

varbinary

 

 

 

longvarbinary

 

 

 

unknown

Example

response to Types
   send "types select * from org\n" to SQL
   begin guarded

      response to line "INFO: " from SQL
         add to TypesWindow
            insert input
      leave block
   end