inserting many columns

25 pts.
Tags:
SQL commands
i want to insert new columns like day1, day2, day3, etc. in a database by passing a veriable in day(n), please help me what i can do for this

Software/Hardware used:
foxpro 2.6

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: 4  Replies

 
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
  • TomLiotta
    Columns would be added to a 'table' rather than to a 'database'. But if you want to "pass a variable", what are you expecting to "pass" it to? When anyone wants to pass a variable, it usually implies some function or procedure that would be used multiple times with different values. How would you add the columns to a table multiple times? -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Sorry Tom, I think you missed the software/hardware used.  This question as stated makes sense for Foxpro which is both a programming language and dbms where each table is called a dbf, data base files.   However, rather than add columns to the table you probably need a second table with a key matching the first table, a day number field which is also part of the key and a value field.  That would start you off with a normalized data structure. Phil
    49,840 pointsBadges:
    report
  • TomLiotta
    Ah, Foxpro... you're right. I saw the SQL commands and missed Foxpro 2.6. The reference to "database" makes a little more sense.   But the basic issue is still the purpose of a "variable" for this. By understanding what is expected of a "variable", an answer might be possible regardless of the software. Why not simply add the desired columns and be done with it? What business problem is needing to be solved? (Especially for a version that's going on a couple decades old. If the columns weren't needed a year ago, what made them important now?)   Tom
    125,585 pointsBadges:
    report
  • carlosdl
    My first recommenadtion would be to review your database design.
    69,175 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