Data Types

The Simba Netezza ODBC Driver supports many common data formats, converting between Netezza data types and SQL data types.

Important:

Important:

The maximum size for a record is 65,535 bytes.

The table below lists the supported data type mappings.

Netezza Type Comment SQLType

bigint (int8)

Signed

SQL_BIGINT

boolean (bool)

See Return SQL_BIT as 1/0

SQL_BIT

byteint (int1)

Signed

SQL_TINYINT

char(n)

  • Blank padded
  • Holds latin9 characters
  • n <= 64000

SQL_CHAR

data slice

This is an internal data type.

SQL_SMALLINT

date

  • Supports BCE dates
  • Year must be between 1 and 9999 inclusive

SQL_TYPE_DATE

decimal(p,s)

Alias for numeric

SQL_NUMERIC

double precision (float8)

 

SQL_DOUBLE

integer (int4)

Signed

SQL_INTEGER

interval (timespan)

  • Internally stored as seconds
  • Months are treated as 30 days

SQL_INTERVAL_DAY_TO_SECOND

nchar(n)

  • Blank padded
  • n <= 16000

SQL_WCHAR

numeric(p, s)

  • p between 1 and 38 inclusive
  • s between 0 and p inclusive

SQL_NUMERIC

nvarchar(n)

n <= 16000

SQL_WVARCHAR

real (float4)

 

SQL_REAL

rowid

  • Internal type
  • Returned as Bigint.

SQL_BIGINT

smallint (int2)

Signed

SQL_SMALLINT

st_geometry(n)

n <= 64000

Not supported

time

  • Microsecond precision
  • Does not support seconds > 59

SQL_TYPE_TIME

time with timezone

  • Microsecond precision
  • Time zone must be numeric
  • Offset does not support seconds > 59)

SQL_VARCHAR

timestamp

  • Microsecond precision
  • Does not support seconds > 59

SQL_TYPE_TIMESTAMP

transaction id

  • Internal type
  • Returned as Bigint.

SQL_BIGINT

varbinary(n)

  • n <= 64000
  • Hex literals use x'FFFF' notation

SQL_VARBINARY

varchar(n)

  • Holds latin9 characters
  • n <= 64000

SQL_VARCHAR