Forum Replies Created

Viewing 15 posts - 4,741 through 4,755 (of 5,841 total)

  • RE: Comparison of Dates in SQL

    Paul White (4/30/2009)


    TheSQLGuru (4/30/2009)


    ...there is also the same issue of index scan/seek if you are using a function on a column in a where clause.

    Unless you use the solution posted...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    Goldie Graber (4/30/2009)


    Amber.Brouillard (4/30/2009)


    Hi Jeff,

    The dates I use do have a time with them (that is how SQL stores them) and dateadd(day, 1, date) still works fine.

    Thanks!

    Amber

    If your dates have...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    Ashish Pathak (4/30/2009)


    Posted comment on Comparision of Dates in SQL looks fine. But as written above, it may not be the best solution in case of using indexes. Well... while...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Insert of huge records per minute

    Alejandro Pelc (4/29/2009)


    I agree with TheSQLGuru about the lack of information to correctly guide ritesh, but also think that tempdb comments are important because of the same reason: didn't provide...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Insert of huge records per minute

    You didn't give us nearly enough information to guide you here. If you want the highest inserts per second, simply have a heap table with NO indexes whatsoever. ...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    itamar (4/29/2009)


    How about different kind of SQL compare tools, they work OK with dates?

    when using comparison tools one is most often comparing the entire table anyway, so index scan/seek issues...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    rob.lobbe (4/28/2009)


    TheSQLGuru (4/28/2009)


    Again this code will break with new, more precise, datetime datatypes in SQL Server 2008.

    Well if you change the code - ie the data type - of course...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    craig.lovegren (4/28/2009)


    rob.lobbe (4/28/2009)


    Not sure why dates cause so much trouble...

    declare

    @date datetime,

    @today datetime,

    @tonight datetime

    select

    @date = getdate(),

    @today = convert(datetime,convert(int,@date)),--use smallint for smalldatetime

    ...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    Josie (4/28/2009)


    the easiest way to extract date ranges without having to worry about the time parts is to subtract 1 day from the bottom of the range and add 1...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    Kurt W. Zimmerman (4/28/2009)


    My approach is quite simple. Often times I am passing in a date range into a sproc for selection criteria. What I do is the...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Comparison of Dates in SQL

    Dallas Martin (4/28/2009)


    Hmm... You may suffer a huge performance hit if you use DATEDIFF().

    SQL SVR may have to perform a full table scan. Not exactly what one

    desires in a...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Performance issue with tally solution

    A very minor point for Number/Tally tables is to create the clustered index after population and to specify 100% fill factor. This will ensure minimal IO for subsequent use....

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Performance issue with tally solution

    What an absolutely amazing thread this is! Well done to all involved. I have learned a good bit, and have some new tools in my bag of tricks!...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: SQL Server 2005 Poor performance on loading

    su5y (4/20/2009)


    su5y (4/20/2009)

    --------------------------------------------------------------------------------

    what do you mean regards to statistics? We are looking at the paging file this morning which is currently on the c drive which may not be big...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Best Replaces for Cursor

    Great minds think alike! 😎

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 15 posts - 4,741 through 4,755 (of 5,841 total)