Forum Replies Created

Viewing 15 posts - 616 through 630 (of 2,894 total)

  • RE: Split a String

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    by Jeff Moden

    _____________________________________________
    "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: inserting data from one table to another and want to create primary key at same time

    Jeff Moden (3/12/2013)


    demonfox (3/12/2013)


    When you use

    Select Into

    the columns created would take the data type ,nullability etc. properties from the columns available in FROM clause.

    so make sure you have SOFTWARE_NAME_ORIGINAL...

    _____________________________________________
    "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: inserting data from one table to another and want to create primary key at same time

    opc.three (3/12/2013)


    Eugene Elutin (3/12/2013)SELECT INTO is "performance winner", why would creating table first be better?

    Not always. You can achieve minimal logging with INSERT INTO...SELECT as well. Some people prefer to...

    _____________________________________________
    "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 do some of these procedure calls have syntax errors?

    Curiosity?

    Then this great story is for you: http://www.classicreader.com/book/899/1/

    I've already mentioned it last day...

    _____________________________________________
    "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 do some of these procedure calls have syntax errors?

    Tobar (3/12/2013)


    I see that, or the absence of it I guess. With a closer reading of the documentation I see it does not specify a function as a valid parameter....

    _____________________________________________
    "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: MULTIPLE INSERT IN A DESIRED SEQUENCE

    you can use some sys tables (or any other available table) as kind of tally one:

    INSERT YourTable (COMCOD, ACTCODE, ACTDESC)

    SELECT TOP 10

    ...

    _____________________________________________
    "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: software adds comp_companyid that distors my sql results

    Sergiy (3/11/2013)


    You may try to use WITH ROLLUP option in your query.

    It won't remove all the rows with CompanyID's from the final recordset, but will add 2 records to it"

    YEAR...

    _____________________________________________
    "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: inserting data from one table to another and want to create primary key at same time

    demonfox (3/12/2013)


    Or , even better , don't use select into ..

    Just create a table first and then Insert values into it ..

    I find it better than Select into .

    Could 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: Can Someone Explain These Wait Times to Me?

    I cannot see the picture here. (company policy stops downloads)

    If you only collect total wait time, then it's really hard to say anything, as it just accumulates everything.

    _____________________________________________
    "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: sqlcode vs sp

    fmuzul (3/11/2013)


    ...

    I completely disagree on your statement "there is no way to write good performing code for database without understanding how database (and its engine) works". I drive my car...

    _____________________________________________
    "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: Can Someone Explain These Wait Times to Me?

    What exact counter are you calling "total wait"? If it is wait_time_ms then you should remember that it shows accumulated wait times since the server was restarted, therefore high...

    _____________________________________________
    "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 query 4 weeks 3 business days

    Calendar weeks or working weeks?

    What is your definition of a week? Is it Monday To Friday? Is it Monday to Sunday?

    Is it Sunday to Saturday? Or may...

    _____________________________________________
    "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: Updaing using ROW_NUMBER()

    You don't need ROW_NUMBER here:

    declare @table table (ID int, Name varchar(100))

    insert @table select 1,null

    insert @table select 2,null

    insert @table select 3,'Bill'

    insert @table select 4,null

    insert @table select 5,null

    insert @table select 6,null

    insert...

    _____________________________________________
    "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 query 4 weeks 3 business days

    David Mando (3/11/2013)


    Hello,

    I need to write a query that returns a result set that is within the past 4 weeks and 3 business days. For example, the result set for...

    _____________________________________________
    "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: sqlcode vs sp

    ...

    But, the most important thing, is that making the change in a C++ procedure let me use the full power of the C++ language. Can't be beaten by any T-SQL,...

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