Thank you all!
My problem has been solved in another way... because the inner queries
had left outer joins and so on, and I finally have had to do two queries
and treat results by PHP.
Again... thank you all!
---(end of broadcast)---
TIP 2: Don'
"Ragnar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> On sun, 2007-07-15 at 09:28 -0600, Stuart McGraw wrote:
> > Advice requested :-) I have a table like:
> >
> > CREATE TABLE items (
> > id INT,
> > typ INT...
> > PRIMAY KEY (seq,typ));
> >
> > I would like 'i
"chester c young" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> >
> > CREATE TABLE items (
> > id INT,
> > typ INT...
> > PRIMAY KEY (seq,typ));
> >
>
> >id typ
> > +-
> > 1 'a'
> > 2 'a'
> > 3 'a'
> > 1 'b'
> > 4 'a'
--- Stuart <[EMAIL PROTECTED]> wrote:
> > you will need to use pre insert trigger since you cannot use column
> > references in default expression.
> >
> > you could use this same trigger to either:
> > - create sequences as needed and apply the right one
> > - with locking, lookup for last id of
On Tue, Jul 17, 2007 at 07:34:26AM -0600, Stuart wrote:
> I am not looking for gapless sequences. The reason I
> want to do this is the "typ" column is actually an indicator
> of the source of the rest of the infomation in the row.
Why do you need the sequence to be 1. . .n for each typ, then? I
"Andrew Sullivan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> On Tue, Jul 17, 2007 at 07:34:26AM -0600, Stuart wrote:
> > I am not looking for gapless sequences. The reason I
> > want to do this is the "typ" column is actually an indicator
> > of the source of the rest of the in
On Tue, Jul 17, 2007 at 09:40:21AM -0600, Stuart wrote:
> is not really structually important -- it is a value that
> exists soley for the UI.
Hmm. Maybe you should use generate_series() for the UI instead? It
would always give you the order you like, you could use the universal
sequence or w
"Andrew Sullivan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> On Tue, Jul 17, 2007 at 09:40:21AM -0600, Stuart wrote:
> > is not really structually important -- it is a value that
> > exists soley for the UI.
>
> Hmm. Maybe you should use generate_series() for the UI instead
On Tue, Jul 17, 2007 at 12:23:21PM -0600, Stuart wrote:
>
> Except that the value does matter outside of the database and thus
> needs to be remembered. It is not used for ordering at all.
If you have two rows of data, where one column is data that varies as
a function of the data in some other
Hi:
I can't seem to resolve this issue. I have a fair sized SELECT statement that
runs properly in a
stored procedure using pl/pgSQL, but I have certain parts of the query that can
filter by a NULL
value, or a character string.
What I can't seem to do is insert a conditional IF statement in my c
On 7/17/07, Norm Garand <[EMAIL PROTECTED]> wrote:
/---
IF $7 IS NOT NULL THEN
AND f.id = pid.specific_location_cid AND f.long_desc = $7
END IF
---/
How about:
AND f.ID = pid.specific_location_cid
AND f.long_desc = COALESCE ($7, f.long_desc)
---
On 7/17/07, Norm Garand <[EMAIL PROTECTED]> wrote:
In the WHERE portion of the SELECT statment, I'd like to insert the IF
statement shown below. I've
tried single and double quotes and the pipeline for concatenation, but nothing
seems to work. Any
suggestions or resolutions would be greatly app
Hi Again:
thanks to those who sent me responses on my first post. I'll try to explain a
bit better. There
are several parameters that are passed by the user. Each of the parameters that
are being passed,
may have a NULL value, or an actual numerical value. The parameters filter a
large report d
13 matches
Mail list logo