Ok, I might have got your requirement wrong. Could you please elaborate a bit more?
Joined: Feb 23, 2011
actually i have table in SQL server 2000 now i want to use that same table for my different application in postgreSQL that is another database
but problem is that it has afield subject which contains ',' in itself also & when we use to convert table from SQL to postgre we use ',' as delimiters mans end of one column so its increasing the number of columns & thus creating problem
Aditi agarwal wrote:thanks Paul fo your reply my question is related to copying of SQL table to Postgre & when we do such conversions we need to add delimiters
If you converted each row of the table to a string, then yes, you would need some strategy for keeping the columns separate. And yes, using delimiters would be one possible strategy. But there's already two assumptions you have made -- the idea of converting each row to a string, and the idea of using delimiters to separate the columns.
Both of those assumptions are unnecessary. In particular the idea of making a single string out of a row is a bad idea because (as you can see) it immediately raises the question of how to separate the columns. So don't do that. Make each row into some kind of data structure -- there are data structures beyond strings in Java, as I'm sure you know.
Assuming this is a one-off task, why not just export the table to a CSV file, with double quotes around the character columns to cope with the commas inside the text values, then import it into PostgreSQL from the CSV file?