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
Who is Participating?
SharathConnect With a Mentor Data 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

bobby6055Author Commented:
I have two other questions opened similar to this one. I will appreciate your assistance on any of the other two questions.
SharathData EngineerCommented:
Can you post the link for those other questions.
bobby6055Author Commented:
bobby6055Author Commented:
Here is the second one which I think you would have fun with:

I will provide you a sample db if requested
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.

All Courses

From novice to tech pro — start learning today.