Viewing 15 posts - 9,121 through 9,135 (of 15,381 total)
This is nothing more than updating the table where date is greater than the date being passed in. The reason you are having a problem is because you have dates...
March 8, 2013 at 3:21 pm
Erin Ramsay (3/8/2013)
Will this help you get started?
declare @datefield datetime
set @datefield = GETDATE()
select @datefield originalDate, dateadd(ms,-3,cast((dateadd(d,1,cast(@datefield as...
March 8, 2013 at 3:15 pm
sql1411 (3/8/2013)
Never mind. I just had to add "<=" sign. 🙂 Thanks again 🙂
Glad you figured it out. This brings up a comment. If you store time information...
March 8, 2013 at 3:04 pm
I guess I missed the bit about the date part. Just add a where clause to your query and you should be good to go.
declare @SearchDate datetime = '2012-04-01 00:00:00'
select...
March 8, 2013 at 1:36 pm
Chrissy321 (3/8/2013)
You procedure is passed one string parameter like 'BUY','SELL','CONTRIBUTION' and then the string is split within the procedure...
March 8, 2013 at 1:32 pm
I would say that "it depends". I do think to that to some extent you can tell a lot about a person by their code. I don't however think you...
March 8, 2013 at 1:17 pm
This sounds a lot like a "catch all" query. check out Gail's blog post about this type of query here. http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/%5B/url%5D
March 8, 2013 at 1:13 pm
Multiple values in a single parameter don't quite work like that. It is kind of a pain to deal with. However, there is really slick way to parse the value...
March 8, 2013 at 1:10 pm
Excellent job posting ddl, sample data and an explanation.
This should work based on your sample.
select *
from
(
select *, ROW_NUMBER() over (partition by ConsumerID order by ActivityDate desc) as RowNum
from...
March 8, 2013 at 12:50 pm
Well you did a pretty decent job of posting ddl and sample data. However it is totally unclear what you want for output. What column in your table defines the...
March 8, 2013 at 12:42 pm
Duplicate post. Direct replies here. http://www.sqlservercentral.com/Forums/Topic1428706-391-1.aspx
March 8, 2013 at 12:37 pm
Lynn Pettis (3/8/2013)
How the heck did I miss that!
You saw a cursor and your eyes rolled back in your head...then you realized that this really might be one of those...
March 8, 2013 at 10:08 am
This looks an awful lot like a loop that is running inside either another loop or a cursor. I agree that the only way you are going to improve performance...
March 8, 2013 at 10:04 am
You don't need to have email as a constant in your select for your cursor, just use the value that is already there.
The bigger question I would ask is do...
March 8, 2013 at 9:58 am
That is because you concatenate values to the previous subject each pass through the loop.
Change you loop to this.
--@emailSubject = @emailSubject + @sku
EXEC...
March 8, 2013 at 9:50 am
Viewing 15 posts - 9,121 through 9,135 (of 15,381 total)