Advertisement

03.17.2008 at 06:20AM PDT, ID: 23246886
[x]
Attachment Details

determining last years 'year-to-date' and adding a value to a column

Asked by JoMar in SQL Query Syntax, MySQL Server

Tags: , , ,

I am using sql 2005 on a windows 2003 server.  I have a view created that will extract accounts receivable information from the database.  I am trying to look at the invoice dates for last year and put a yes in a ytd column if the invoice date is equal to or before last years year-to-date.  (The ytd column is not part of the database).  For example, if todays date is 03/17/08, the records that are from 01/01/07 to 03/17/07 will have a yes in the ytd column, and all of this years data will have a yes.  Also, I need to calculate last years year-to-date, accounting for this year being a leap year.

Thanks in advance,

JoMarStart Free Trial
[+][-]03.17.2008 at 06:49AM PDT, ID: 21142072

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 07:16AM PDT, ID: 21142299

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 07:18AM PDT, ID: 21142320

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 07:57AM PDT, ID: 21142718

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 08:23AM PDT, ID: 21143005

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Query Syntax, MySQL Server
Tags: Microsoft, sql, 2005, windows server 2003
Sign Up Now!
Solution Provided By: derekkromm
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.17.2008 at 08:24AM PDT, ID: 21143018

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 12:39PM PDT, ID: 21145391

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 06:43AM PDT, ID: 21150828

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 06:50AM PDT, ID: 21150906

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 06:59AM PDT, ID: 21150998

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628