Tables
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Sep 22 01:09:26 CDT 2008
On 9/21/08 10:54 PM, "Bart Pietercil" <bart.pietercil at cognosis.be> wrote:
Hi Bart,
> can you explain a bit more about
>
> CREATE [OR REPLACE] [ {GLOBAL | LOCAL} TEMPORARY] [RAM]
>
> creating tables:
>
> this is what I am looking for
>
> I need a way to convert some csv-string (I take csv but any delimiter
> will do) that I pass as an argument into a stored procedure to be
> converted to an array.
> After some looking and reading I understood that in SQL arrays need to
> be interpreted as tables (no arrays defined in sql).
Yes no arrays, although we have on TODO such field type for future.
> So this makes me think I can use this vector for resolving the problem
>
> 1) sp receives in argument of type string (varchar?) which is in fact
> a list (a,b,a,f,d,r,...)
> 2) string is passed to a function that generates a table (if not
> exists ?) and inserts (after parsing the string) the passed info into
> the table function returns the table id to the calling sp
> sp does a select on the temp table and receives the arguments as a
> cursor and now we are in business.
> I can loop over the arguments.
> The most important question for now is twofold:
> 1) Can I create a 'private' temp table. Private meaning in the same
> scope as connection variables. If not wouldn't that be a good feature
> request ?
GLOBAL | LOCAL -- not works yet.
Always works as GLOBAL now.
Yes of course this is very nice feature.
LOCAL TMP TABLEs in the scope of user connection.
Nice here is that other users do not see your tables.
All users can use the same table name not caring about conflict with other
users.
> Or is this what the LOCAL means in the create table statement (I
> didn't find explanations on global/local temporary and ram based in
> the WIKI)
Yes LOCAL means exactly this. LOCAL for my connection.
> 2) If it can't be private what would be the best type to use ?
Without LOCAL tables, your main trouble is -- provide unique name for this
new tables.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list