Forum Replies Created

Viewing 15 posts - 2,071 through 2,085 (of 10,143 total)

  • RE: T-Sql procedure taking hours to execute

    As good an example of cowboy coding as I've ever seen. It's probably a half-day of work for a competent developer to replace this pile of doom with properly-written, scalable,...

  • RE: t-sql 2012 update statement truncates varchar value

    What do you see when you stare & compare?

    SELECT

    LKC.combo, lockCombo1

    FROM [Inputtb] A

    JOIN test.dbo.School SCH

    ON A.schoolnumber = SCH.type

    and A.schoolnumber = @SchoolNumber

    JOIN test.dbo.Locker LKR

    ON SCH.schoolID =...

  • RE: Are the posted questions getting worse?

    If any of you love Monty Python:

    ......the Knights that say "ni" will be in Soho Square at about 6pm along with John Cleese and one or two others.

  • RE: Help Replacing String

    jhutchings (10/7/2015)


    Hi Folks,

    I'm trying to replace a particular part of a row in a table with a new value.

    The row is called "DataPath" and it has a lot of...

  • RE: Average of time between multiple dates

    ScottPletcher (10/7/2015)


    You don't really need a subquery derived table here.

    ...

    No, but they help clarify the solution. Like TSQL isinglass.

  • RE: Average of time between multiple dates

    woody_rd (10/7/2015)


    lol, yes, this is not homework, and the dataset is actually a little more complex than what I presented. I dumbed it down a little to get to...

  • RE: Average of time between multiple dates

    woody_rd (10/7/2015)


    Wouldn't the more accurate number be the difference between each test (diff test1 date and test2 date, test2 and test3, ... test9 and test10), totaled and divided by number...

  • RE: Average of time between multiple dates

    woody_rd (10/7/2015)


    Because I need an average of number of days between all tests. Not just the previous. So if a student took 10 tests, I need the average...

  • RE: Average of time between multiple dates

    woody_rd (10/7/2015)


    I have a dataset as such:

    Student TestTypeDate TestCnt

    111-22-1111English2015-09-01 10:00:00 1

    111-22-1111Math2015-09-02 11:00:00 2

    111-22-1111Geo2015-09-03 12:00:00 3

    222-11-2222English2015-09-01 10:00:00 1

    333-22-1111English2015-09-01 10:00:00 1

    333-22-1111Math2015-09-02 11:00:00 2

    444-11-2222English2015-09-01 10:00:00 1

    555-11-2222English2015-09-01...

  • RE: Variable with <> or =

    orenk (10/7/2015)


    Hello,

    I have in my select a column called "Mitarbeiter". I like to search for Mitarbeiter in ('SB','MS','BE') or Mitarbeiter not in ('SB','MS','BE')

    The 'IN' or 'NOT IN' I want...

  • RE: Need help with a simple query from a one to many table relation.

    WHERE NOT EXISTS may be a little more intuitive. Borrowing John's code:

    SELECT

    r.Recipe_number,

    r.Recipe_name

    FROM tblRecipe AS r

    WHERE NOT EXISTS (

    SELECT 1

    FROM tblRecipeAllergen AS a

    WHERE a.Recipe_number = r.Recipe_number

    AND a.Allergen = 'Milk'

    )

  • RE: SP took too much time for executing

    SQL Galaxy (10/7/2015)


    Thanks for your replay..

    I am not a developer. but I will try my best.

    Could you give me any example for how will change existing nested cursor to...

  • RE: Update Statement - conditional

    Mahesh Bote (10/7/2015)


    [font="Verdana"]Hi All,

    I have a situation. I have one conditional UPDATE statement in stored procedure which updates one column based on other columns in same row. To fulfill the...

  • RE: charindex or like condition

    _watching (10/7/2015)


    If anyone was interested in speed comparisons, it seems CHARINDEX is a lot faster than LIKE and others. The benchmarks can be found here.

    It's quite interesting because charindex seems...

  • RE: SP took too much time for executing

    SQL Galaxy (10/7/2015)


    HI.

    I have verified at DB level for Index farg and statistics are normal but still execution take long time to completed.

    Actual Execution plan does not suggested any missing...

Viewing 15 posts - 2,071 through 2,085 (of 10,143 total)