Viewing 15 posts - 8,911 through 8,925 (of 13,469 total)
try using greater than instead of equal in your query:that way you get everything delivered since yesterday
where DELIVERY_date >= select DATEADD(dd, DATEDIFF(dd,0,getdate() -1), 0)
August 19, 2010 at 6:12 am
Jayraj.Todkar there is no easy way to do this, and especially not easy in SQL itself.
I can think of two ways to do this:
get the execution plan as xml.
inside that...
August 19, 2010 at 6:07 am
also look at the data in delivery date: if it contains a time portion, you'll want to strip that time off as well to do your equality comparison.
--substitute zero for...
August 19, 2010 at 5:48 am
you'll get used to handling dates; this is one of the coolest things to use once you get your head wrapped around it.
the issue you are seeing is that getdate()...
August 19, 2010 at 5:46 am
i know there are some built in sp_* functions that use cursors, so i ran this query to see if you made the change, would it be easy to identify...
August 18, 2010 at 11:08 am
a quick google for me seems to show that sp_prepexec and sp_unprepare are used internally by SQL to create/use a cursor; most of the posts i found are related to...
August 18, 2010 at 10:37 am
ahh kewl let me know how that works for you; that is one of the many reasons i made this proc( and a function that does the same thing)
i had...
August 18, 2010 at 9:50 am
dayum that made for a really nice enhancement, Vincent.
here's links to two updated versions of the script.
sp_GetDDL V 309 returns the definition as a single varchar(max) of any of...
August 18, 2010 at 9:28 am
glad it's helping you out Vincent;
you know that's a neat idea and exactly why i love SSC; other peoples feedback make everything better.
Sometimes you cannot see the tree when you...
August 18, 2010 at 7:46 am
this thread is a follow up to ny66's need to parse a substring into seperate fields:
http://www.sqlservercentral.com/Forums/FindPost967451.aspx
in that post, I had assumed the data was single-space delimited, based on the example...
August 18, 2010 at 7:26 am
steve i think all you need to do is instead of getting the max(probability), you just createa a subquery with a group by construc, and join to that;
based on your...
August 18, 2010 at 6:17 am
ny66 (8/17/2010)
August 17, 2010 at 10:40 am
i think your developers are right, and that the order of joins has no meaning; as I understand it, no matter the order of the joins, the Query Engine will...
August 17, 2010 at 10:09 am
OK i'm not sure why you cannot use the existing GUI tools in SSMS to script the table, including the index definitions; in 2008 you can also get the GUI...
August 17, 2010 at 9:28 am
I believe the procedure will fail, because only an existing sysadmin can create another sysadmin.
so even though your UserA is db_owner in his database,
as long as his personal logon is...
August 17, 2010 at 7:00 am
Viewing 15 posts - 8,911 through 8,925 (of 13,469 total)