Forum Replies Created

Viewing 15 posts - 646 through 660 (of 859 total)

  • RE: OR Operator

    jerry209 (4/6/2012)


    Thanks Chuck Hottle and ColdCoffee for your quick response

    I am debugging a Stored Procedure and came across this SQL Statement.

    The actual sql statement is some what like:

    DECLARE @itemId INT

    SET...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: a looping subquery whose result set is used by parent? do I use a CTE?

    with out ddl and sample data for all the tables i cant be sure.

    the first thing i would do is add a where clause to the query creating the CTE...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: a looping subquery whose result set is used by parent? do I use a CTE?

    xenophilia (4/6/2012)


    Look here's what I've tried. I have been reading about CTE and I must be fried but it is not going anywhere for me. spinning my wheels horrifically.

    Please...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: a looping subquery whose result set is used by parent? do I use a CTE?

    drew.allen (4/6/2012)


    NM was a response to drew misreading the sql


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: a looping subquery whose result set is used by parent? do I use a CTE?

    you need to add a where clause to your query. see this link to read up on them

    http://msdn.microsoft.com/en-us/library/ms188047.aspx


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: How to convert this XML into columns

    njdevils39 (4/6/2012)


    LutzM (4/6/2012)


    Are you looking for something like this?

    WITH cteRates AS

    (

    SELECT

    o.EMP_ID,

    (ROW_NUMBER() over(partition by o.EMP_ID order by x.r.value('@date_changed','DATETIME') desc)) as RowNum,

    convert(VARCHAR(10), x.r.value('@date_changed','DATETIME'), 101) AS DATE_CHANGED,

    ...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Item Stock Update problem (Set Based solution)

    jewel.sacred (4/6/2012)


    capn.hector (4/6/2012)


    jewel.sacred (4/6/2012)


    capn.hector (4/6/2012)


    to lynn's point. if 6 months after you start using this you have to change the pieces per pack you have to make sure to...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: query for consecutive alphabets

    sharky (4/6/2012)


    Hi Jeff,

    Thanks for the UPPER fix.

    I have created the table using a clustered index with 50 rows

    --

    SELECT TOP 50 IDENTITY(INT,1,1) AS N

    INTO dbo.Tally

    FROM Master.dbo.SysColumns

    ALTER TABLE dbo.Tally ...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Item Stock Update problem (Set Based solution)

    jewel.sacred (4/6/2012)


    capn.hector (4/6/2012)


    to lynn's point. if 6 months after you start using this you have to change the pieces per pack you have to make sure to update every...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Item Stock Update problem (Set Based solution)

    jewel.sacred (4/6/2012)



    a trigger on sales would update quantity in hand (or part of your check out process)[/quote-0]

    This is the actual process in TSQL I am looking for 🙁

    i would see...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Item Stock Update problem (Set Based solution)

    Lynn Pettis (4/6/2012)


    jewel.sacred (4/6/2012)


    capn.hector (4/6/2012)


    ok first thing is i would move your conversion factor to your unit table, makes for easier changes with out haveing to make sure you update...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Item Stock Update problem (Set Based solution)

    ok first thing is i would move your conversion factor to your unit table, makes for easier changes with out haveing to make sure you update every conversion factor in...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Cursor help

    to limit the patients returned you can put your conditions in a where clause in the query (the self join giving your results) or if its a large table your...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Cursor help

    with cte as (select row_number() over (Partition by PATIENT_NUM order by REGISTER_DTIME asc) AS Row, * FROM #Tbl_PATIENT_ADM)

    select a.PATIENT_NUM, a.ADT_SOURCE, a.PATIENT_NURSESTATION, a.REGISTER_DTIME, b.REGISTER_DTIME, DATEDIFF(Day,a.REGISTER_DTIME,b.REGISTER_DTIME)

    from cte a

    LEFT...


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • RE: Cursor help

    ok know how im attacking it. have to boot up my other machine to get every thing coded preaty and tested.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

Viewing 15 posts - 646 through 660 (of 859 total)