Archives of the TeradataForum
Message Posted: Thu, 18 Jan 2001 @ 17:53:00 GMT
How about we use the machine, guys?
/***** * A more generic, Teradata-type solution! *****/ SELECT COUNT(*) FROM DrugPriceGroup; SELECT COUNT(DISTINCT HASHROW(DrugCode, BeginDate, EndDate, EAC, DATE)) FROM DrugPriceGroup;
The only problem with this is that we generate a BYTE variable, which can't be CAST into an Integer. But if the solution that Sudarsan suggests works, then this would work as well. Notice that I left off the time, because SQL is a "set" language, so the time isn't set for each individual record, but as a set that is "joined" to the other data set from the table. In other words, the time won't be different for any of the resulting values.
Or maybe I'm overdoing it?
Frank C. Martinez IV
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|