dbTalk Databases Forums  

Windows client, and Tokenization in (Sybase) T-SQL.

comp.databases.sybase comp.databases.sybase


Discuss Windows client, and Tokenization in (Sybase) T-SQL. in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alex Berryhill
 
Posts: n/a

Default Windows client, and Tokenization in (Sybase) T-SQL. - 04-12-2004 , 04:07 AM






Hi,

Greetings from a Sybase n00b.

I'm faced with two problems here and would deeply appreciate if anyone
could comment on these.

1) The first is an admin-type problem. I have installed the ASE 12.5.1
on a Linux machine, but would like to be able to access the db from a
Windows machine. I was told this was possible by installing a
Windows-version client, but alas, haven't been able to find such a
tool even after much searching on the Sybase website. Would it be
possible for someone to kindly point me towards such a client?

(I did come across the OpenClient Windows version, but am not sure if
this is what I should be looking for; the download size is, I must
note, 506 MB, a size that seems highly unlikely for a presumably
lightweight, Java-based client)

2) The second problem is more to do with T-SQL than with Sybase
installation doles, and is as follows. I am given a set of string
records, where the column entries are seperated by spaces. That is, if
the input string is 'abcde a1 b2 c3 d4', the values 'abcde', 'a1',
'b2', 'c3' and 'd4' would have to be inserted into their respective
columns.

I have a Java/C# background and was wondering: is there any easy way
of, perhaps, tokenizing a string into distinct varchar values like we
do in, say, Java (I'm referring to API tools such as the
StringTokenizer class)? If not, what is the best way to go about
solving this problem?

Thanks for your help!

Alex Berryhill

Reply With Quote
  #2  
Old   
Michael Peppler
 
Posts: n/a

Default Re: Windows client, and Tokenization in (Sybase) T-SQL. - 04-12-2004 , 10:16 AM






On Mon, 12 Apr 2004 02:07:40 -0700, Alex Berryhill wrote:

Quote:
Hi,

Greetings from a Sybase n00b.

I'm faced with two problems here and would deeply appreciate if anyone
could comment on these.

1) The first is an admin-type problem. I have installed the ASE 12.5.1 on
a Linux machine, but would like to be able to access the db from a Windows
machine. I was told this was possible by installing a Windows-version
client, but alas, haven't been able to find such a tool even after much
searching on the Sybase website. Would it be possible for someone to
kindly point me towards such a client?
I don't know if the client is available separately for free. What you
*can* do is download the 12.5.1 dev edition for Windows, which of course
includes the run-time client.

Quote:
2) The second problem is more to do with T-SQL than with Sybase
installation doles, and is as follows. I am given a set of string
records, where the column entries are seperated by spaces. That is, if
the input string is 'abcde a1 b2 c3 d4', the values 'abcde', 'a1', 'b2',
'c3' and 'd4' would have to be inserted into their respective columns.
Do you have to do this in T-SQL, or in a client app?

There's no tokenizer in T-SQL, but a while loop with a combination of
subtring(), charindex() and stuff() should do it.

Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler (AT) peppler (DOT) org http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.peppler.org/resume.html



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.