Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Record , Row number
Hi
How can i have Row number in my SELECT Statement ?

Thanks


Report this thread to moderator Post Follow-up to this message
Old Post
Elham Ghoddousi
10-27-05 02:25 PM


Re: Record , Row number
Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files; there is no sequential access or
ordering in an RDBMS, so "first", "next" and "last" are totally
meaningless. If you want an ordering, then you need to havs a column
that defines that ordering.  You must use an ORDER BY clause on a
cursor -- the keys have nothing whatsoever to do with the display in
the front end.

You have missed the WHOLE POINT of RDBMS.  Please stop writing code
until you know what you are doing.


Report this thread to moderator Post Follow-up to this message
Old Post
--CELKO--
10-27-05 02:25 PM


Re: Record , Row number
--CELKO--  wrote:
> Let's get back to the basics of an RDBMS. Rows are not records; fields
> are not columns; tables are not files; there is no sequential access or
> ordering in an RDBMS, so "first", "next" and "last" are totally
> meaningless. If you want an ordering, then you need to havs a column
> that defines that ordering.  You must use an ORDER BY clause on a
> cursor -- the keys have nothing whatsoever to do with the display in
> the front end.
>
> You have missed the WHOLE POINT of RDBMS.  Please stop writing code
> until you know what you are doing.
>

Manager: I'm concerned about one of the figures on this report
Deputy: Which one?
Manager: 4th column.
Deputy: Which line?
Manager: Hang on while I count down from the top.
Deputy: Hope you don't mis-count then.
Manager: Aye, you don't wanna be chasing up the wrong thing
Deputy: Can't we just put line numbers on these reports like the old
system had?
Manager: No, Celko said we must go back to the basics of an RDBMS
Deputy: Ah, so you could identify the line to me without counting, just
tell me what's unique about it.
Manager: I could, if I knew WTF was unique about it, you should know us
management types have absolutely no technical knowledge.
Deputy: So these management reports were written for....
Manager: Aye, technical people to read.

If Elham gets his answer, his managers will have more time to play with
their newton's cradles.

Report this thread to moderator Post Follow-up to this message
Old Post
Trevor Best
10-27-05 02:25 PM


Re: Record , Row number
LOL

Sometimes seemingly silly requests have perfectly sensible reasons
behind them, and sometimes the reason is even stupider than the
request.  Our purpose is not to question why, but rather to do as we
are asked and to take the blame like men.

-- Mark D Powell --


Report this thread to moderator Post Follow-up to this message
Old Post
Mark D Powell
10-27-05 10:28 PM


Re: Record , Row number
LOL!

One of the other basic concepts is that you do reports in the front end
and not in the database.   There are days I miss green bar paper.


Report this thread to moderator Post Follow-up to this message
Old Post
--CELKO--
10-28-05 02:23 PM


Re: Record , Row number
>One of the other basic concepts is that you do reports in the front end
>and not in the database

which in many cases is very inefficient to put it mildly. Front ends do
change way more frequently than back ends. Several front ends may
connect to one and the same back end. For instance, if I have
- Java beans
- COM objects
- Crystal Reports
- C++ modules running on Linux
- ASP.Net Web pages

accessing one and the same database, why should anyone redo one and the
same simple tedious work line numbering lines 5 times?
Any decent database developer can do it just once, and easily.
If Crystal Reports are phased out and replaced by something else, the
database developers' work will still be in place, ready to be utilized
by whatever else comes into play next


Report this thread to moderator Post Follow-up to this message
Old Post
Alexander Kuznetsov
10-28-05 04:23 PM


Re: Record , Row number
--CELKO-- wrote:

> There are days I miss green bar paper.

I miss Mr. Angry who used to fly around the building like an Andrex
puppy and shouting about someone printed an object file instead of a
source file. You can take his place Joe :-)

Report this thread to moderator Post Follow-up to this message
Old Post
Trevor Best
10-29-05 12:23 PM


Re: Record , Row number
>>  Front ends do change way more frequently than back ends. Several front e
nds may
connect to one and the same back end. <<

Which is why you do the reporting and formatting in the front end and
keep the back end as simple, standard  and clean as possible.  The last
thing you want is a query set up for report X1 on product Y1 and a
logically equivalent query set up for report X2 on product Y2 with
different formatting.   Remember the goal of databases and tiered
architectures -- remove redundancy!


Report this thread to moderator Post Follow-up to this message
Old Post
--CELKO--
10-29-05 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:04 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006