Forum Replies Created

Viewing 15 posts - 1,696 through 1,710 (of 2,894 total)

  • RE: Replacement for Cursors

    There are always ways to avoid CURSOR.....

    Cannot agree with above.

    There are cases when you cannot avoid using a CURSOR.

    _____________________________________________
    "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: replace function

    Lynn Pettis (4/25/2012)


    Does anyone see anything wrong with this where clause?

    Where PortfolioBaseCode = Replace(@Portfolios,'@','') as reportheading1

    Let me try!

    I think it is a sub-query (inner select) of the larger query.

    Something inserting...

    _____________________________________________
    "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: What's a Reasonable Timeframe for a Cursor To Remain Open On SQL Server?

    Again, the main aim of the vendor is not to produce good software but to sell any crap one for the profitable price to maximum possible number of customers.

    I would...

    _____________________________________________
    "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: What's a Reasonable Timeframe for a Cursor To Remain Open On SQL Server?

    There are no "reasonable threshold", as no-one in their right mind would keep cursors on the permanent tables opened for hours on every day...

    They MUST change the design, or...

    _____________________________________________
    "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: data type conversion

    use CONVERT or CAST function

    _____________________________________________
    "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 Merge two rows into one?

    ...

    But your query does not return all data, as my query returns a few records with charge amount while yours only the first transaction and it ignores the rest...

    The query...

    _____________________________________________
    "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: Trying to Pull Records from Two Tables With Conditions

    ...

    It is amazing how often those of us in the field come up with far better solutions than the vendors come up with. Of course the stuff they come up...

    _____________________________________________
    "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 local variable value

    What do you mean by "getting same value in qtd"?

    You're setting and selecting single @qtd and you're getting the one selected!

    You don't have any loop to expect "each value".

    _____________________________________________
    "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 Merge two rows into one?

    Check the query plan (Ctrl + M)

    _____________________________________________
    "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: create defferent table for login

    vahid.arr (4/24/2012)


    i have userid pk and i want also make username and password field uniqe.how can i do that?

    You can create unique index (or unique constraint) on username. Why 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: Record Delete is slowing server

    Grant Fritchey (4/24/2012)


    ...Also, unless I'm misreading the plan, this is a heap table? No clustered index? Unless you have a good reason, I'd suggest adding a clustered index to the...

    _____________________________________________
    "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: Filtering rows from one table.

    The_Mo (4/24/2012)


    just hypothetical representation of text

    You need to explain your "match" and "no match" rules!

    Are the match between data in tableOne and tableTwo is by DateValue only? By...

    _____________________________________________
    "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 Merge two rows into one?

    selecthA.orig_branch_no,

    hA.acct_no,

    hA.amt,

    hA.description,

    hA.create_dt,

    hA.charge_code,

    hA.tran_code,

    hC.tran_code AS ChargeCode,

    hC.amt AS ChargeAmount,

    from history as hA

    left join history as hC

    on hC.tran_code = 157

    and hC.orig_branch_no = hA.orig_branch_no

    and hC.acct_no =...

    _____________________________________________
    "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: Linked Server - OpenQuery - Stored Procedure with insert Statement

    cuirone-ServerCentral (4/24/2012)


    I posted the source to the stored procedure in my original post and a sample of it being used in a query. It is just a simple stored...

    _____________________________________________
    "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 Merge two rows into one?

    If you only have maximum one "Charge" record per transaction and description always the same prefix with "FEE ON ", you can use:

    selecthA.orig_branch_no,

    hA.acct_no,

    hA.amt,

    hA.description,

    hA.create_dt,

    hA.charge_code,

    hA.tran_code,

    hC.tran_code AS ChargeCode,

    hC.amt AS ChargeAmount,

    from ...

    _____________________________________________
    "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,696 through 1,710 (of 2,894 total)