Viewing 15 posts - 61 through 75 (of 851 total)
Ninja's_RGR'us (8/12/2011)
August 12, 2011 at 3:06 pm
Tom.Thomson (8/11/2011)
in the case of a composite key you may get duplicates by excluding a part of the key, you don't have to exclude the whole key
Absolutely. The classic...
August 11, 2011 at 5:28 pm
Tom.Thomson (8/11/2011)
A multi-column key is usually a natural key
In my own designs, composite keys tend to occur on many-to-many relationship bridging tables, so not necessarily a natural key at all....
August 11, 2011 at 4:26 pm
Hmm, I'd never thought of using a CROSS APPLY in that fashion. Good thinking there!
August 11, 2011 at 3:47 pm
If all you need to do is an insert, then the INSERT INTO... with a NOT EXISTS (or a LEFT OUTER JOIN) to check that the record isn't already...
August 11, 2011 at 3:39 pm
MadTester (8/11/2011)
In addition to Tom's solution, there is another modification here to return rows where the Identity for the table has been excluded from the comparison.
Nice change. You could...
August 11, 2011 at 3:28 pm
l.danks (8/11/2011)
August 11, 2011 at 2:39 pm
I think the code already posted is a good reply. As an addendum, you might also check out the nullif() function.
August 11, 2011 at 2:32 pm
Um... am I right in thinking that Oracle Express is not the same as the usual Oracle RDBMS? I vaguely remember something about that, but I haven't looked...
August 8, 2011 at 9:52 pm
If you can't use convert(), you can always use cast(). BTW, I can't remember how floor() behaves for negative numbers, but I know there's a reason I end up...
August 8, 2011 at 9:36 pm
You might want to try querying to work out which rows are giving you duplicates. Something like the latter should work (based on the code you supplied):
selectHIT.DATE_1,
count(*)
fromCLEAN_DATA_0500 CLN
inner join
HIST_INSTANCE_TBL...
August 8, 2011 at 9:18 pm
I think in some transactional logging tables or even metric-only fact tables, you could well get (correctly) duplicate rows. In the past I've added a surrogate key in such...
July 19, 2011 at 4:32 am
Try hitting the F1 key. I actually find the SQL Server books online pretty handy.
July 19, 2011 at 4:25 am
I don't treat naming database objects as distinct from naming any other kind of object. Code Complete by Steve McConnell has one of the best discussions on how to...
July 19, 2011 at 4:21 am
PaulB-TheOneAndOnly (7/18/2011)
If your core Data Warehouse is not a collection of simple Datamarts then you are in serious troubles, most probably caused for not following dimensional design 😀
Hmm. ...
July 18, 2011 at 12:06 pm
Viewing 15 posts - 61 through 75 (of 851 total)