Re: [despammed] [SQL] converting varchar to integer

2005-08-17 Thread Kretschmer Andreas
[EMAIL PROTECTED] <[EMAIL PROTECTED]> schrieb: > Hi, > >I have a varchar column, and I need to > >1) check the value in it is an integer >2) get the integer value (as integer) > >The problem is I can't suppose the're only correct >values - ie there can be something like 'xss

Re: [SQL] pgdump by schema?

2005-02-02 Thread Kretschmer Andreas
am Wed, dem 02.02.2005, um 9:33:22 -0600 mailte Bradley Miller folgendes: > Is there a way to dump everything in a particular schema? RTFM. man pg_dump, search for --schema Regards, Andreas -- Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau- fenden Pinguins aus artg

[SQL] Question about a select

2005-01-22 Thread Kretschmer Andreas
Hi, I have a table with this columns: machine, date and area. Now i need a view with machine an week, calculated from date, and sum(area), where date between CURRENT_DATE and now+N days. Okay, this is not the problem, it works fine. (the original table and the view is more complex) The problem

Re: [SQL] Calling a table residing in another database from Plpgsql

2005-01-05 Thread Kretschmer Andreas
am Tue, dem 04.01.2005, um 21:13:46 -0800 mailte [EMAIL PROTECTED] folgendes: > Hi, > > I have function called test1() in database 1. I need to input the value > from this function into another table which is in database2. > > How can i achieve this task in plpgsql. I went through some documenta

Re: [SQL] Formatting an Interval

2005-01-02 Thread Kretschmer Andreas
am Sun, dem 02.01.2005, um 17:19:23 +0100 mailte Karel Zak folgendes: > > You could write a function to format the interval. For example, > > with PL/pgSQL you could use EXTRACT(epoch FROM interval_value) to > > convert the interval to a number of seconds; convert that to hours, > > minutes, and

Re: [SQL] Question about geometric function area()

2004-12-19 Thread Kretschmer Andreas
am Sun, dem 19.12.2004, um 11:38:40 +0100 mailte Kretschmer Andreas folgendes: > Now, I need the area, but 'select area(koerper) from geo where id=1;' > fails. If I do 'select area(box(koerper)) from geo where id=1;' it > works, but this isn't the right ans

[SQL] Question about geometric function area()

2004-12-19 Thread Kretschmer Andreas
Hello, I have a table with a polygon - typ. There I stored, for instance this polygon: test_db=# select * from geo where id = 1; id | koerper +- 1 | ((0,0),(0,2),(2,2),(3,3),(5,0)) (1 Zeile) Now, I need the area, but 'select area(koerper) from

Re: [SQL] Revoke on all database

2004-12-18 Thread Kretschmer Andreas
am Sat, dem 18.12.2004, um 12:54:33 -0500 mailte Henry Molina folgendes: > Hi all, > > Can I revoke "delete" on all database, something like this: on all databases, or on all tables in one database? > > REVOKE DELETE ON DATABASE mydb FROM PUBLIC; IMHO no, but you can walk through all database

Re: [SQL] sum query

2004-12-04 Thread Kretschmer Andreas
am Sat, dem 04.12.2004, um 12:38:11 - mailte Andrew - Supernews folgendes: Thank you for the very good explanation. > Notice I haven't used either IN or UNION. Using IN in place of a join is > unwise (even though recent versions can sometimes plan it as though it were > a join); using UNION

Re: [despammed] [SQL] update/insert data

2004-11-28 Thread Kretschmer Andreas
am Sat, dem 27.11.2004, um 12:55:40 -0500 mailte Keith Worthington folgendes: > Hi All, > > I have two tables in different schemas. The first table in the data_transfer > schema is loaded with a COPY command. I need to transfer the data to the > second schema inserting new records and updating