Re: [sqlite] Altering a table when field(column) names are unknown

2006-07-25 Thread John Newby
sqlite-users@sqlite.org Sent: Monday, July 24, 2006 5:29:16 AM Subject: [sqlite] Altering a table when field(column) names are unknown http://www.sqlite.org/faq.html#q13 Hi, the above link goes to an FAQ on the SQLite website stating that the ALTER TABLE command has limited functionality and recommends cre

Re: [sqlite] Altering a table when field(column) names are unknown

2006-07-24 Thread Clark Christensen
and new schemas. -Clark - Original Message From: John Newby <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Monday, July 24, 2006 5:29:16 AM Subject: [sqlite] Altering a table when field(column) names are unknown http://www.sqlite.org/faq.html#q13 Hi, the above lin

Re: [sqlite] Altering a table when field(column) names are unknown

2006-07-24 Thread Martin Jenkins
This is all good when the fields(columns) are known in advance, but how would I attempt doing this without knowing the name of the fields? You need to recast your problem into one where the field names ARE known. ;) Just issue a "pragma table_info(table_name)" as shown below in an sqlite

[sqlite] Altering a table when field(column) names are unknown

2006-07-24 Thread John Newby
http://www.sqlite.org/faq.html#q13 Hi, the above link goes to an FAQ on the SQLite website stating that the ALTER TABLE command has limited functionality and recommends creating a temp table and copying everything there, dropping the original table, re-creating it with the desired changes and