Re: Getting columns in DB order

[prev] [thread] [next] [Date index for 2005/06/14]

From: merlyn (Randal L. Schwartz)
Subject: Re: Getting columns in DB order
Date: 17:46 on 14 Jun 2005
>>>>> "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)

Getting columns in DB order
Sam Tregar 17:06 on 14 Jun 2005

Re: Getting columns in DB order
merlyn (Randal L. Schwartz) 17:35 on 14 Jun 2005

Re: Getting columns in DB order
Sam Tregar 17:40 on 14 Jun 2005

Re: Getting columns in DB order
merlyn (Randal L. Schwartz) 17:46 on 14 Jun 2005

Re: Getting columns in DB order
Sam Tregar 17:49 on 14 Jun 2005

Re: Getting columns in DB order
David Baird 20:03 on 14 Jun 2005

Re: Getting columns in DB order
merlyn (Randal L. Schwartz) 17:47 on 14 Jun 2005

Re: Getting columns in DB order
merlyn (Randal L. Schwartz) 17:48 on 14 Jun 2005

Re: Getting columns in DB order
Charles Bailey 18:02 on 14 Jun 2005

Re: Getting columns in DB order
Sam Tregar 20:10 on 14 Jun 2005

Generated at 16:35 on 28 Jul 2005 by mariachi v0.52