[SQL] Insert problem

2008-03-09 Thread A. R. Van Hook
int, sidate 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 - H

[SQL] wrong answer

2007-08-21 Thread A. R. Van Hook
) from registry where ref=11" count = 3 thanks -- 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 the

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

[SQL] join problem

2007-06-21 Thread A. R. Van Hook
ault 0, acodeint 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

[SQL] join problem

2007-06-13 Thread A. R. Van Hook
cai to the from clause "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 Lota

[SQL] or function

2006-12-30 Thread A. R. Van Hook
7;Other' and s.ssp = 'Stock'" sum --- 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.

[SQL] Time interval sums

2006-10-02 Thread A. R. Van Hook
overall sum Table schema: Table "public.startstop" Column | Type | Modifiers ++--- sid| integer| not null start | time without time zone | stop | time without time zone | day| date | not nu

Re: [SQL] date array

2006-04-24 Thread A. R. Van Hook
additional questions. On Sun, Apr 23, 2006 at 13:21:49 -0500, "A. R. Van Hook" <[EMAIL PROTECTED]> wrote: I am running 8.1.2, what can I do in the mean time? You could build from source using HEAD. (This is probably not a good idea for a production system.) You could restr

[SQL] date array

2006-04-23 Thread A. R. Van Hook
<-- doesn't work the table field is defined as insDate 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)

[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 PROTECTE

[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

[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 | 03

[SQL] trigger status

2004-11-03 Thread hook
What's the easy way to tell if a trigger has fired??? thanks ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[SQL] max value from join

2004-06-14 Thread hook
I have a court program with related tables citation citkey varchar(16) NOT NULL PRIMARY KEY, cdefendant citkey varchar(16) NOT NULL PRIMARY KEY references citation, ccourt citkey varchar(16) NOT NULL PRIMARY KEY references citation, disposition citke

[SQL] trigger data

2004-06-04 Thread hook
Does any one have any reasonably simple application example that uses or parses the HeapTuple (PointerGetDatum(rettuple) ) returned by 'c' trigger function? Also, what is the syntax to parse the HeapTuple within the trigger function? thanks ---(end of broadcast)--

[SQL] trigger function building

2004-05-26 Thread hook
What's the proper way to include the suport files for building 'C' trigger functions in to the normal PostgreSQL install? I.E. / "make install "does not include internal/postgres_fe.h, executor/spi.h nor commands/trigger.h in to /usr/local/pgsql/include. ---(end of br

[SQL] I'm baffled

2004-05-18 Thread hook
I have a couple of 'c' object files that send mail when ever there in an insert or delete to specified tables. The problem is that I get the mail message even if the insert fails! what am I doing wrong? thanks The function; create function insert_r1(text, text, text, text) returns int4

[SQL] (no subject)

2003-08-14 Thread A. Van Hook
nderson Veil: S2378 sparkle tulle and rat-tail edge', 'Used an 888 slip^M <<<<<< What am I doing wrong?? thanks -- A. R. Van Hook Honeywell Federal Manufacturing & Technologies IT System Engineer City of Lake Lotawana MO Mayor pager(816)458-2585 cel

[SQL] now 7.2.3 - 7.3.3

2003-07-30 Thread A. Van Hook
this worked in 7.2.3 "select sum(cr) from ar where date(tdate) = now() -1 " but not in 7.3.3 What's the proper syntax for 7.3.3??? thanks ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] (no subject)

2003-06-12 Thread A. Van Hook
When updating from 7.2.3 to 7.3.3 we have lost the ability to see the passwords in pg_shadow. Is there a way to decrypt the passwords? thanks -- A. R. Van Hook Honeywell Federal Manufacturing & Technologies IT System Engineer City of Lake Lotawana MO M

[SQL] paging

2001-03-26 Thread A. Van Hook
w an expect script: #!/usr/bin/expect set query [lindex $argv 0] set query [lindex $argv 1] spawn psql imdb -U hook -n expect "Password: "; send "$passwd\n "; expect "imdb=# "; send "$query;\r"; expec