Re: Resettin Running Total

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Scorcel (Scorcel_at_discussions.microsoft.com)
Date: 08/15/04


Date: Sat, 14 Aug 2004 22:37:01 -0700

Thanks Celko: Your right! I was not sent to a RDMS training so I missed lots
of important Items to take note in creating databases. But this system has
been running for almost five years now! and was created by other people and
is now forwarded to me. Well, yes I'll find some time reading the Relational
Database Management System (RDMS) is this correct?. Anyway, at least you
could have told me how make the my SQL Statement give me the correct
information, or did you understand what I mean. So far its returning other
information that I asked from my query like the Over-All running Total its
doing OK, exept this resetting Running Total. Again Thank you very much.

"Joe Celko" wrote:

> Your *real* problem is that you do not know how to program in SQL.
>
> 1) All the columns are NULL-able, so this can never have a key. Without
> a key, this is not a table and I'll bet that ity is full of garbage.
>
> No DRI, no defaults, no CHECK() constraints; this is a poorly designed
> file at best. And the only date format allowed in Standard SQL is
> ISO-8601.
>
> 2) You never read ISO-11179 or took a data modeling course, so you are
> puting those silly datatype prefixes on the columns. This destroys the
> data dictionary (which you probably do not have anyway).
>
> 3) Running totals are a report. We do reports in the front end with
> report writers and format data in the front end. You do not do this in
> the database. This the whole idea of tiered architectures.
>
> >> I'm not sure if it will display right (the sample data). My problem
> is I want to have a resetting running total, meaning I will have a
> running total on the intQuantity Field [sic] Per txtLotCode, and would
> reset to 0 every new value in txtlotCode. <<
>
> This is a description of a sequential file being read one record at a
> time. Rows are NOT records, columns are NOT fields!! Reset? Explain
> how you reset in an unordered set.
>
> >> Any help would be appreaciated. Thank you very much.<<
>
> Please at least read a book on RDBMS, if your boss will not pay for your
> much needed training.
>
> --CELKO--
> ===========================
> Please post DDL, so that people do not have to guess what the keys,
> constraints, Declarative Referential Integrity, datatypes, etc. in your
> schema are.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
>



Relevant Pages

  • Re: Problem with query
    ... I am having problem in showing data in database. ... Group on "StudId" and build 2 running totals. ... with Evalualtion Use a formula: ... and Reset on Change of Group. ...
    (microsoft.public.vb.crystal)
  • How would the God of Standard Sql - Celko do server side paging?
    ... On a very large database, how would Celko implement paging. ... To do paging on the database side, you must use some sort of ordering/ ...
    (microsoft.public.sqlserver.programming)
  • Re: How would the God of Standard Sql - Celko do server side paging?
    ... Having been an occassional vocal opponent of Celko, ... asking you to stop trolling this forum for him. ... To do paging on the database side, you must use some sort of ordering/ ...
    (microsoft.public.sqlserver.programming)
  • Re: Looping an Update Query?
    ... but do you agree with Mr. Celko? ... I believe I should be able to put whatever I want in front of my database ... >> design and structure was! ... >> UPDATE tblPosition SET ...
    (microsoft.public.sqlserver.programming)
  • Running Sum 2000 in 2003
    ... I have an Access database created for 2000 for multiple users which contains ... reports with running totals. ... Dim AcApp ...
    (microsoft.public.access.reports)