I have to know the data type of some columns in my table in Sybase ASE. Here is my query
select name from systypes
where type in (39,
47,
39,
39,
106
)
this returns
char
varchar
sysname
nchar
nvarchar
decimaln
longsysname
I was hoping it would return
varchar
char
varchar
varchar
decimaln
why are the results not as expected ? How can i get the proper column types ? I intend to use this information later to create a dynamic query that creates another table.
You need to join systypes to syscolumns on both the type and usertype columns.