Re: [SQL] Query Problem... Left OuterJoin / Tagging Issue

2012-01-17 Thread John Tuliao
Thank you so much for your prompt reply David. I will consider your advice and put it to mind and action. I hope you all don't get tired of helping! For now, I will note down what I need to and do the necessary adjustments. Thank you for your time! On Friday, 13 January, 2012 10:26 PM, David

Re: [SQL] Query Problem... Left OuterJoin / Tagging Issue

2012-01-13 Thread David Johnston
On Jan 12, 2012, at 23:31, John Tuliao wrote: > Hi, > > I've been working on this for quite awhile now and don't seem to get the > proper query. > > I have basically 4 tables. > > 1. Table john_test contains the numbers of the calls. > 2. Table john_country contains the country with prefix.

Re: [SQL] Query Problem from FoxPro???

2007-07-03 Thread dBHS Jakarta
Dear All, It turns out that, column "is_pilih" was written with "Is_Pilih". PostgreSQL column name is case sensitive! After I change the column name to "is_pilih" everything's showed up! Another NEW Question arose: "Why the is_pilih data type become Character when it displayed in VFP?" Anybod

Re: [SQL] Query Problem from FoxPro???

2007-06-30 Thread Jaime Casanova
On 7/1/07, dBHS Jakarta <[EMAIL PROTECTED]> wrote: I try to query from FoxPro via ADODB, Recordset using this SelectCmd: "SELECT * FROM mst_lang" Everything is showed. When I try to query using: "SELECT lang_id, lang_nm, is_pil FROM mst_lang" No Results showed... Does anybody know what's the p

Re: [SQL] Query Problem

2005-04-07 Thread Richard Huxton
Abdul Wahab Dahalan wrote: If I've 2 tables like this: Country table : with 2 fields (country and id) Country id EnglandE France F JapanJ FlightTo table : with 2 fields(Flight ID and Destination) FlightIDDestination B1

Re: [SQL] Query Problem

2003-11-10 Thread Joe Conway
Abdul Wahab Dahalan wrote: If I've a table like below. kk kjpngkvote 01 02 c 10 01 02 b 5 How do I make a query so that I can get a result like this? kk kjpngkvote 01 02c,b 15 create or replace function accum_text(tex

Re: [SQL] Query problem

2003-08-19 Thread Bruno Wolff III
On Tue, Aug 19, 2003 at 15:02:24 +0200, Rado Petrik <[EMAIL PROTECTED]> wrote: > > In programing language output = > > id(1..3) { > $output = ( bit | $output ); > } > > How write query ? . Thanks You probably want to write a custom aggregate function to do this.

Re: [SQL] query problem

2002-08-30 Thread Jean-Luc Lachance
I think you meant min(date)... Josh Berkus wrote: > > Marco, > > > Is there a way to obtain this records by performing one > > single query and not by making for each city something like > > "SELECT city,date FROM table WHERE city='London' AND date>'2002-07-19 > > 15:39:15+00' ORDER BY date AS

Re: [SQL] query problem

2002-08-30 Thread Jean-Luc Lachance
How about: select city, min(date) from thetable where date > '2002-07-19 15:39:15+00' group by city; JLL Marco Muratori wrote: > > Hi > suppose I have the following situation: > > citydate > -+--- > London | 2002-08-08 07:05:16+00 > London | 2002

Re: [SQL] query problem

2002-08-30 Thread Josh Berkus
Marco, > Is there a way to obtain this records by performing one > single query and not by making for each city something like > "SELECT city,date FROM table WHERE city='London' AND date>'2002-07-19 > 15:39:15+00' ORDER BY date ASC LIMIT 1;"? Close. Try: SELECT city, MAX("date") as last_date F

Re: [SQL] Query Problem

2000-10-26 Thread Josh Berkus
Michael, > SELECT Data > FROM Table A > WHERE NOT EXISTS ( > SELECT * FROM Table_B, Table_C > WHERE Table_B.GroupID = TableC.GroupID > AND TableC.AccountID = 11 > ) > > I think that the not exists is a bit quicker than the NOT IN. Give it > a whirl. A *lot* faster. Like, 7x as fas

Re: [SQL] Query Problem

2000-10-26 Thread Tom Lane
Josh Berkus <[EMAIL PROTECTED]> writes: > Thus, I need to select: > SELECT Data FROM Table A > WHERE CaseID NOT IN ( > SELECT CaseID FROM Table_B, Table_C > WHERE Table_B.GroupID = TableC.GroupID > AND TableC.AccountID = 11) > The problem is, since Table_B and Table_C

Re: [SQL] Query Problem

2000-10-26 Thread Stephan Szabo
What is the explain output for the queries you've tried? Stephan Szabo [EMAIL PROTECTED] On Wed, 25 Oct 2000, Josh Berkus wrote: > > Folks: > > Here's the problem, in abstract: I need to select every record in table > A that does not have a link in table B Join Table C where Table > C.accou

Re: [SQL] Query Problem

2000-10-26 Thread Tomas Berndtsson
Josh Berkus <[EMAIL PROTECTED]> writes: > Folks: > > Here's the problem, in abstract: I need to select every record in table > A that does not have a link in table B Join Table C where Table > C.account = 11 > > The relevant fields: > > Table_A > CaseID > Data > > Table_B > GroupID > CaseID