Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sequential numbers in a query

Status
Not open for further replies.

FatOldGit

Programmer
May 30, 2002
7
GB
I need to extract a recordset that has each record numbered sequentially, does anyone know how I can do this? I am intending to save this recordset straight to a .csv file for importing into an application.

Many thanks in advance,

Dave

 
Hi FatOldGit,

You can use the copy command to import and export data between postgresql and CSV files.

Use the [ copy to ] command to create a CSV file from a postgres table.

Use the [ copy from ] command to copy data from a CSV file into a postgres table.

Here is a link to the postgresql doc about the copy command.


I've worked with recordset a little in the windows OS using Visual FoxPro's OLE DB provider connected to a MS-SQL backend server. In order to work with a postgres recordset, I think you need to be working with a language and driver that support recordset.

Postgresql supports connections from java via jdbc. Here some more info:


LelandJ.


Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top