[SQL] JOIN condition confusion

2005-11-03 Thread Thomas Good
Hi, I am wondering if there is a way to set conditions on a left joined table without hosing the join altogether: query = qq |SELECT p.*, a.user_id FROM patient_dosing p LEFT JOIN patient_assignment a ON p.patient_id = a.patient_id WHERE p.dose_

Re: [SQL] Concatenation Snafu

2003-03-25 Thread Thomas Good
support more than one type of backend! Thanks for the post, Tom ------- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst phone: (+1) 718.818.5528 Residentia

[SQL] Concatenation Snafu

2003-03-25 Thread Thomas Good
SELECT code || ' ' || diag, code FROM dsm4 WHERE axis = 1 ORDER BY code; This worked on 6.3-7.3.1 now it dies with: 'unable to identify an operator || for types 'character' and 'character varying' What happened? ---

Re: [SQL] Function for adding Money type

2003-01-26 Thread Thomas Good
fy the number of decimal places > on output but I am not sure if that would affect the primary benefit of using > it, speed. Hey good news D'Arcy! I prefer using MONEY as well. ------- Thomas Good

[SQL] ALTER TABLE x DROP CONSTRAINT fkey

2002-11-29 Thread Thomas Good
Pardon stupidiy, what is the right syntax for dropping a foreign key? Struggling here! TIA --- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst phone: (+1

[SQL] Casting Money To Numeric

2002-11-26 Thread Thomas Good
ng but trash... ;-) TIA! ------- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst phone: (+1) 718.818.5528 Residential Services fax: (+1) 718.818.5056 B

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread Thomas Good
on... Now, can some kind soul tell me how to do an 'insert into x select y;' where x is a numeric(19,2) and y is a money type??? --- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread Thomas Good
on... Now, can some kind soul tell me how to do an 'insert into x select y;' where x is a numeric(19,2) and y is a money type??? --- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst

Re: [GENERAL] [SQL] Database Design tool

2002-11-05 Thread Thomas Good
Cheers, --- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst phone: (+1) 718.818.5528 Residential Services fax: (+1) 718.818.5056 Behavioral Health Services,

Re: [SQL] from postgres to oracle

2002-10-25 Thread Thomas Good
he script using indirection (sqlplus user/pass @dbname.sql) HTH I have examples, if you want em. ------- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst phone: (+

Re: [SQL] Formatting current_time output

2002-10-03 Thread Thomas Good
ate'. ;-) Cheers Josh (and thanks alot)... BTW the JOIN you sent the other day worked fine. Thanks again, --- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst phone: (+1) 718.818.5528 Residential Servi

[SQL] Formatting current_time output

2002-10-03 Thread Thomas Good
here a function I haven't found? TIA ------- Thomas Good e-mail: [EMAIL PROTECTED] Programmer/Analyst phone: (+1) 718.818.5528 Residential Services

[SQL] pg_dump's octal strings -> oracle data load

2002-08-13 Thread Thomas Good
sql script not sql loader) 2) I get clean line breaks in perl generated html (^L does not do this.) ? Obviously would do it but I'm hoping there is a better candidate for search and replace. Thanks! ----

Re: [SQL] Diferent databases on same query...

2001-10-26 Thread Thomas Good
of SQL Ledger also does this sort of thing within his product (which uses perl dbi): www.sql-ledger.org Cheers Saint Vincent Catholic Medical Centers -

Re: [SQL] Referencing named attribute in where clause doesn't workwith 7.1.2?

2001-08-08 Thread Thomas Good
7;kill -9' the postmaster > SVCMC - Center for Behavioral Health Thomas Good

Re: [SQL] prob with PERL/Postgres

2001-08-07 Thread Thomas Good
On Mon, 6 Aug 2001, Tom Lane wrote: > Thomas Good <[EMAIL PROTECTED]> writes: > > Kate, he uses a diff module by the same author (Edmund Mergl) but with > > a very diff syntax. The advantage of the DBI - Kris, if you're > > interested - is that the syntax is

Re: [SQL] prob with PERL/Postgres

2001-08-06 Thread Thomas Good
ECTED] > PHONE: (978) 262-0610 > FAX: (978) 262-0700 > http://www.intellicast.com > > > > ---(end of broadcast)--- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to [EMAI

Re: [SQL] MySql 'REPLACE'

2001-04-25 Thread Thomas Good
series? Good luck, Tom * deprecated according to SQL In A Nutshell and other SQL3 ref guides. SVCMC - Center for Behavioral Health --

Re: [SQL] any proper benchmark scripts?

2001-04-19 Thread Thomas Good
ous man in Staten Island?) SVCMC - Center for Behavioral Health ---- Thomas Good tomg@ { admin | q8 } .nrnet.org Database Administrator

[SQL] The Momjian Tome / DBA Certification

2001-04-10 Thread Thomas Good
SVCMC - Center for Behavioral Health ---- Thomas Good tomg@ { admin | q8 } .nrnet.org Database Administrator Phone: 718-354-5528 Staten Island Region