• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

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

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
bobby6055
Asked:
bobby6055
  • 3
  • 2
1 Solution
 
SharathData EngineerCommented:
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
 
bobby6055Author Commented:
Thanks.
I have two other questions opened similar to this one. I will appreciate your assistance on any of the other two questions.
0
 
SharathData EngineerCommented:
Can you post the link for those other questions.
0
 
bobby6055Author Commented:
0
 
bobby6055Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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