|
Posted by Slower Than You on 11/19/06 01:08
--CELKO-- wrote:
> You do not have a table at all; it is an attempt to mimic a deck of
> punch cards. You confuse columns and fields, rows and records and use
> the wrong data types.
>
> do these transactions create a customer or a sale? Why is there DDL
> in narratives? Why did youn use an IDENTITY columns? Why FLOAT for
> money?
Forget about the datatypes; they are largely irrelevant to the problem
I am trying to solve. I have abstracted the problem to attempt to make
it as easy to explain as possible. The real table I am trying to update
is, in fact, not called CustTransactions and has nothing to do with
"customers" and it does, in fact, have a non-monetary floating point
value that is the focus of my update. You are reading more than I
intended into the column names I've used in my example.
> Did you know that SQL has no Boolean data type? That using BIT is
> proprietary and an awful coding practice? We updated punch cards like
> you are doing because we had no choice about it.
No, I didn't know that SQL has no boolean data type, and that BIT is
proprietary, so thanks for that information. You can pretend it is an
integer type if you prefer. Again, do not read anything into the table
and field names I have used in my abstract example - just assume that
there is a True/False type flag that I need to record for each row
according to the critera I outlined.
> >> What I'm doing at the moment is a "SELECT * FROM CustTransactions
> WHERE CustSelected = TRUE ORDER BY AmountSpent;", programatically
> looping through all the records [sic] until AmountSpent > 50000, then
> continuine to loop through the remainder of the records [sic] setting
> CustSelected = FALSE.
>
> You did not say what to do about ties; if I have five sales of
> $50,000.00 which one would I mark?
>
> give us a RELATIONAL spec and we can probably help you
Please have a look at my reply to Razvan, which I hope describes the
problem I am trying to solve more accurately than my previous post
(which was not as coherent as it might have been, for which I
apologise).
--
SlowerThanYou
Navigation:
[Reply to this message]
|