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.

is this valid in ASA 9.0

6 posts in General Discussion Last posting was on 2003-09-15 19:55:32.0Z
VBM Posted on 2003-09-11 23:31:28.0Z
From: "VBM" <legendnews@lycos.co.uk>
Newsgroups: ianywhere.public.general
Subject: is this valid in ASA 9.0
Lines: 3
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
X-Original-NNTP-Posting-Host: 12.25.165.67
Message-ID: <3f610637$1@forums-2-dub>
X-Original-Trace: 11 Sep 2003 16:33:11 -0700, 12.25.165.67
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 11 Sep 2003 16:28:30 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 11 Sep 2003 16:31:28 -0700
X-Trace: forums-1-dub 1063323088 10.22.108.75 (11 Sep 2003 16:31:28 -0700)
X-Original-Trace: 11 Sep 2003 16:31:28 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1739
Article PK: 3974

set @ACLGUID = cast(@ACLId as uniqueidentifier)


Greg Fenton Posted on 2003-09-12 16:01:32.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: is this valid in ASA 9.0
References: <3f610637$1@forums-2-dub>
In-Reply-To: <3f610637$1@forums-2-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: <3f61eddc@forums-1-dub>
Date: 12 Sep 2003 09:01:32 -0700
X-Trace: forums-1-dub 1063382492 172.31.140.253 (12 Sep 2003 09:01:32 -0700)
X-Original-Trace: 12 Sep 2003 09:01:32 -0700, gfenton-xp.sybase.com
Lines: 37
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1742
Article PK: 3970


VBM wrote:
> set @ACLGUID = cast(@ACLId as uniqueidentifier)
>
>

I believe, though I stand to be corrected, that the above is
syntactically valid, but I question whether it is semantically correct.

The following does not yield any errors:

begin
declare @x int;
declare @y uniqueidentifier;
set @x = 1;
set @y = cast(@x as uniqueidentifier);

message 'y is (' || uuidtostr(@y) || ') and x is (' ||
@x || ')' to client;

end;

But the output is:
y is () and x is (1)


What is it you are trying to accomplish with your line of code? Should
you be looking at the "uuidtostr()" and "strtouuid()" methods?

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


VBM Posted on 2003-09-12 16:57:09.0Z
From: "VBM" <legendnews@lycos.co.uk>
Newsgroups: ianywhere.public.general
References: <3f610637$1@forums-2-dub> <3f61eddc@forums-1-dub>
Subject: Re: is this valid in ASA 9.0
Lines: 58
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
X-Original-NNTP-Posting-Host: 12.25.165.67
Message-ID: <3f61fb53$1@forums-2-dub>
X-Original-Trace: 12 Sep 2003 09:58:59 -0700, 12.25.165.67
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 12 Sep 2003 09:54:09 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 12 Sep 2003 09:57:09 -0700
X-Trace: forums-1-dub 1063385829 10.22.108.75 (12 Sep 2003 09:57:09 -0700)
X-Original-Trace: 12 Sep 2003 09:57:09 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1744
Article PK: 3969

I have SQL Server database with datatypes uniqueidentifier I want to import
that in ASA 9.0 that is not working....

in ASA

declare @x uniqueidentifier
set @x = cast ('E1C55403-969C-4D36-BA1E-5F9AE97EF0B5' as uniqueidentifier)
select @x // the result displaed is 0x45314335353430332d393639432d3444

If I do now

declare @x char(36)
set @x = cast (0x45314335353430332d393639432d3444 as char(36))
select @x // the result displaed is 'E1C55403-969C-4D'

this is not correct why the reverse is not working...and UUID is truncated
.....

Greg Fenton wrote:
> VBM wrote:
>> set @ACLGUID = cast(@ACLId as uniqueidentifier)
>>
>>
>
> I believe, though I stand to be corrected, that the above is
> syntactically valid, but I question whether it is semantically
> correct.
>
> The following does not yield any errors:
>
> begin
> declare @x int;
> declare @y uniqueidentifier;
> set @x = 1;
> set @y = cast(@x as uniqueidentifier);
>
> message 'y is (' || uuidtostr(@y) || ') and x is (' ||
> @x || ')' to client;
>
> end;
>
> But the output is:
> y is () and x is (1)
>
>
> What is it you are trying to accomplish with your line of code?
> Should you be looking at the "uuidtostr()" and "strtouuid()" methods?
>
> greg.fenton


Greg Fenton Posted on 2003-09-12 17:09:31.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: is this valid in ASA 9.0
References: <3f610637$1@forums-2-dub> <3f61eddc@forums-1-dub> <3f61fb53$1@forums-2-dub>
In-Reply-To: <3f61fb53$1@forums-2-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: <3f61fdcb$1@forums-1-dub>
Date: 12 Sep 2003 10:09:31 -0700
X-Trace: forums-1-dub 1063386571 172.31.140.253 (12 Sep 2003 10:09:31 -0700)
X-Original-Trace: 12 Sep 2003 10:09:31 -0700, gfenton-xp.sybase.com
Lines: 35
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1745
Article PK: 3964


VBM wrote:

> I have SQL Server database with datatypes uniqueidentifier I want to import
> that in ASA 9.0 that is not working....
>
> in ASA
>
> declare @x uniqueidentifier
> set @x = cast ('E1C55403-969C-4D36-BA1E-5F9AE97EF0B5' as uniqueidentifier)
> select @x // the result displaed is 0x45314335353430332d393639432d3444
>

As I mentioned in my previous post, I suspect you want to use our
built-in conversion functions.

See the following pages in the ASA 9.0 online docs:

ASA SQL Reference
SQL Functions
Alphabetical list of functions
- STRTOUUID function [STRING]
- UUIDTOSTR function [STRING]

I suspect they are what you are looking for.

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


VBM Posted on 2003-09-12 17:58:08.0Z
From: "VBM" <legendnews@lycos.co.uk>
Newsgroups: ianywhere.public.general
References: <3f610637$1@forums-2-dub> <3f61eddc@forums-1-dub> <3f61fb53$1@forums-2-dub> <3f61fdcb$1@forums-1-dub>
Subject: Re: is this valid in ASA 9.0
Lines: 39
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
X-Original-NNTP-Posting-Host: 12.25.165.67
Message-ID: <3f62099c$1@forums-2-dub>
X-Original-Trace: 12 Sep 2003 10:59:56 -0700, 12.25.165.67
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 12 Sep 2003 10:55:06 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 12 Sep 2003 10:58:08 -0700
X-Trace: forums-1-dub 1063389488 10.22.108.75 (12 Sep 2003 10:58:08 -0700)
X-Original-Trace: 12 Sep 2003 10:58:08 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1746
Article PK: 3995

- whats the best way to import SQL server database into ASA 9.0 which has
dataype uniqueidentifier.
- in my SQL Server store procs I am using cast function will that be
appropriate to use in ASA

thanks

Greg Fenton wrote:
> VBM wrote:
>
>> I have SQL Server database with datatypes uniqueidentifier I want to
>> import that in ASA 9.0 that is not working....
>>
>> in ASA
>>
>> declare @x uniqueidentifier
>> set @x = cast ('E1C55403-969C-4D36-BA1E-5F9AE97EF0B5' as
>> uniqueidentifier) select @x // the result displaed is
>> 0x45314335353430332d393639432d3444
>>
>
> As I mentioned in my previous post, I suspect you want to use our
> built-in conversion functions.
>
> See the following pages in the ASA 9.0 online docs:
>
> ASA SQL Reference
> SQL Functions
> Alphabetical list of functions
> - STRTOUUID function [STRING]
> - UUIDTOSTR function [STRING]
>
> I suspect they are what you are looking for.
>
> Hope this helps,
> greg.fenton


Greg Fenton Posted on 2003-09-15 19:55:32.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: is this valid in ASA 9.0
References: <3f610637$1@forums-2-dub> <3f61eddc@forums-1-dub> <3f61fb53$1@forums-2-dub> <3f61fdcb$1@forums-1-dub> <3f62099c$1@forums-2-dub>
In-Reply-To: <3f62099c$1@forums-2-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: <3f661934$1@forums-1-dub>
Date: 15 Sep 2003 12:55:32 -0700
X-Trace: forums-1-dub 1063655732 172.31.140.253 (15 Sep 2003 12:55:32 -0700)
X-Original-Trace: 15 Sep 2003 12:55:32 -0700, gfenton-xp.sybase.com
Lines: 18
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1751
Article PK: 4009


VBM wrote:
> - whats the best way to import SQL server database into ASA 9.0 which has
> dataype uniqueidentifier.

Have you looked at the Migration Wizard in Sybase Central?
Or you can read abou the "sa_migrate" stored procedure in the online
docs (the Wizard calls this stored procedure).

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/