Re: Resettin Running Total
From: Scorcel (Scorcel_at_discussions.microsoft.com)
Date: 08/15/04
- Next message: RG: "Re: UDF and Default parameters"
- Previous message: Anith Sen: "Re: Display data "rolled up""
- In reply to: Joe Celko: "Re: Resettin Running Total"
- Next in thread: G.C.Mandrake: "Re: Resettin Running Total"
- Messages sorted by: [ date ] [ thread ]
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!
>
- Next message: RG: "Re: UDF and Default parameters"
- Previous message: Anith Sen: "Re: Display data "rolled up""
- In reply to: Joe Celko: "Re: Resettin Running Total"
- Next in thread: G.C.Mandrake: "Re: Resettin Running Total"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|