Re: [SQL] Table relationships

2007-01-08 Thread Curtis Scheer
[mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 4:43 PM To: pgsql-sql@postgresql.org Subject: Fwd: [SQL] Table relationships -- Forwarded message -- From: Aaron Bono <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > Date: Jan 8, 2007 4:42 PM Subject: Re:

[SQL] Table relationships

2007-01-08 Thread Curtis Scheer
I'm having trouble determining the best way to implement the following scenario for a customer database. Given the following tables what is the best way to link an address table to both the "Master" and the "Detail" tables. Basically there can be many addresses for each customermaster record an

Re: [SQL] Table Relationships

2006-10-31 Thread Curtis Scheer
Thanks for the help.   From: Aaron Bono [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 31, 2006 2:44 PM To: A. Kretschmer Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Table Relationships   On 10/31/06, A. Kretschmer <[EMAIL PROTECTED]> wrote: am  Tue, dem 31.10.2006

[SQL] Table Relationships

2006-10-31 Thread Curtis Scheer
Given the following two tables:   CREATE TABLE public.task (   taskid int4 NOT NULL DEFAULT nextval('task_taskid_seq'::regclass),   description varchar,   CONSTRAINT pk_taskid PRIMARY KEY (taskid) )   public.users (   userid int4 NOT NULL,   username varchar,   CONSTRAINT pk_us

Re: [SQL] Help with optional parameters

2006-09-21 Thread Curtis Scheer
I noticed this one by searching in the archives, as I am working with some “optional” parameters myself and noticed your solution. I just wanted to make one improvement suggestion which is instead of checking whether or not a parameter has been used simply start your query like so   Quer

Re: [SQL] How to pass array of values to a stored procedure

2006-07-18 Thread Curtis Scheer
te: > On 7/18/06, Curtis Scheer <[EMAIL PROTECTED]> wrote: > > Does anyone have any examples of how I would make a stored procedure in > > plpgsql that would allow for passing a list or arrays of values to be used > > in an sql IN clause? Like so:

[SQL] How to pass array of values to a stored procedure

2006-07-18 Thread Curtis Scheer
Does anyone have any examples of how I would make a stored procedure in plpgsql that would allow for passing a list or arrays of values to be used in an sql IN clause?  Like so: select * from table where field1 in (values).   Thanks,   Curtis