[GENERAL] quote in string

2008-05-22 Thread finecur
Hi, I have a function and it's interface is : my_flexible_sql_function(cmd) where cmd is another sql command. I call this function like this: select * from my_flexible_sql_function('select * from employee where id < 100') Inside this functioin, I will first retrieve all data by calling 'se

[GENERAL] large query by offset and limt

2008-05-03 Thread finecur
Hi, I am ruuning a database behind a webserver and there is a table which is huge. I need to pull data from this table and send to user through http. If I use select * from huge_table where userid = 100 It will return millions of records which exhuasts my server's memory. So I do this: select *

[GENERAL] constrains on two tables

2007-09-14 Thread finecur
Hi Here is my table: Table School ( id integer, name text ); Table Department ( id integer, school_id integer reference school(id), name text ); Table Course ( department_id integer references department(id), name text, course_number text ) I would like to make

Re: [GENERAL] constrains on two tables

2007-09-14 Thread finecur
On Sep 10, 9:55 pm, finecur <[EMAIL PROTECTED]> wrote: > Hi > > Here is my table: > > Table School > ( > id integer, > name text > ); > > Table Department > ( > id integer, > school_id integer reference school(id), > name

[GENERAL] query from a list of ids

2007-04-24 Thread finecur
Hi, Here is my first table: Table1 name| ids - Peter| 2, 3, 4, 5 Jack| 100, 34, 3 Both name and ids are in text format. Here is my second table Table2 id | Flag | Title - 2 | Red| good 3 | Blue | poor 4 | Green| middle id is in integer (seri

[GENERAL] table updated status

2007-02-05 Thread finecur
Hi, Can I list tables and the time they were last update (adding columns, drop columns) using sql, something like the "ls -l" command under unix? Can I compare the table definitions (tables, fields, but not data) of two database using sql, something like the "diff file1, file2" command under unix