Skip to Content

Hi,

As you know SAP Sybase IQ does not support the Adaptive Server data types UNIVARCHAR.

But You can get the univarchar data from ASE using insert location statement.


Here are steps to get the univarchar data.


[In ASE]

  1> create table univarchar_test(c1 univarchar(100))

  2> go

  1> insert into univarchar_test values(‘univarchar test’)

  2> go

  (1 row affected)

  1> select * from univarchar_test

  2> go

  c1

  —————————————————————————–

  0x0075006e0069007600610072006300680061007200200074006500730074

[IN IQ]

1) create the interfaces file for insert location.

  /work/gjang_home>cat interfaces

  ASE1570

          master tcp ether sybibm-ce1 1570

          query tcp ether sybibm-ce1 1570

2) If the user is different from ASE, create extern login and server as follows.

  CREATE SERVER ASE1570 class ‘ASEODBC’ USING ‘sybibm-ce1:1570’;

  create externlogin DBA to ASE1570 remote login sa identified by ” ;

3) Create table for univarchar table.

  create table univarchar_test(c1 varchar(100))

4) Get the univarchar data from ASE using insert location.

  insert univarchar_test location ‘ASE1570.master’ { SELECT * FROM univarchar_test};

  select * from univarchar_test;

 
  [c1]

  univarchar test

Best Regards,

Gi-Sung Jang

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Volker Stöffler

    Hi,

    correct me if I’m wrong, but afaik this requires the character set / encoding of the IQ database to be able to represent all characters present in the univarchar column. This could be a single byte character set matching the ASCII characters 128 and above or Unicode (for all [var]char columns in the database) to be safe.

    Thanks & regards

    Volker

    (0) 

Leave a Reply