Forum Replies Created

Viewing 15 posts - 5,221 through 5,235 (of 15,381 total)

  • RE: Data Loading from Staging to Development -

    patla4u (4/9/2014)


    Thanks for your Reply.

    I understood that, I don't need to disable clustered index. Can I ask you Why?

    Thanks

    Bhavesh

    Why do you think you need to disable the clustered index?

  • RE: Select statement and variables

    robmcbarron (4/8/2014)


    Thanks for your patience Sean, here goes..

    I'm trying to calculate the difference between the start of the financial year (in this case 1st April 2013) and the savings start...

  • RE: Parameters

    super48 (4/9/2014)


    then try this one if u want to use *--

    create procedure startrred

    @hourstarted varchar(10)

    as

    begin

    if(@hourstarted!='*')

    begin

    Select *

    from Production where hourworked>@hourstarted

    END

    else

    begin

    select * from Production where hourworked>15

    end

    end

    I would NEVER recommend passing in a character...

  • RE: Need help with a stored procedure that has been timing out in the program.

    Everything Luis and Grant say plus...

    There is lots of low hanging fruit here for performance improvement. Do you need UNION? A UNION ALL seems highly likely to be acceptable here...

  • RE: Data Loading from Staging to Development -

    patla4u (4/8/2014)


    Hello,

    I want to load data from Staging to Development environment.

    In Dev. environment , I have index that is use for stored procedure and Staging environment, I don't...

  • RE: NOT IN and IN

    Awfully sparse on details. Without some actual details it is pretty tough to guess.

    I suspect the problem is because you are using an OR between your where predicates.

    where...

  • RE: Percent Difference

    Not sure what you are looking for as output. Using the values you stated and plugging them into your formula...

    select (1168 - 1172) / 1172. * 100

    This returns -0.341200

  • RE: Changes not holding in Stored Procedure

    rummings (4/8/2014)


    Hi Apple.... what I meant was..... I open a Stored procedure.... add a comment statement with text.... not changing any functional code.... execute the Stored Procedure.... it runs successfully.......

  • RE: self-join; getting one "unique" record

    patrickmcginnis59 10839 (4/8/2014)


    Sean Lange (4/8/2014)


    And then, encrypt those SSNs and stop storing them in plain text immediately!!!

    Very good point, how would you do it and still allow him to find...

  • RE: Convert Row Data in 1 Field to Many Columns

    This looks like a cookie cutter cross tab to me. Please see the articles in my signature about cross tabs. Also, here is a link to another thread where I...

  • RE: What is wrong with this syntax? Query will work, but CTE will not "compile"

    Eirikur Eiriksson (4/8/2014)


    hisakimatama (4/8/2014)


    Aha, so it doesn't :-). I've always declared CTEs with the column declarations, and by the wonderful problems of habit, it stuck as "the" way to...

  • RE: self-join; getting one "unique" record

    And then, encrypt those SSNs and stop storing them in plain text immediately!!!

  • RE: Parameters

    You could make this even simpler by providing a default to HoursStarted.

    create procedure GetSomeData

    (

    @HoursStarted int = 15

    ) as

    Select [Columns]

    from Production

    where HourWorked > @HoursStated

    So now if the user wants "All"...

  • RE: trouble shoot

    ramyours2003 (4/8/2014)


    Thanks for repling , actually iam not aware how to trouble shoot this issue ?

    Start by reading my response. Then telling us where this message is coming from.

  • RE: Complex SQL Pivot Query Urgent Help Needed

    Luis Cazares (4/8/2014)


    I was working on a cross tabs solution but Sean beat me to do it.

    I just wanted to point out that it should out perform the previous solutions...

Viewing 15 posts - 5,221 through 5,235 (of 15,381 total)