pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Err sum number with Date ?
3+ messages / 3 participants
[nested] [flat]

* Err sum number with Date ?
@ 2002-06-13 19:30 Robson Martins <robson-martins@bol.com.br>
  2002-06-13 19:59 ` Re: Err sum number with Date ? Nick Fankhauser <nickf@ontko.com>
  2002-06-14 17:26 ` Re: Err sum number with Date ? Chad R. Larson <clarson@eldocomp.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Robson Martins @ 2002-06-13 19:30 UTC (permalink / raw)
  To: pgsql-admin

What err ?

Order By (Sum(Qtde)/(1+current_date-Max(Data))) Desc


Regards,

Robson

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Err sum number with Date ?
  2002-06-13 19:30 Err sum number with Date ? Robson Martins <robson-martins@bol.com.br>
@ 2002-06-13 19:59 ` Nick Fankhauser <nickf@ontko.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Nick Fankhauser @ 2002-06-13 19:59 UTC (permalink / raw)
  To: Robson Martins <robson-martins@bol.com.br>; pgsql-admin

Robson-

In this, and your last question, the problem is that you are using functions
from Microsoft Access. You'll keep running into this until you learn about
the equivalent functions in PostgreSQL.

The PostgreSQL functions are explained here:
http://www.postgresql.org/idocs/index.php?functions.html

You may also want to learn how to create your own functions in case there is
no equivalent:

http://www.postgresql.org/idocs/index.php?sql-createfunction.html

-Nick
--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/


-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Robson Martins
Sent: Thursday, June 13, 2002 2:30 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Err sum number with Date ?


What err ?

Order By (Sum(Qtde)/(1+current_date-Max(Data))) Desc


Regards,

Robson




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Err sum number with Date ?
  2002-06-13 19:30 Err sum number with Date ? Robson Martins <robson-martins@bol.com.br>
@ 2002-06-14 17:26 ` Chad R. Larson <clarson@eldocomp.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Chad R. Larson @ 2002-06-14 17:26 UTC (permalink / raw)
  To: nickf@ontko.com; Robson Martins <robson-martins@bol.com.br>; pgsql-admin

At 12:59 PM 6/13/02 , Nick Fankhauser wrote:
>In this, and your last question, the problem is that you are using 
>functions from Microsoft Access. You'll keep running into this until you 
>learn about the equivalent functions in PostgreSQL.

Further, learning ANSI SQL and limiting your syntax to that defined there, 
so that if (God forbid) you should need to replace your PostgreSQL with 
something like Informix or Oracle you won't face the same problem all 
over.  In otherwords, don't use any database's extensions unless there is a 
compelling reason to do so.  Unfortunately, that means you have to be able 
to identify what =is= an extension, something Microsoft tries very hard to 
hide.

In fact, if you were truly compulsive about such things (and I am), you 
would only access the database through ODBC.  That would make changing 
database engines practically painless.

Layer both your view of the system, and the software that implements it.


         -crl
--
Chad R. Larson (CRL22)    chad@eldocomp.com
   Eldorado Computing, Inc.   602-604-3100
      5353 North 16th Street, Suite 400
        Phoenix, Arizona   85016-3228




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-06-14 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-13 19:30 Err sum number with Date ? Robson Martins <robson-martins@bol.com.br>
2002-06-13 19:59 ` Nick Fankhauser <nickf@ontko.com>
2002-06-14 17:26 ` Chad R. Larson <clarson@eldocomp.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox