[SQL] select

2004-08-08 Thread Knut P Lehre
I have a table with fields: id A B C D E F where id is an int4 primary key. In this table there is information like: 1 a1 b1 xxx xxx 2 a1 b1 xxx xxx xxx xxx 3 a2 b2 xxx

Re: [SQL] length of recordset read through a cursor

2003-08-14 Thread Knut P. Lehre
>> After declaring a cursor, one way of obtaining the length of the >resultset >> is to perform a "MOVE 0" and read the PQcmdStatus which returns a >"MOVE nn" >> where nn is the length of the resultset. (A negative MOVE can then be >used >> to allow starting to fetch records from the beginning of

[SQL] length of recordset read through a cursor

2003-07-31 Thread Knut P. Lehre
After declaring a cursor, one way of obtaining the length of the resultset is to perform a "MOVE 0" and read the PQcmdStatus which returns a "MOVE nn" where nn is the length of the resultset. (A negative MOVE can then be used to allow starting to fetch records from the beginning of the resultse

[SQL] plpgsql, double quoted column names containing spaces/hyphens

2003-06-21 Thread Knut P. Lehre
Using pgsql 7.2.1 (PeerDirect beta4) on WinXP Prof SP1. Client: MS VStudio2003 C++ -> ADO -> ODBC 7.03.01.00. In plpgsql, I can access columns with a name containing capital letters by enclosing the name in double quotes: tbl."ColName" However, if the quoted name contains spaces or hyphens I get