Forum Replies Created

Viewing 15 posts - 19,096 through 19,110 (of 49,552 total)

  • RE: fetching date from 1 sp to another

    In case you missed it. This is a loop that produces (see the PRINT) the last day of each month, it does so correctly for all months, including after February.

    GilaMonster...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/15/2012)


    i am already have training in sql, this is somehow tricky ,that dates is not working after feb

    No, it's not at all tricky. You take the code I posted...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    The Dixie Flatline (4/15/2012)


    Is the glass half empty? Half full? Or twice as big as it needs to be?

    I think someone needs to turn the tap...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/15/2012)


    nope ,i have chnage anything

    Really?????? You didn't change anything?

    Your code:

    the prob is month of feb,is you try this

    DECLARE @row1 datetime, @Todate DATETIME

    set @row1 = '2010/02/28'-- however it gets assigned,

    set...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    The Dixie Flatline (4/15/2012)


    Grant, I keep meaning to ask you. What *is* that avatar you use?

    Looks to me like a glass with water. Maybe 'his cup runneth...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Temp Tables in a Trigger

    Any form of heavy processing in a trigger is bad. Triggers should be fast and lightweight as they are called any time a row changes and any locks taken by...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    Then you have changed the code I gave you and broke it somehow.

    Because this:

    DECLARE @row1 datetime, @Todate DATETIME

    set @row1 = '2010/02/01' -- however it gets assigned,

    set @Todate = '2011/02/01' --...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    Easier to dateadd the 1st of the month, then subtract a day.

    So, rather set @row1 = 2010/02/01 (btw, use the yyyymmdd format as the others are ambiguous)

    then dateadd will always...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: prevent data using encryption (suggestion needed)

    Column encryption requires changing the application. No alternatives, and column encryption will not protect against someone who has sa rights.

    You cannot keep a windows admin out of SQL Server. You...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: prevent data using encryption (suggestion needed)

    About the only way to ensure that the server admin can't access the data is to encrypt the data outside of the database (in the application). Any database encryption (other...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Cluster or replication

    Hbruce (4/15/2012)


    I will check out those links for sure. Most likely I will end up hiring an expert.

    What part of the world are you in? I might be able to...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Cluster or replication

    Hbruce (4/15/2012)


    The remote site users are experiancing long delays in accessing data (Due to the large size of the database) from the main site.

    Nothing to do with the size of...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/15/2012)


    ok the condition is working,

    but i have problem with if(stat)

    whats wrong in that

    Without a lot more details and sample data, no idea. Start by looking at the values of...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Cluster or replication

    If your problem is around performance, I would say neither.

    Replication's good for scale-out, but it's complicated to implement if you can't just redirect the reporting (read-only) workload to a second...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Query used to take 3 minutes, now takes 25+ minutes!

    Could be any number of things. To start, try updating statistics on the table. If that doesn't help, we're probably going to need more details about the procedure.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 19,096 through 19,110 (of 49,552 total)