[SQL]

2003-11-07 Thread ronald
Hello everyone, Good day! Could anyone help me translate this query in Microsoft Access to Postgresql. I'm having a difficulty. Pls... Query1: SELECT items.description, Sum(supplieditems.qty) AS SumOfqty FROM items INNER JOIN supplieditems ON items.itemno = supplieditems.itemno GROUP BY items.des

Re: [SQL] SQL to PLC to diverter gate, can this be done?

2003-11-07 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Razorbak71) would write: > First, I know nothing about PLC's, but I was wondering is there a > way to extract data from a SQL database file, feed that to a PLC is > some manner, and then have the PLC trigger a diverter gate based on > the v

Re: [SQL] DateDiff in PostgreSQL

2003-11-07 Thread Rod Taylor
> ie, a function that returns difference of two dates(timestamp) in days > or months or year.. > > The - operator for timestamp retuns the intervel in days only. rbt=# select extract('days' from current_timestamp - '2003-01-01'::timestamp); date_part --- 310 (1 row)

Re: [SQL] DateDiff in PostgreSQL

2003-11-07 Thread George A.J
Yasir Malik <[EMAIL PROTECTED]> wrote: >You can use the age() function to find the difference between dates, and>use the extract() function to get the years, months, days, etc.>Yasir this will not work because age('25/12/1975','30/01/1986')wil return '10 year 1 month 5 days' extract only returns

Re: [SQL] DateDiff in PostgreSQL

2003-11-07 Thread Tomasz Myrta
Dnia 2003-11-07 14:34, Użytkownik George A.J napisał: Hi, i am converting a MSSQL Server database to PostgreSQL. Using PostgreSQL version 7.3.2. Is there any function like the DateDiff() in MSSQL Server. ie, a function that returns difference of two dates(timestamp) in days or months or year..

Re: [SQL] DateDiff in PostgreSQL

2003-11-07 Thread Yasir Malik
Hi, You can use the age() function to find the difference between dates, and use the extract() function to get the years, months, days, etc. Yasir On Fri, 7 Nov 2003, George A.J wrote: > Date: Fri, 7 Nov 2003 05:34:09 -0800 (PST) > From: George A.J <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Su

[SQL] DateDiff in PostgreSQL

2003-11-07 Thread George A.J
Hi, i am converting a MSSQL Server database to PostgreSQL. Using PostgreSQL version 7.3.2. Is there any function like the DateDiff() in MSSQL Server. ie, a function that returns difference of two dates(timestamp) in days or months or year.. The - operator for timestamp retuns the intervel in days

[SQL] search facilities

2003-11-07 Thread Martin Kuria
Hi, I have a content management system, for my database driven website developed using php and postgresql but I don't know how to develop a search facility for it. How do I go about it?. I have seen database driven website developed using php and postgresql and they have their built search fac