Re: [SQL] Home-brewed table syncronization

2003-07-09 Thread Jason Earl
Michael A Nachbaur <[EMAIL PROTECTED]> writes: > On Wednesday 09 July 2003 02:28 pm, Cliff Wells wrote: >> On Wed, 2003-07-09 at 14:14, Michael A Nachbaur wrote: >> > So, I'm looking at syncronizing 4 tables from one master database to >> > several child databases. I'm thinking of doing the follow

Re: [SQL] serial column vs. explicit sequence question

2002-06-13 Thread Jason Earl
Charlie Toohey <[EMAIL PROTECTED]> writes: > I'm having a problem and there seems to be 2 solutions. It is simple > and straighforward, but will take several paragraphs to explain. > > I have a schema with a master-detail design. The master table does > not have an expicit id, so I have a column

Re: [SQL] system maintained keys

2001-10-19 Thread Jason Earl
bye'); And then when you select you get: processdata=> SELECT * FROM foo; prim_key | bar --+- 1 | hello 2 | goodbye (2 rows) I hope that is helpful, Jason Earl --- Stefan Lindner <[EMAIL PROTECTED]> wrote: > Is there any way to get system mai

Re: [SQL] Triggers do not fire

2001-10-17 Thread Jason Earl
I can vouch for that. I have several tables with 10 to 16 million entries in much the same sort of setup as you are describing (primary key, timestamp, value). PostgreSQL is will quite happily use the timestamp indexes when accessing this table, and it doesn't default to a sequential scan until

Re: [SQL] ORDER BY case insensitive?

2001-10-04 Thread Jason Earl
e this efficient, do we need to uppercase all > of the data before > adding to the table? (yuk) > > - Bob > > > - Original Message - > From: "Jason Earl" <[EMAIL PROTECTED]> > To: "Bob Swerdlow" <[EMAIL PROTECTED]>; > <[E

Re: [SQL] ORDER BY case insensitive?

2001-10-04 Thread Jason Earl
SELECT * FROM MyTable ORDER BY lower(Name); Should do the trick. Jason Earl --- Bob Swerdlow <[EMAIL PROTECTED]> wrote: > How do I get the rows sorted in a case insensitive > way? > > I have some queries that basically fit the form: > SELECT * FROM MyTable ORDER B

Re: [SQL] changes to table creation syntax in 7.1.2?

2001-08-29 Thread Jason Earl
It looks like it works here :(. Do you have an error message? processdata=# select version(); version --- PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC 2.95.4 (1 row) pr

[SQL] Re: [NOVICE] Knowing new item in table...

2001-08-03 Thread Jason Earl
--- macky <[EMAIL PROTECTED]> wrote: > im still in the dark when it comes to postgres. > is there a way i can > know if there was a new entry on a table... That's a pretty common problem. > scenario... > > i have a script that runs every 5 minutes... that > script checks if there's > a n

Re: [SQL] batch file

2001-05-25 Thread Jason Earl
I just put files commands that I want in some file like "foo.sql" and then do: psql mydatabase -f foo.sql Is this what you are looking for? Jason --- Milen <[EMAIL PROTECTED]> wrote: > Hi all!, > > I want to execute several SQL statements one after > another. > Does anyone know if it is pos

Re: [SQL] system time

2001-05-15 Thread Jason Earl
Try using: SELECT now() It should do what you want. If not there are a whole pile of date functions. Look them up in the Users Guide. Hope this is helpful. Jason --- Seema Noor <[EMAIL PROTECTED]> wrote: > is there any function from which i can get system > time? > > ___

Re: [SQL] Sorting and then...

2001-04-10 Thread Jason Earl
SELECT name FROM test ORDER BY id DESC LIMIT 10; Take care, Jason --- Wei Weng <[EMAIL PROTECTED]> wrote: > Suppose I have a table > > create table test > ( > id integer, > name text > ); > > And I want to get the names of the largest 10 "id"s. > How can I do that in > sql?

Re: [SQL] Birthday search.

2001-03-22 Thread Jason Earl
Here's an example of something that works with some of the data that I have lying around. Replace exit_dt with "birthday" (or whatever you have named the field that holds the birthday information) and replace ticket_no with name (or whatever) and you should be on the right track. SELECT exit_dt,