Re: [GENERAL] Query Problem

2008-07-06 Thread Ragnar
On lau, 2008-07-05 at 23:04 +, Sheikh Salman Ahmed wrote: > Hi Fellows > > I still have problem to access my databank.It shows syntax problem,I > am using VC++ 2005 with postgresql 8.3.My table name is Person and it > has three column,Person ID,first name and last name (testing > version).who

Re: [GENERAL] Query Problem

2008-07-06 Thread Dave Page
On Sun, Jul 6, 2008 at 12:04 AM, Sheikh Salman Ahmed <[EMAIL PROTECTED]> wrote: > res = PQexec(conn, "INSERT INTO public.Person VALUES Without quotes around Person, it will be shifted to lower case to match a table called person. I suspect you need to do: res = PQexec(conn, "INSERT INTO public.\

[GENERAL] Query Problem

2008-07-06 Thread Sheikh Salman Ahmed
Hi Fellows I still have problem to access my databank.It shows syntax problem,I am using VC++ 2005 with postgresql 8.3.My table name is Person and it has three column,Person ID,first name and last name (testing version).whole c++ code is // Test_postgres.cpp : Defines the entry point for

Re: [GENERAL] Query problem

2007-10-12 Thread Rodrigo De León
On 10/12/07, Clemens Schwaighofer <[EMAIL PROTECTED]> wrote: > I probably need to approach the problem different. So both are read > "independent" or something like this. Also, email_a, email_b, etc. indicate that you need to consider refactoring your schema. You can find a lot of tutorials on no

Re: [GENERAL] Query problem

2007-10-12 Thread Clemens Schwaighofer
On 2007/10/12, at 23:22, Pavel Stehule wrote: you get 0 rows. [EMAIL PROTECTED] isn't anywhere and [EMAIL PROTECTED] cannot do pair with any. else 0 * 1 = 0 Thanks, go it now. Basically very simple. I probably need to approach the problem different. So both are read "independent" or som

Re: [GENERAL] Query problem

2007-10-12 Thread Pavel Stehule
2007/10/12, Clemens Schwaighofer <[EMAIL PROTECTED]>: > hi, > > thats the first time I am a bit confused by a query not working. > > I have this table: > > gullevek=# \d test > Table "public.test" > Column | Type| Modifiers > --

[GENERAL] Query problem

2007-10-12 Thread Clemens Schwaighofer
hi, thats the first time I am a bit confused by a query not working. I have this table: gullevek=# \d test Table "public.test" Column | Type| Modifiers -+---+---

Re: [GENERAL] Query problem

2007-10-01 Thread Albe Laurenz
Naz Gassiep wrote: > Aside from the messy nomenclature, is anyone able to spot why > the "sum" column from the first query is not returning 7, as > the second query suggests that it should? I know that this is > probably simple, and that It's probably going to jump out at > me the minute I hit "S

[GENERAL] Query problem

2007-10-01 Thread Naz Gassiep
Aside from the messy nomenclature, is anyone able to spot why the "sum" column from the first query is not returning 7, as the second query suggests that it should? I know that this is probably simple, and that It's probably going to jump out at me the minute I hit "Send", but if I don't hit sen

Re: [GENERAL] Query problem...

2004-10-03 Thread Mike Rylander
You may want to take a look at the ltree and tablefunc contrib modules. They both allow you to do something like this, and the abstract away the difficulty of query building. ltree will allow you to precompute the tree, and the tablefunc module has a connectby() function for runtime parent-child

[GENERAL] Query problem...

2004-10-02 Thread Net Virtual Mailing Lists
Hello, I have 3 tables which are joined that I need to create a summation for and I just cannot get this to work. Here's an example: CREATE table1 ( id1INTEGER, title1 VARCHAR ); INSERT INTO table1 (1, 'Heading #1'); INSERT INTO table1 (2, 'Heading #2'); CREATE table2 ( id1I

Re: [GENERAL] Query problem - explicit casts

2000-07-19 Thread Tom Lane
"kurt miller" <[EMAIL PROTECTED]> writes: > Updating table A(fqhcdata) based on values in table B(chn_jmembrm0). > Query 1: (the most obvious solution) > update fqhcdata > set sbrno=( select distinct social_sec_no > from chn_jmembrm0 > where subscriber

[GENERAL] Query problem - explicit casts

2000-07-19 Thread kurt miller
Query problems. Updating table A(fqhcdata) based on values in table B(chn_jmembrm0). Keys: Table A: sbrno - char(15) Table B: subscriber_number - varchar *both fields have indexes == Query 1: (the most obvious solution)