Forum Replies Created

Viewing 15 posts - 496 through 510 (of 2,894 total)

  • RE: Possible to use tored proc to kill all queries running longer than 2 hours AND are blocking other queries

    GilaMonster (5/8/2013)


    Can you be a bit clearer what you want?

    Kill all the queries that have been running for 2 hours and have been blocking other queries for 2 hours?

    Kill all...

    _____________________________________________
    "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 seems to be constrained by single core CPU in multiple core server - any suggestions?

    caspersql (5/8/2013)


    ChrisM@Work (5/8/2013)


    Can you post the actual execution plan as a .sqlplan attachment please? Makes this kind of exercise much easier.

    This query was so long-running (over 2 days) that I...

    _____________________________________________
    "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: LEFT and RIGHT of Delimiter

    No real need for dbo.DelimitedSplit8K here if you only expect maximum two parts (left and right). The following will work a bit faster (please note extended sample data):

    IF OBJECT_ID('tempdb..#TempTable') IS...

    _____________________________________________
    "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: if does not exist then insert row

    Also, you could use MERGE, which can be extended to update non-matched records or/and delete some:

    MERGE lookuptable AS dest

    FROM lookuptable1 AS src

    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: Query seems to be constrained by single core CPU in multiple core server - any suggestions?

    First of all your check for a.FieldIDNumber = '1' should better be moved into WHERE clause:

    SELECT

    MySelectList

    FROM SourceTable a

    LEFT JOIN SourceTable a1

    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: Can a CURSOR be populated by firing a stored procedure?

    Actually you can, if you really want or need to!

    You should use cursor datatype in output parameter of your procedure. Here you will find a sample:

    http://msdn.microsoft.com/en-GB/library/ms175498(v=sql.105).aspx

    Should, also mention that this...

    _____________________________________________
    "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: compare varchar dates

    Phil Parkin (2/13/2013)


    mister.magoo (2/12/2013)


    dubem1-878067 (2/12/2013)


    I have a varchar column containing dates (not my design) with this format 2013-02-12

    I need to extract records between two dates

    this code will do...

    _____________________________________________
    "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: Run-time error "-2147467259 (80004005):

    khayamshah52 (5/8/2013)


    heloo dear ..

    i am facing this error from last 4 days ...... please give me solution .

    Run-time error "-2147467259 (80004005):

    [Microsoft][ODBC Driver Manager]Data source name not found and no default...

    _____________________________________________
    "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: OPENROWSET - SYNTEX ERROR NEAR @CMD

    skb 44459 (3/21/2013)


    -- this works fine

    SELECT a.* FROM OPENROWSET('SQLNCLI', 'Server=sql01;Trusted_Connection=yes;', 'SELECT * from syte_APP.DBO.employee') AS a

    -- this code gives me error

    DECLARE @Cmd VarChar(4000)

    SET @CMD =...

    _____________________________________________
    "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: Conversion from varchar to strong data types

    Drammy (3/21/2013)


    Thanks for the quick reply.

    And thanks for the suggestion with the money data type.

    I understand what ISNUMERIC is used for; that was just an example.

    I was just trying 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: SQL to divide one row by another row based on formula or rule.

    shashi.bi245 (3/21/2013)


    Thanks for the replay.

    I am having almost 600 records, so is there any other way to get the result without case statement.

    What hardware are you using to run your...

    _____________________________________________
    "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: Conversion from varchar to strong data types

    ISNUMERIC doesn't guarantees that the value is of NUMERIC datatype.

    It's only the indicator if the value can be converted into one of many SQL Server numeric data types (exact...

    _____________________________________________
    "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: Function in where clause

    ... however I can see in the proc the same table is called again later on, so putting in a temp table may be the way to go.

    Then it's logical...

    _____________________________________________
    "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: script

    frecal (3/21/2013)


    yes thats correct. To be honest i havent gotten very far . I have never used coalesce update query.

    are there any examples about?

    Many thanks

    I don't think you will get...

    _____________________________________________
    "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: Average hourly rowcounts

    You should start to help our helpers (link at the bottom of my signature), by supplying DDL and sample data insert scripts instead of "I have table like that..." thing.

    But...

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