[SQL] Insert problem

2008-03-09 Thread A. R. Van Hook
date, istidint references stock, primary key (scid, item)) -- Arthur R. Van Hook [EMAIL PROTECTED] [EMAIL PROTECTED] (816) 578-4704 - Home (816) 629-0071 Cell -- Arthur R. Van Hook [EMAIL PROTECTED] [EMAIL PROTECTED] (816) 578-4704 - Home (816) 629-0071 Cell

[SQL] wrong answer

2007-08-21 Thread A. R. Van Hook
-- Arthur R. Van Hook [EMAIL PROTECTED] [EMAIL PROTECTED] (816) 578-4704 - Home (816) 629-0071 Cell ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] join problem

2007-06-24 Thread A. R. Van Hook
Works great. Can you enlighten me as why the deposit is divided by the number of rows? thanks Ragnar wrote: On lau, 2007-06-23 at 04:15 -0500, A. R. Van Hook wrote: Ragnar wrote: On fim, 2007-06-21 at 08:46 -0500, A. R. Van Hook wrote: If I try an inclusive query using

Re: [SQL] join problem

2007-06-23 Thread A. R. Van Hook
What is the correct query??? thanks Ragnar wrote: On fim, 2007-06-21 at 08:46 -0500, A. R. Van Hook wrote: if I query for the total deposit using select sum(deposit) from invoice where cusid = 2128 I also get 1179.24, also the correct amount If I try an inclusive query using

[SQL] join problem

2007-06-21 Thread A. R. Van Hook
not null default 0, tdatetimestamp not null [EMAIL PROTECTED] ~]$ -- Arthur R. Van Hook Mayor - Retired The City of Lake Lotawana [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] (816) 578-4704 - Home ---(end of broadcast

[SQL] join problem

2007-06-13 Thread A. R. Van Hook
from invoice v, cai, I get ERROR: missing FROM-clause entry for table cai ERROR: invalid reference to FROM-clause entry for table v Where do I add the cai table reference??? thanks -- Arthur R. Van Hook Mayor - Retired The City of Lake Lotawana [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL

[SQL] or function

2006-12-30 Thread A. R. Van Hook
--- 43.20 qs select sum((1|i.count) * s.cost) from inventory i,stock s, stockkey k where i.stid=s.stid and i.status='Active' and s.ctype = k.cd and k.value = 'Other' and s.ssp = 'Stock' sum --- 46.80 43.20 46.80 Thanks -- Arthur R. Van Hook Mayor The City of Lake Lotawana [EMAIL

[SQL] Time interval sums

2006-10-02 Thread A. R. Van Hook
public.startstop Column | Type | Modifiers ++--- sid| integer| not null start | time without time zone | stop | time without time zone | day| date | not null thanks -- Arthur R. Van Hook Mayor The City

[SQL] date array

2006-04-23 Thread A. R. Van Hook
date[] thanks -- Arthur R. Van Hook Mayor The City of Lake Lotawana [EMAIL PROTECTED] (816) 578-4704 - Home (816) 578-4215 - City (816) 564-0769 - Cell ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ

[SQL] new rule syntax?

2006-02-05 Thread A. R. Van Hook
to work fine create rule checks_d0 as on delete to checks do delete from checkitems where ckid = checks.ckid; in 8.1.2 I get ERROR: missing FROM-clause entry from table checks any idea? -- Arthur R. Van Hook Mayor The City of Lake Lotawana [EMAIL PROTECTED] (816) 578-4704

[SQL] sysid

2005-11-23 Thread A. R. Van Hook
? thanks -- Arthur R. Van Hook Mayor The City of Lake Lotawana [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] (816) 578-4704 - Home (816) 578-4215 - City (816) 564-0769 - Cell ---(end of broadcast)--- TIP 5: don't forget to increase your

[SQL] max question

2005-04-12 Thread A. R. Van Hook
I have the following in a table: oid | citkey | contby | contdate | abcontinue | ccdate -++--+++ 5774835 | 04-0594703 | ||| 5775325 | 04-0594703 | Attorney | 04/06/2005 | 6 |