-to-date?
(eg. CONS_STOCK (cs_id, cl_id, hand_qty, order_qty) PK(cs_id, cl_id) )
that way you simply change the quantity fields for each combination of
location-consumable according to the situation (and sound the alarm if the reach a
certain level?).
If anyone thinks I'm wrong, please c
ft join consumables
on (bmain.cost_cs_id=consumables.cs_id)
left join cons_locations
on (bmain.cost_cl_id=cons_locations.cl_id)
P.S. Don't ask about performance of the query, I haven't delved that deep into it :-)
Regards and good luck,
Stijn Vanroye
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
DESC,
date_part('day', uu.add_date) DESC;
That way you are sure each of the fields is sorted DESC. if you don't specify a
direction in your order by clause postgres will take ASC as the default. I think that
he does "ASC,ASC,DESC" instead. I'm not sure if he applies
hat _are_ distinct,
> but are on the same day.
>
> For example:
>
> 2004 04 02 11:22:33.034
> 2004 04 02 22:33:44.055
>
> Thanks,
> Otis
>
>
> --- Stijn Vanroye <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > I'd love
Indeed, it seems that I get the same result for a similar query.
I'm running version 7.3.4 on a rh 9 server.
Also: is the function date_part a function you wrote yourself? I get an error stating
that the function date_part("Unknown",date) is not recognized.
It maybe not a solution to the actual
could happen that two people have the same name, so
a distinct on fullname could make problems.
The facts:
- PostgreSQL 7.3.2 running on RH 9
- pgODBC 7.3.0200
- Borland Delphi 7 enterprise
Regards,
Stijn Vanroye
-=[Today I got more responsabilities from my boss, as from now I'm respo
he help,
Stijn Vanroye
-Original Message-
From: Viorel Dragomir [mailto:[EMAIL PROTECTED]
Sent: woensdag 28 april 2004 11:54
To: Stijn Vanroye; [EMAIL PROTECTED]
Subject: Re: [SQL] select distinct and order by
I don't know if this will work, but why not try it ? :)
select distinc
: 2961 rows.
So I got 3 different result sets for 3 different ways to run the query. Even in this
last case the UNION doesn't seem to only return unique values, and I will still need
the top-level select.
> -Original Message-
> From: Stijn Vanroye
> Sent: maandag 17 mei
is question has risen.
Kind regards,
Stijn Vanroye
> -Original Message-
> From: Edmund Bacon [mailto:[EMAIL PROTECTED]
> Sent: donderdag 13 mei 2004 17:28
> To: sad
> Cc: [EMAIL PROTECTED]
> Subject: Re: [SQL] a wierd query
>
>
> sad wrote:
> > select
First of all, I don't select distinct on 1 value, but on 2. Meaning I want each unique
combination of task_id (or employee_id in this example) and date. That way both fields
still have meaning.
the workhour_id field is indeed redundant, but was still there from some pevious
testing work. (It is
ple who replied (and started the thread) are in place here.
Kind regards,
Stijn Vanroye
> -Original Message-
> From: Stephan Szabo [mailto:[EMAIL PROTECTED]
> Sent: maandag 17 mei 2004 17:01
> To: Stijn Vanroye
> Cc: [EMAIL PROTECTED]; Edmund Bacon
> Subject: Re: [SQL]
t this problem? Is there a
function I can use?
I don't know if it helps but I'm going to use the functions like this:
SELECT workhour_id, employee_id, task_id, whdate, begintime, endtime,
getdayhours(begintime,endtime), getnighthours(begintime,endtime) FROM
> "Stijn Vanroye" <[EMAIL PROTECTED]> writes:
> > I can't seem to find a way to substract two time values (or
> > timestamp values) and get a numeric/float value. I always get the
> > INTERVAL datatype.
>
> extract(epoch from interval) may help.
>
.
I took the liberty of CC-ing the postgresql mailinglist so other's having a similar
problem can read about this solution too. It's all about the (open-source)-community
isn't it :)
Kind regards,
Stijn Vanroye
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PRO
14 matches
Mail list logo