Re: [SQL] weird SQL statement question

2005-04-23 Thread Mischa Sandberg
Quoting Frank Bax <[EMAIL PROTECTED]>: > At 01:55 PM 4/23/05, Tadej Kanizar wrote: > > >Ok, so I installed the latest version of Postresql (8.02) on a WinXP > SP2 > >machine.. > > > >My question is why won't the statement SELECT * FROM table work, > whereas > >the statement SELECT *

Re: [SQL] How to select from many database ??

2005-04-23 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (Art - Feping) was seen spray-painting on a wall: > i want to select from many databases, for example , i want to select table > master in database A, and table master in database B. > can i do it like this : " select * from A.Master, B.Master " just like > in SQL Serv

Re: [SQL] weird SQL statement question

2005-04-23 Thread Frank Bax
At 01:55 PM 4/23/05, Tadej Kanizar wrote: Ok, so I installed the latest version of Postresql (8.02) on a WinXP SP2 machine.. My question is why won't the statement SELECT * FROM table work, whereas the statement SELECT * FROM »table« works! And, to explain a bit more, here's another example: IN

Re: [SQL] can a function return a virtual table?

2005-04-23 Thread Josh Berkus
Kai, > It would be much nicer to have to write something like: SELECT xyz, abc > FROM active(tablex); where the function 'active(x)' returns a virtual > table with all entries from table x where status is > -1. But sadly I > have no idea how write such a function. Good old O'reilly can't help (or

[SQL] weird SQL statement question

2005-04-23 Thread Tadej Kanizar
Ok, so I installed the latest version of Postresql (8.02) on a WinXP SP2 machine.. My question is why won't the statement SELECT * FROM table work, whereas the statement SELECT * FROM »table« works! And, to explain a bit more, here's another example: INSERT INTO TestTable (Name, Surname

Re: [despammed] [SQL] Insert psql commands inside a script

2005-04-23 Thread Geoffrey
Michael Fuhr wrote: On Sat, Apr 23, 2005 at 08:15:48AM -0400, Geoffrey wrote: Or you can do the following: psql database < sqlcode where sqlcode contains your sql. That command redirects the standard input from the file named sqlcode; the requirement says NOT to use an external file. My bad, I mis

Re: [despammed] [SQL] Insert psql commands inside a script

2005-04-23 Thread Michael Fuhr
On Sat, Apr 23, 2005 at 08:15:48AM -0400, Geoffrey wrote: > > Or you can do the following: > > psql database < sqlcode > > where sqlcode contains your sql. That command redirects the standard input from the file named sqlcode; the requirement says NOT to use an external file. -- Michael Fuhr

Re: [despammed] [SQL] Insert psql commands inside a script

2005-04-23 Thread Geoffrey
Andreas Kretschmer wrote: am 21.04.2005, um 17:19:23 -0500 mailte Letnes, David G. folgendes: I have used the psql -f /tmp/SelectCommands.sql before, but now I want to put the sql statement right in the shell script. I haven't had any luck. Is there a command I can use that will not point to a

Re: [SQL] Looking for a way to sum integer arrays....

2005-04-23 Thread Sean Davis
You would definitely want to look into using pl/R for this. Also, other procedure languages (perl, for example) work well with arrays so may be easier to use for this situation. As for the aggregate, I don't know how to make that more dynamic in terms of return value. Sean - Original Mess