Re: [SQL] Permissons on database

2001-03-07 Thread Roland Roberts
> "bk" == Boulat Khakimov <[EMAIL PROTECTED]> writes: bk> How do I grant permissions on everything in the selected bk> databes? bk> GRANT doesnt take as on object database name nor does it bk> accept wild chars Attached is some Perl code I wrote long ago to do this. Thi

Re: [SQL] my pgsql error?

2001-03-14 Thread Roland Roberts
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: >> For a moment I thought you could do to_char(now(),'Day DD Month ' >> but you're quite right you need to rtrim() the various pieces. Tom> regression=# select to_char(now()-10,'Day DD Month '); Tom>to_char

Re: [SQL] LIMIT within UNION?

2002-09-12 Thread Roland Roberts
> "Andrew" == Andrew Perrin <[EMAIL PROTECTED]> writes: Andrew> What I've done is to write a script that counts the number Andrew> of eligible exposure candidates: Andrew> SELECT count(*) FROM participants WHERE Andrew> AND typenr=1 Andrew> Then subtract that number (c

Re: [SQL] How to select and result row number??

2002-09-17 Thread Roland Roberts
> "Yudie" == Yudie <[EMAIL PROTECTED]> writes: Yudie> what is the select statement so I can get result records like this Yudie> no cityname Yudie> -- Yudie> 1 NEW YORK Yudie> 2 LOS ANGELES Yudie> 3 HOUSTON Yudie> 4 Yud

Re: [SQL] [GENERAL] CURRENT_TIMESTAMP

2002-09-24 Thread Roland Roberts
> "Martijn" == Martijn van Oosterhout <[EMAIL PROTECTED]> writes: Martijn> Well, what I would suggest is that when you wrap several Martijn> statements into a single transaction with begin/commit, Martijn> the whole lot could be considered a single statement Martijn> (since th

Re: [SQL] [GENERAL] CURRENT_TIMESTAMP

2002-09-24 Thread Roland Roberts
> "Ross" == Ross J Reedstrom <[EMAIL PROTECTED]> writes: Ross> Oh, interesting datapoint. Let me get this clear - on Ross> oracle, the equivalent of: Well, I've never gone off to lunch in the middle, but in Oracle 7, I had transactions which definitely took as much as a few minutes t

Re: [SQL] [GENERAL] CURRENT_TIMESTAMP

2002-09-27 Thread Roland Roberts
SQL> create table rbr_foo (a date); Table created. SQL> begin 2 insert into rbr_foo select sysdate from dual; [...wait about 10 seconds...] 3 insert into rbr_foo select sysdate from dual; 4 end; 5 / PL/SQL procedure successfully completed. SQL> select * from rbr_foo; A --

Re: [SQL] Passing array to PL/SQL and looping

2002-09-28 Thread Roland Roberts
> "Greg" == Greg Johnson <[EMAIL PROTECTED]> writes: Greg> CREATE FUNCTION test_array( ) RETURNS VARCHAR[] AS ' Greg> DECLARE Greg> return_array VARCHAR[]; Greg> BEGIN Greg> return_array[0] := ''test''; Greg> return_array[1] := ''test 1''; Greg> re

Re: [SQL] [GENERAL] arrays

2002-10-01 Thread Roland Roberts
> "Josh" == Josh Berkus <[EMAIL PROTECTED]> writes: Josh> Now, I know at least one person who is using arrays to store Josh> scientific data. However, that data arrives in his lab in Josh> the form of matrices, and is not used for joins or query Josh> criteria beyond a simple