Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread Processing a memofield/stringlist in a script
Tue, May 27 2008 4:18 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

What's the best way of passing in a stringlist to a script and processing it line by line?  My current thoughts are to declare an extra VARCHAR and parse the stringlist into it extracting each line in turn using #13#10 as a delimiter for POS and SUBSTRING.

Roy Lambert
Tue, May 27 2008 6:33 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Roy,

You could use a CLOB instead. With varchar you are limited to small
stringlists.
Or, (I don't know if this aplyes to what you need)  use a memory table with
a single varchar column - one row for each string.

--
Fernando Dias
[Team Elevate]

Tue, May 27 2008 7:20 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando

>You could use a CLOB instead. With varchar you are limited to small
>stringlists.

Not according to Tim you're not - I was using a CLOB and he recommended a VARCHAR.

>Or, (I don't know if this aplyes to what you need) use a memory table with
>a single varchar column - one row for each string.

Interesting, not sure how to pass that in, plus not massively easy to use by comparison with a VARCHAR.

Roy Lambert
Tue, May 27 2008 7:39 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Roy,

> Not according to Tim you're not - I was using a CLOB and he recommended a
> VARCHAR.
I didn't know that. I was convinced varchar was limited to 512 characters
but if it isn't, then great.

> Interesting, not sure how to pass that in, plus not massively easy to use
> by comparison with a VARCHAR.
Well, I was not thinking of "passing the table in" - just open it, use it
and then drop it. I'm assuming the table was generated before by another
script, procedure, or whatever...
I agree it's not easy to use, I only thought it can be an alternative if
stringlists can be very large.

--
Fernando Dias
[Team Elevate]






Tue, May 27 2008 9:39 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Fernando,

<< I didn't know that. I was convinced varchar was limited to 512 characters
but if it isn't, then great. >>

Yep.  CHARs and VARCHARs as parameters or variables can be declared without
a length and have a length limit of High(Integer), just like a Delphi
string.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, May 27 2008 10:13 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

But do you have any suggestions for processing a stringlist?


Roy Lambert
Tue, May 27 2008 12:24 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Tim,

> Yep.  CHARs and VARCHARs as parameters or variables can be declared without
> a length and have a length limit of High(Integer), just like a Delphi
> string.

That's great news! I knew they can be declared without a length, but
thought the implicit max length was 512. Thank you.
Roy, I'm sorry I was pointing you a to wrong direction Smiley.

--
Fernando Dias
[Team Elevate]
Wed, May 28 2008 2:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando


Don't worry, until Tim corrected me I had the same opinion.
Roy Lambert
Wed, May 28 2008 12:02 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< But do you have any suggestions for processing a stringlist? >>

What you originally suggested is the correct solution.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image