Viewing 15 posts - 8,071 through 8,085 (of 26,490 total)
sqldba_newbie (4/9/2013)
Lynn Pettis (4/9/2013)
April 9, 2013 at 10:36 pm
To really help, read the second article I reference below in my signature block regarding asking for help on performance issues. Follow the instructions in that article on what...
April 9, 2013 at 6:10 pm
Erin Ramsay (4/9/2013)
You two are freaky scary sometimes.. 😀
And why do you say that?? 😉
April 9, 2013 at 4:45 pm
Sean Lange (4/9/2013)
PSB (4/9/2013)
I want to eliminate PrevTrans 1,2,9 because for the same site,location and code because PrevTrans 2...
April 9, 2013 at 2:58 pm
And the OP has left without proviing any more information or feedback.
April 9, 2013 at 2:41 pm
And then, are you really talking about the calendar week or the ISO Week?
April 9, 2013 at 2:22 pm
This?
declare @TestData table(
NextYear int,
CustId int,
Customer varchar(5),
ScheduledDate date,
ActualDate date,
...
April 9, 2013 at 2:12 pm
Yea, don't think my code works quite right. Use a calendar table like previously suggested.
April 9, 2013 at 2:03 pm
NineIron (4/9/2013)
I'll supply the year through a variable but, let's start with 2013.
Okay, now I am totally lost. Given a specific date (getdate() in this case), return the week...
April 9, 2013 at 1:56 pm
mickyT (4/9/2013)
SELECT SUM(quantity)
FROM sale s
WHERE EXISTS (SELECT 1 FROM eval e WHERE s.email = e.email)
...
April 9, 2013 at 1:49 pm
This help?
SELECT
DATEPART(WEEK, DATEADD(MONTH, +3, getdate())),
dateadd(week,datediff(week,0,getdate()),5),
DATEADD(MONTH, +3, dateadd(week,datediff(week,0,getdate()),5));
April 9, 2013 at 1:47 pm
NineIron (4/9/2013)
How can I get Saturday's date given the week number?This is my week number, SELECT DATEPART(WEEK, DATEADD(MONTH, +3, ApptDt2)). I need to get Saturday's date from this week.
And just...
April 9, 2013 at 1:36 pm
Why the join to eval?
Do the following in an empty (sandbox) database:
create table dbo.sale (email varchar(255), quantity int);
insert into dbo.sale values ('email1', 1);
insert into dbo.sale values ('email2', 2);
insert into dbo.sale...
April 9, 2013 at 1:33 pm
Also, if you are adding and deleting data, you really should create a clustered index on the table. As a heap it will just continue to grow and not...
April 9, 2013 at 12:37 pm
Based on the following:
create table playground.sale (email varchar(255), quantity int);
insert into sale values ('email1', 1);
insert into sale values ('email2', 2);
insert into sale values ('email3', 3);
insert into sale values ('email4', 4);
create...
April 9, 2013 at 12:35 pm
Viewing 15 posts - 8,071 through 8,085 (of 26,490 total)