Viewing 15 posts - 9,001 through 9,015 (of 9,643 total)
10 days BEFORE today or 10 days AFTER today, PAST or FUTURE?
Since this is a school assignment I will just give a hint. In SQL Server dates work just...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 2:07 pm
Actually Jeff, I did not mean to imply that there was a dates table. The OP did not post any table or column names so I just used dates...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 12:41 pm
Steve Jones - Editor (3/15/2008)
I've added this to the list. turns out to be a switch 🙂
Sounds like good data-driven design to me:P
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 10:31 am
Adam Haines (3/15/2008)
Addtionally, this site has a...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 10:29 am
Are you storing the sequence number, or is this for returning the data?
For querying the data you could use the row_number() function.
Select
ROW_NUMBER() Over (Partition By...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 10:21 am
Here are a couple of options I think will work, but I can't guarantee anything without seeing the table schemas and some sample data.
/*this uses a CTE and is SQL2005...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 10:06 am
One way you could do it something like this:
With DayOfWeek As
(
Select
DateName(DW, date) as DayOfWeek,
date
From
...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 9:45 am
Adam,
I considered suggesting a default value as well, but, especially with numeric data, I prefer to leave null than to put in 0 as they really do mean different things...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 15, 2008 at 5:33 am
Just for informational purposes what is the response of the query if you return rows where column4 is not null?
I am going to guess that the query optimizer is not...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 14, 2008 at 9:20 pm
I think you are misunderstanding how a linked server works. A linked server is designed to allow you to query another data source from within the context of an...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 14, 2008 at 1:17 pm
Option 3 is okay for what you want to do. The only issue, and this is true of any dynamic SQL, is that you need to beware of and...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 14, 2008 at 12:43 pm
I think the problem is that the application is trying to connect to a db named testserver.testdb on the local server and that db does not exist on that server....
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 14, 2008 at 12:26 pm
IN does not play well with variables. When you use variable for your list Sql sees it as 1 value not the list you expect.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 14, 2008 at 12:12 pm
I agree with most who have said they will do what it takes to get the job done, legally. The worst thing I had to deal with was around...
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 14, 2008 at 7:59 am
Hugo Kornelis (3/14/2008)
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 14, 2008 at 7:31 am
Viewing 15 posts - 9,001 through 9,015 (of 9,643 total)