[SQL] Need help on update.

2010-10-21 Thread Nicholas I
= (select name from table2) where table2.sn_. *UPDATE table1 inner join table2 on table2.sn_no = table1.sn_no set table2.name = table1.name;* ERROR: syntax error at or near inner LINE 1: UPDATE table1 inner join table2 on table2.sn_no = table1.sn_... -Nicholas I

Re: [SQL] Need help on update.

2010-10-21 Thread Nicholas I
that was amazing, it worked thanks a lot. -Nicholas I On Thu, Oct 21, 2010 at 1:40 PM, Richard Huxton d...@archonet.com wrote: On 21/10/10 08:43, Nicholas I wrote: Hi, there are two tables, table1 and table2, each having same column name called sn_no,name. i want to update table1 names

[SQL] find and replace the string within a column

2010-09-24 Thread Nicholas I
) - -Nicholas I

[SQL] pgdump with insert command help

2010-09-24 Thread Nicholas I
hi, i am trying to dump a table with insert command rather tahn copy. pg_dump -Dt --insert table dbname table.sql; i am not able to get the output. is this correct ? -Nicholas I

[SQL] insert into help

2010-09-22 Thread Nicholas I
the values of table 2 into table 1, with automatic id's. insert into table1(select * from table2); is not working, how can i append the data to table 1 with auto incremented or nextval. -Nicholas I

[SQL] help

2010-05-07 Thread Nicholas I
Hi, I have a table in which the data's are entered like, Example: One (1) Two (2) Three (3) I want to extract the data which is only within the parentheses. that is 1 2 3 Thank You Nicholas I

[SQL] Need a help in regexp

2010-05-06 Thread Nicholas I
outputs the data as, {test} {test2} Thank You Nicholas I

Re: [SQL] Comparing two tables of different database

2009-04-30 Thread Nicholas I
did not understand about the dblink. is there any exaples on dblink. can we do it without using dblink. -Nicholas I On Thu, Apr 30, 2009 at 9:07 AM, Joshua Tolley eggyk...@gmail.com wrote: On Thu, Apr 30, 2009 at 08:20:02AM +1000, Adam Ruth wrote: The simple answer is to pg_dump both

[SQL] Comparing two tables of different database

2009-04-29 Thread Nicholas I
Hi, can anybody me suggest me, how to compare two tables of different database. -Nicholas I

[SQL] Table to Excel

2009-03-26 Thread Nicholas I
Hi , Does any one how to convert table to excel. I just tried the COPY table_name to '/home/user/output.xls' using delimiters ','; but the out put of the table that is the column in a table are tab separted, all were merged in a single cell. -Nicholas I

[SQL] Insert a space between each character

2008-09-17 Thread Nicholas I
Hi, can anybody help me, to insert a space between each character in postgresql. for example, ABC output A B C -Dominic