On Wed, Jan 26, 2011 at 10:07 AM, manuel antonio ochoa
wrote:
>
> Hello,
> I have the next :
>
> COUNTONE=`/var/lib/pgsql/bin/./psql -U 'Thor' -d princlocal -p 5432 -h
> 192.170.1.82 -c "select count(*) from monterrey.${NOMBRETB}"`
> COUNTTWO=`/var/lib/pgsql/bin/./psql -U 'Thor' -dprinclocal
On Wed, Jan 26, 2011 at 12:07 PM, manuel antonio ochoa
wrote:
>
> Hello,
> I have the next :
>
> COUNTONE=`/var/lib/pgsql/bin/./psql -U 'Thor' -d princlocal -p 5432 -h
> 192.170.1.82 -c "select count(*) from monterrey.${NOMBRETB}"`
> COUNTTWO=`/var/lib/pgsql/bin/./psql -U 'Thor' -dprinclocal
On 01/25/2011 11:14 PM, manuel antonio ochoa wrote:
I would like it complete and not truncated? That it hasn't been modified
since being
originally written?
OK. First, check the exit code from pg_backup so you detect any
failures. The exit code is reported by the shell on UNIX systems in the
Hello,
I have the next :
COUNTONE=`/var/lib/pgsql/bin/./psql -U 'Thor' -d princlocal -p 5432 -h
192.170.1.82 -c "select count(*) from monterrey.${NOMBRETB}"`
COUNTTWO=`/var/lib/pgsql/bin/./psql -U 'Thor' -dprinclocal -p 5432 -h
192.170.1.82 -c "select count(*) from monterrey.$nombre where re
If it is to order in ascendent fashion by, say, lname,
one possibility would be
SELECT COUNT(b.*) as row_number, a.lname,a.gname
FROM "Table1" a, "Table2" b
WHERE a.lname >= b.lname
GROUP BY a.lname,a.gname
ORDER BY row_number
If you want to order by gname just change the WHERE clause according
Hi, Lu Ying.
How do you define which row is #1 ? And #2 ?
E.g. Ordered by lname? Or gname...?
Best,
Oliveiros
- Original Message -
From: "Emi Lu"
To:
Sent: Wednesday, January 26, 2011 4:11 PM
Subject: [SQL] how to get row number in select query
Good morning,
For postgresql 8.3
Good morning,
For postgresql 8.3, what is the system method/key word to get row number
please?
E.g.,
==
lname1 gname1
lname2 gname2
lname3 gname3
..
I'd like to get
1 lname1 gname1
2 lname2 gname2
3 lname3 gname3
... ...
Something like
select row_number?, lnam