Forum Replies Created

Viewing 15 posts - 661 through 675 (of 2,894 total)

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    prakashr.r7 (3/4/2013)


    Eugene Elutin (3/4/2013)


    if you want unique values then use 36-base encoding function from here:

    http://www.sqlservercentral.com/Forums/Topic1267659-391-2.aspx

    That one will generate unique values and it will "automatically" determine the size required based on...

    _____________________________________________
    "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: How to uncommit the transaction and execute the next statement in the cursor?

    if you want unique values then use 36-base encoding function from here:

    http://www.sqlservercentral.com/Forums/Topic1267659-391-2.aspx

    That one will generate unique values and it will "automatically" determine the size required based on how many numbers...

    _____________________________________________
    "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: How to uncommit the transaction and execute the next statement in the cursor?

    You can do it using user defined function with a help from small view which makes NEWID() safe for use in UDF's:

    CREATE VIEW dbo.UDFSafeNewIDBase AS SELECT NEWID() as SafeNewId

    GO

    -- will...

    _____________________________________________
    "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: confused With View , Function and Store Procedure

    vahid.arr (3/4/2013)


    1-for example in insert , delete , update i must use function or store procedure? could u give me example for store procedure and function

    2- if our select has...

    _____________________________________________
    "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: Query optimisation

    You didn't specified how exactly these "5 phone numbers" are given to you and didn't specified how you want to return the result. Based on you description looks like you...

    _____________________________________________
    "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: how to do this?

    with such minimum details...

    select id

    ,max(case when custom_id= 98 then comments else null end) As CEO_Comments

    ,max(case...

    _____________________________________________
    "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: confused With View , Function and Store Procedure

    vahid.arr (3/4/2013)


    i get confused where to use function , store procedure and view.plz help me

    😉

    What do you mean by "confused"? What exactly troubles you?

    View - it's kind of virtual...

    _____________________________________________
    "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: get the first and last day of any Year/Month

    Ough!

    Gentlemen, no needs to argue so much on this subject. I guess everyone involved in this discussion is right on some points. 1900 is definitely more recognisable than 22800,...

    _____________________________________________
    "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: Query Help

    or use PIVOT

    select CourseID, [Q1], [Q2], [Q3], [Q4]

    from #x2 p

    pivot (count(ScheduleTerms) FOR ScheduleTerms IN ([Q1],[Q2],[Q3],[Q4])) pvt

    BTW, Cross-tab based on WHEN is usually faster...

    _____________________________________________
    "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: get the first and last day of any Year/Month

    ...

    I guess I'll have to retest on that. In multiple different threads, Michael and Peter showed that controlling the order of execution within the formula with parenthesis performed worse...

    _____________________________________________
    "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: building a dataset !

    salmita (3/1/2013)


    Hi,

    I just understand my need actually,

    I have 6 lists in Sharepoint that depend on another list

    and i wanna know how can i do a join between...

    _____________________________________________
    "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 a doomed transaction inevitable if deadlock occurs in a trigger (SQL Server 2008 R2)?

    ...

    He wants his original SQL statement to complete, but I'm not sure that's possible once you've encountered a constraint error. A relational transaction is, by definition, "all or none":...

    _____________________________________________
    "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: A complicated situation

    replace:

    NULLIF(Result,1)

    with:

    CASE WHEN Result = 2 THEN Result ELSE NULL 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: get the first and last day of any Year/Month

    This cut down number of CPU cycles when performing multiplication as it takes less number of bit-moves for multiplying smaller numbers - I should accept that it's hard to measure...

    _____________________________________________
    "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: sql pivot problem with unknown number of records to columns.

    Another version with use of dynamic SQL produces required output:

    SET NOCOUNT ON;

    -- setup sample table

    SELECT ID, NAME

    INTO #testEnvironment

    FROM (VALUES(1,'a'),(1,'b'),(1,'c'),(1,'d'),(2,'e'),(2,'f'),

    ...

    _____________________________________________
    "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 - 661 through 675 (of 2,894 total)