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

Posted on 2011-03-24
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
Question by:bobby6055
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 41

Accepted Solution

Sharath earned 250 total points
ID: 35212165
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


Author Comment

ID: 35219679
I have two other questions opened similar to this one. I will appreciate your assistance on any of the other two questions.
LVL 41

Expert Comment

ID: 35219713
Can you post the link for those other questions.

Author Comment

ID: 35219736
Here is the second one which I think you would have fun with:

I will provide you a sample db if requested

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

696 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