Solved

Creating a new table from Main table based on date range (two dates)

Posted on 2011-03-24
5
314 Views
Last Modified: 2012-05-11
I have a simple table (tblMain). The table has a date field called DateCreated. I need to know how:

1. How 1 can generate a new table (tblNew) from tblMain for a certain date range (two Dates) and
2. I am new at this method as such, I will appreciate a sample db of suggested solution
 
0
Comment
Question by:bobby6055
  • 3
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
Sharath earned 250 total points
Comment Utility
What is your database? If SQL Server, you can try this?
select *
  into NewTable
  from tblMain
 where DateCreated between '2011-03-01' and '2011-03-23' -- Change these dates to whatever you want

Open in new window

0
 
LVL 3

Author Comment

by:bobby6055
Comment Utility
Thanks.
I have two other questions opened similar to this one. I will appreciate your assistance on any of the other two questions.
0
 
LVL 40

Expert Comment

by:Sharath
Comment Utility
Can you post the link for those other questions.
0
 
LVL 3

Author Comment

by:bobby6055
Comment Utility
0
 
LVL 3

Author Comment

by:bobby6055
Comment Utility
Here is the second one which I think you would have fun with:
http://www.experts-exchange.com/Microsoft/Applications/Q_26910343.html

I will provide you a sample db if requested
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now