Forum Replies Created

Viewing 15 posts - 61 through 75 (of 851 total)

  • RE: Select top 15 rows per Asset

    Ninja's_RGR'us (8/12/2011)


    All you need to do is answer how can the optimzer stop at only 15 rows knowing that sorting is a blocking operator (nothing else can run untill that...

  • RE: Any easy way to find if duplicate rows exist in a table?

    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...

  • RE: Any easy way to find if duplicate rows exist in a table?

    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....

  • RE: Select top 15 rows per Asset

    Hmm, I'd never thought of using a CROSS APPLY in that fashion. Good thinking there!

  • RE: Avoiding insertion of duplicate rows

    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...

  • RE: Any easy way to find if duplicate rows exist in a table?

    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...

  • RE: Create table by transforming values from string patterns

    l.danks (8/11/2011)


    I'm just being cheeky since I may be able to work it out if I browse the forum a little and it's not crucial (so feel free to ignore)...

  • RE: Better structured case or coalesce

    I think the code already posted is a good reply. As an addendum, you might also check out the nullif() function.

  • RE: Can't see table in Oracle

    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...

  • RE: Split integer valuefrom decimal valye

    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...

  • RE: Oracle PL\SQL for a T-SQL Developer

    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...

  • RE: Table Without a Primary key?

    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...

  • RE: SQL Script

    Try hitting the F1 key. I actually find the SQL Server books online pretty handy.

  • RE: Naming Conventions

    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...

  • RE: Time Varing Numerical Quantity

    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. ...

Viewing 15 posts - 61 through 75 (of 851 total)