Re: [SQL] getting back autonumber just inserted

2005-07-09 Thread jimmy.olsen
I don't know how to create a Global Variable in Postgres, but the idea is very simple: 1. Encapsulate the NextVal function in MyNextVal 2. Set to Global variable with NextVal of the desired sequence 3. Inspect to value of the global variable (exactally as it's done in MsSQL) When Creating a Table:

Re: [SQL] getting back autonumber ... Another MsSQL Comparation Question

2005-07-08 Thread jimmy.olsen
Hi Listers, I need to know the number of affected (Inserted, deleted, updated) rows by a Query. In MsSQL I use SELECT @@ROWCOUNT, similar to SELECT @@IDENTITY. Is there any @@RowCount similar statement in PostGres?? Alessandro - Liga One Sistemas [EMAIL PROTECTED] - Original Message

[SQL] pg_attribute.attlen -1 for varchar e pbchar fields

2005-06-27 Thread jimmy.olsen
Hi listers, I'm facing a problem getting information from meta tables. The command: SELECT attname, atttypid, attlen FROM pg_attribute where atttypid IN(1042, 1043) The attlen column always returns -1 for bpchar and varchar columns. the postgre version is 8.0.1. When I look the tables in pgAdm