Insert Multiple rows

25 pts.
Tags:
PostgreSQL
I have several hundred records to insert into a database My issue is only one column is variable, that is for example Column1 will always be the same, column2 will change, and the remain columns will also be repeated with one caveat, there is an auto generated field in the mix I need to skip. Date |ID |Key Field | State|County|....... Same|variable|Auto Generated| Same|Same|............. I am not sure how to create the insert statement

Software/Hardware used:
Postgresql
ASKED: July 25, 2012  1:56 PM
UPDATED: July 26, 2012  6:15 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    not up on PostgreSQL but assuming that it resembles other SQL's and that you have the one column that you need is a file.   Insert into lists the columns in the target except that auto increment column .. it takes care of itself (Third Column in this example).   INSERT INTO MyTarget (FirstCol, SecondCol, Fourth Col) Select 'Constant 1', 'Constant 2', FieldFromSource From MySource   Enjoy!
    48,545 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following