Forum Replies Created

Viewing 15 posts - 151 through 165 (of 245 total)

  • RE: Cumulative function or calculation

    try this

    declare

    @value int

    set

    @value = 0

    update

    yourtable

    set

    @value = @value

    www.sql-library.com[/url]

  • RE: Foreign key to 2 tables

    as a general rule of thumb where possible always use foriegn key constraint to enfore referential integrity instead of triggers.

    www.sql-library.com[/url]

  • RE: Foreign key to 2 tables

    yes triggers can maintain denormailised figure and ensure fk constraint accross dbs but this is not the place to use them .

    " use triggers to enhance referential integrity more so...

    www.sql-library.com[/url]

  • RE: Foreign key to 2 tables

    why would you want to break the referential integrity of the db introduce triggers that have to be maintained and ensure that the domain of you foreign keys are exclusive...

    www.sql-library.com[/url]

  • RE: alter procedure in merge replication

    Dont htink so

     

    upgrade to sql2005

    www.sql-library.com[/url]

  • RE: Foreign key to 2 tables

    What you going to do if the key values overlap? You wont know which table its really pointing at if there is a matching record in both. 

    umm i reckon you would...

    www.sql-library.com[/url]

  • RE: alter procedure in merge replication

    sql2000 does replicate schema changes you must reinitialise the subscriptions.

    www.sql-library.com[/url]

  • RE: Conditionally Incrementing a Counter in a While Loop

    Forgot the interval bit

     

     

    declare

    @i int, @interval int

    set

    @i = 0, @interval

    www.sql-library.com[/url]

  • RE: Conditionally Incrementing a Counter in a While Loop

    Have a go with this.
     
     
    declare @i int

    set @i = 0

    update  RandomPermTable

    set @i...

    www.sql-library.com[/url]

  • RE: COALESCE by UserID

    ah yes didnt spot that was using different DDL code

    www.sql-library.com[/url]

  • RE: Error Processing cube when tie dimension is added??

    Thanks Adam Unfortunatly this wont solve the problem.

    The strange thing is that- i create two cubes with same data source using the same fact table and the same dimension in...

    www.sql-library.com[/url]

  • RE: COALESCE by UserID

    umm have you actually run the code. NOt sure why your getting nulls.

    Rather than assuming id and extra column i am would insert the records in a tables variable which...

    www.sql-library.com[/url]

  • RE: COALESCE by UserID

    Heres a solution that doesnt use a loop (cursor) and should therefore by more efficient.

    ------------DDL----------------

    -- prepare test data

    declare

    @table table

    www.sql-library.com[/url]

  • RE: Stored Procedure

    probably one of the data parameters is being passed in as a string

    www.sql-library.com[/url]

  • RE: CASE Statement in Table Check constraint?

     

     'If DateClosed is null could have an unknown value'

     

    What do you mean by 'could'?

    Is what your suggesting is that

    where null is null

    could/should (?) return as unknown.

    The...

    www.sql-library.com[/url]

Viewing 15 posts - 151 through 165 (of 245 total)