Re: Getting columns in DB order
[prev]
[thread]
[next]
[Date index for 2005/06/14]
>>>>> "Sam" == Sam Tregar <sam@xxxxxx.xxx> writes:
Sam> On Tue, 14 Jun 2005, Randal L. Schwartz wrote:
>> The "order" of columns in a table is supposed to be an implementation
>> detail, irrelevant to all well-written code. Why do you care?
Sam> Do you carry that philosophy into your UI as well? This CSV data will
Sam> end up in Excel for analysis outside my app. Do you really think
Sam> column order doesn't matter there?
The order of the columns in the *database* shouldn't matter. Yes, you
should have some sort of out-of-band description about the particular
columns your reports will have. That's not the job of the database.
The job of the database is to give you the data. The job of your
report is to format that in a manner necessary for the next step.
>> Just name the columns in the order that you want them.
Sam> These names aren't arbitrary. I can't just rename "city" to "10_city"
Sam> and pretend no-one will notice!
"name them" as in "select address, city, state" instead of "select *".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
|
(message missing)
|