Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

uniqueidentifier

4 posts in General Discussion Last posting was on 2003-09-09 20:29:25.0Z
VBM Posted on 2003-08-14 20:38:30.0Z
From: "VBM" <legendnews@lycos.co.uk>
Newsgroups: ianywhere.public.general
Subject: uniqueidentifier
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 12.25.165.67
X-Original-NNTP-Posting-Host: 12.25.165.67
Message-ID: <3f3bf346$1@forums-1-dub>
Date: 14 Aug 2003 13:38:30 -0700
X-Trace: forums-1-dub 1060893510 12.25.165.67 (14 Aug 2003 13:38:30 -0700)
X-Original-Trace: 14 Aug 2003 13:38:30 -0700, 12.25.165.67
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1611
Article PK: 3840

I am exporting from SQL Server to Sybase Anywhere DSN
whats happening is that in SQL Server the value for the uniqueidentifier is
say

{E1C55403-969C-4D36-BA1E-5F9AE97EF0B5}

when I export this with datatype char(36) in sybase I get the data value as

{E1C55403-969C-4D36-BA1E-5F9AE97EF0B

note the last 2 chars "5}" is missing

I am really confused if { } are part of data or just used as display
purpose, if its just display purpose then why SQL server is trying to export
that alongwith the data (i.e. {} curely braces). How can I export from SQL
Server without thses curely braces and get just uid string (dashes are ok in
between the UID string) how to work on this

any tips

thanks


Greg Fenton Posted on 2003-08-15 18:12:06.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4; MultiZilla v1.4.0.4A) Gecko/20030624
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: uniqueidentifier
References: <3f3bf346$1@forums-1-dub>
In-Reply-To: <3f3bf346$1@forums-1-dub>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: gfenton-xp.sybase.com
X-Original-NNTP-Posting-Host: gfenton-xp.sybase.com
Message-ID: <3f3d2276$1@forums-1-dub>
Date: 15 Aug 2003 11:12:06 -0700
X-Trace: forums-1-dub 1060971126 172.31.140.253 (15 Aug 2003 11:12:06 -0700)
X-Original-Trace: 15 Aug 2003 11:12:06 -0700, gfenton-xp.sybase.com
Lines: 42
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1614
Article PK: 3843


VBM wrote:
>
> I am really confused if { } are part of data or just used as display
> purpose, if its just display purpose then why SQL server is trying to export
> that alongwith the data (i.e. {} curely braces). How can I export from SQL
> Server without thses curely braces and get just uid string (dashes are ok in
> between the UID string) how to work on this
>

Please always post the version and build number of ASA that you are
using in each article (dbeng7 -v). I see from a previous thread that
you are using ASA 7.0.4.

Realize that a UUID is really just a binary value. The "{E1C55403-...}"
is a "nice" view of the binary data; it is a string representation of
the binary bytes. The "{}" are not part of the binary data. It appears
that your export from MSSQL is a text export, so the data is being
dumped as nice strings instead of binary muck.

Given your current goal of migrating UUIDs from MSSQL to ASA 7.0.4,
personally I'd do the following:

- Register for the SQLAnywhere Studio Developer Edition 9
http://www.ianywhere.com/developeredition
- Using ASA 9.0, do a database migration from MSSQL to a new ASA 9.0
database
- unload the table(s) in question
- reload them into your ASA 7.0.4 table(s)

You may have to do a bit of massaging of the reload.sql file to get the
syntax correct for 7.0.4, but I suspect that it will just work as is.

Give that a try and let us know how it goes,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


Breck Carter [TeamSybase] Posted on 2003-08-16 14:43:00.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: uniqueidentifier
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <rdgsjvkbc1m1098cudgjhn2rma71e2pr9r@4ax.com>
References: <3f3bf346$1@forums-1-dub>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
X-Original-Trace: 16 Aug 2003 07:43:12 -0700, bcarter.sentex.ca
Lines: 42
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Aug 2003 07:42:37 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Aug 2003 07:43:00 -0700
X-Trace: forums-1-dub 1061044980 10.22.108.75 (16 Aug 2003 07:43:00 -0700)
X-Original-Trace: 16 Aug 2003 07:43:00 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1619
Article PK: 3845

...or you could just store the "pretty" values in a char(38) column
and figure out what to do with them later.

One possibility is to use a combination of HEXTOINT() and CHAR() calls
to convert each significant two-character hex value into a single
byte, and store that byte into the appropriate position in a
BINARY(16) column which would then be upward-compatible with ASA 8.0.2
and 9. A CREATE FUNCTION could be used to do this, in a single UPDATE
statement. If you are interested, just ask for more details :)

Breck

On 14 Aug 2003 13:38:30 -0700, "VBM" <legendnews@lycos.co.uk> wrote:

>I am exporting from SQL Server to Sybase Anywhere DSN
>whats happening is that in SQL Server the value for the uniqueidentifier is
>say
>
>{E1C55403-969C-4D36-BA1E-5F9AE97EF0B5}
>
>when I export this with datatype char(36) in sybase I get the data value as
>
>{E1C55403-969C-4D36-BA1E-5F9AE97EF0B
>
>note the last 2 chars "5}" is missing
>
>I am really confused if { } are part of data or just used as display
>purpose, if its just display purpose then why SQL server is trying to export
>that alongwith the data (i.e. {} curely braces). How can I export from SQL
>Server without thses curely braces and get just uid string (dashes are ok in
>between the UID string) how to work on this
>
>any tips
>
>thanks
>
>

bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
http://www.risingroad.com


VBM Posted on 2003-09-09 20:29:25.0Z
From: "VBM" <legendnews@lycos.co.uk>
Newsgroups: ianywhere.public.general
References: <3f3bf346$1@forums-1-dub> <rdgsjvkbc1m1098cudgjhn2rma71e2pr9r@4ax.com>
Subject: Re: uniqueidentifier
Lines: 57
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 12.25.165.67
X-Original-NNTP-Posting-Host: 12.25.165.67
Message-ID: <3f5e3825$1@forums-1-dub>
Date: 9 Sep 2003 13:29:25 -0700
X-Trace: forums-1-dub 1063139365 12.25.165.67 (9 Sep 2003 13:29:25 -0700)
X-Original-Trace: 9 Sep 2003 13:29:25 -0700, 12.25.165.67
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1728
Article PK: 3949

Simple soultion I did like this

changed the SQL server datatype from uniqueidentifier to char(36) ..exported
the SQL Server table to ASA DSN
Solved the problem...

reverted back the datatype to uniqueidentifier in SQL server

cheers !

Breck Carter [TeamSybase] wrote:
> ...or you could just store the "pretty" values in a char(38) column
> and figure out what to do with them later.
>
> One possibility is to use a combination of HEXTOINT() and CHAR() calls
> to convert each significant two-character hex value into a single
> byte, and store that byte into the appropriate position in a
> BINARY(16) column which would then be upward-compatible with ASA 8.0.2
> and 9. A CREATE FUNCTION could be used to do this, in a single UPDATE
> statement. If you are interested, just ask for more details :)
>
> Breck
>
>
> On 14 Aug 2003 13:38:30 -0700, "VBM" <legendnews@lycos.co.uk> wrote:
>
>> I am exporting from SQL Server to Sybase Anywhere DSN
>> whats happening is that in SQL Server the value for the
>> uniqueidentifier is say
>>
>> {E1C55403-969C-4D36-BA1E-5F9AE97EF0B5}
>>
>> when I export this with datatype char(36) in sybase I get the data
>> value as
>>
>> {E1C55403-969C-4D36-BA1E-5F9AE97EF0B
>>
>> note the last 2 chars "5}" is missing
>>
>> I am really confused if { } are part of data or just used as display
>> purpose, if its just display purpose then why SQL server is trying
>> to export that alongwith the data (i.e. {} curely braces). How can I
>> export from SQL Server without thses curely braces and get just uid
>> string (dashes are ok in between the UID string) how to work on this
>>
>> any tips
>>
>> thanks
>>
>>
>
> bcarter@risingroad.com
> Mobile and Distributed Enterprise Database Applications
> http://www.risingroad.com