Forum Replies Created

Viewing 15 posts - 1,006 through 1,020 (of 2,894 total)

  • RE: Why does my SUMFUNCTION doesn't work?

    davdam8 (10/26/2012)


    It returns 3 values:

    370015.120000

    20000.000000

    123812.953300

    Just three rows?

    Or it does return this:

    370015.120000

    370015.120000

    20000.000000

    20000.000000

    123812.953300

    123812.953300

    123812.953300

    The sum you have mentioned is the SUM of the above sequence....

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: transform a list in a string with a carriage return ? how to ?

    declare @tMaster table (idMaster int, textFR varchar(20), textEN varchar(20))

    declare @tChild table(idChild int, idMaster int, textFR varchar(20), textEN varchar(20))

    INSERT INTO @tMaster values(1, null, null), (2, null, null)

    INSERT INTO @tChild values(1,1 ,'element...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Why does my SUMFUNCTION doesn't work?

    davdam8 (10/26/2012)


    Go easy on those QUERIES, just a rookie here!

    Can't figure it out here:

    Why SUM of (123812,953300 + 20000,000000 + 370015,120000) result used in the query below = 1151469,099900...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Suggestion to avoid Cursor

    ...

    UPDATE fi SET fi.cor = 'Y', fi.tam = 'Z'

    FROM fi (NOLOCK)

    WHERE (case when fi.ref = '' THEN fi.oref ELSE fi.ref end)...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Which way is better? To join or not to join or does it matter?

    GilaMonster (10/26/2012)


    That's doubly wrong, because EXISTS with correlated subqueries does not perform equally with joins, it's usually very, very slightly better (and actually they're not even equivalent query forms)

    Agree with...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Is there a Coalesce LIke function that returns the lowest/highest value of a set of params passed to it

    There is another way, I'm not sure about it's performance, but it takes less lines :hehe::

    CREATE FUNCTION dbo.FindMinMaxDate4 (@v1 DATETIME, @v2 DATETIME, @v3 DATETIME, @v4 DATETIME)

    RETURNS TABLE WITH SCHEMABINDING AS

    RETURN

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Primary Key Implementation Issue

    Use surrogate Primary Key (the best and simple in in SQL server will be having INT IDENTITY PK, you don't need to add "firstname+lastname" to it). Use IndividualPersonalKey as another...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: design database

    harri.reddy (10/22/2012)


    guys,

    they gave me docs,which field they need and what lenght of data type.

    my question is ,should i create logical /physical data model or start making table in sql server...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Force result order

    davdam8 (10/22/2012)


    Here it goes

    SELECT PROJ, CARAC

    FROM X

    WHERE CARAC<>''

    ORDER BY CASE WHEN CARAC= 'None' THEN CARAC ELSE CARAC END DESC

    This is what I got at the moment.

    Thanks

    Regards!

    Can you that is a...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Identity column and the seed

    ...

    Is that a claim that any design using identity (or any other auto-generated surrogate key) is inherently awful ...

    Yes it is his claim, and you can find it in one...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Adding linked records

    You don't need to duplicate your posts 😉

    http://www.sqlservercentral.com/Forums/Topic1375152-1292-1.aspx

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Adding a composite record to 2 tables

    In short: you can use INSERT with OUTPUT clause.

    But, if you could specify which table you are going to load your data from, that would allow to advice you in...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: why this condition fail (IF 1 <> 1)

    If you really want, you can code it like that:

    IF 1 <> 1

    BEGIN

    EXEC ('ALTER DATABASE TempDB SET RECOVERY SIMPLE WITH NO_WAIT')

    END

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Join

    Plzz follow this: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    😉

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: STATISTICS IO/TIME

    ...and plan offers to create an index.also logical reads decrease

    CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]

    ON [dbo].[Trans] ([Kind],[Date])

    INCLUDE ([ReferenceNum],[UID],[Success],[Counter])

    Then go for it!

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 1,006 through 1,020 (of 2,894 total)