[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 450
  • Last Modified:

Line Item Budget SQL Statement For Access 2003

I have an attached table that has my budget line items for 2012.  I need a SQL statement that will create the AccountID, AccountNumber and Detail fields for 2013.  I need the FiscalYear field to be 2013 and the months to be zero.  Can anyone help with this?
LineItemDetail.xls
0
submarinerssbn731
Asked:
submarinerssbn731
  • 2
  • 2
1 Solution
 
Jeffrey CoachmanCommented:
?
There is no 2003 data in the table...

Where is this to be used?
In Access or Excel?

If in Excel, then you can simply autoFill 2013 in all the rows you need.

Why do you want Zeros in the Month cells?

In other words, ...I'm confused....

Can you first take a step back and explain exactly what you have here and what your ultimate goal is?

...But let's see what other experts post, in case I am just not understanding something...

JeffCoachman
0
 
Jeffrey CoachmanCommented:
How about you just post the *exact* output you are looking for?
0
 
submarinerssbn731Author Commented:
The original Excel sheet is an export from an Access 2003 database table.  The file represents our accounts for creating our companies budgeting process.  I would like an SQL  statement that would replicate the 2012 line items and create 2013 line items in the same table.  I have attached a revised Excel sheet showing the desired output that I would like appended to the original table.  I hope this helps.  Thanks!
LineItemDetail.xls
0
 
als315Commented:
If you like to add records to the same table (LineItemDetail, you can use this query:
INSERT INTO LineItemDetail ( FiscalYear, AccountID, AccountNumber, Detail )
SELECT IIf([FiscalYear]=2012,2013,0) AS Y, LineItemDetail.AccountID, LineItemDetail.AccountNumber, LineItemDetail.Detail
FROM LineItemDetail
WHERE ([FiscalYear]=2012);

Open in new window

0
 
submarinerssbn731Author Commented:
Great answer...Thanks!!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now