Skip to content

SAP Sybase IQ: Long Varchar Generated during View Creation

July 19, 2013

In SAP Sybase IQ 15.2 ESD#2 on Solaris, when creating new columns on views by concatenation of varchar columns of limited size, the new created view column is of long varchar data type by default. The long varchar data type requires special attention when used in some reporting tools.

Let create a table with 2 varchar fields, and derived a view from that table with a new column created by concatenating the 2 varchar fields.

Now, let see the structure of the created view:

As you can see, the new field is of type “long varchar”.

Now, let drop the view and recreate it using the cast function in the view creation statement:

The new column created of type (limited) varchar.

It is a good practice to force the new created columns on views to be of (limited) varchar data type by using the cast function on the view creation statement.







From → SAP IQ

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: