The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX and Linux Applications
.
google unix.com



UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to get the original create timestamp? aster007 UNIX for Advanced & Expert Users 3 08-20-2008 11:08 AM
Copy lines from a log file based on timestamp ranjiadmin UNIX for Advanced & Expert Users 1 05-22-2008 04:16 AM
Purge files based on timestamp avl in file name sureshg_sampat Shell Programming and Scripting 3 02-29-2008 11:28 AM
Timestamp in MySQL nervous UNIX for Dummies Questions & Answers 1 11-12-2007 03:00 AM
Create file with old timestamp Kris_Kart_101 UNIX for Dummies Questions & Answers 2 10-14-2005 02:18 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-09-2009
hazno hazno is offline
Registered User
  
 

Join Date: Mar 2009
Location: Tokyo
Posts: 21
create 'day' tables based on timestamp in mysql

How would one go about creating 'day' tables based on the timestamp field.

I have some 'import' tables which contains data from various days and would like to spilt that data up into 'days' based on the timestamp field in new tables.

TABLE_IMPORT1
TABLE_IMPORT2
TABLE_IMPORT3


TABLE_DAY1
TABLE_DAY2
TABLE_DAY3

thanks & regards
  #2 (permalink)  
Old 03-10-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,814
By day - do you mean day of the month 1..31 or day of the week?
Is this Oracle?

A general answer would be 'create a view against those tables'. Creating tables based on the date field when all of the other data is the same is not a good idea for database design. Ideally you put all common data into a single table or view and query against it.
  #3 (permalink)  
Old 03-10-2009
hazno hazno is offline
Registered User
  
 

Join Date: Mar 2009
Location: Tokyo
Posts: 21
Hello,

By day of the month, so I can run searches on each individual 'day' table instead of the whole database. This is mysql. Creating a view sounds like a good idea and I will give that a go...

Thanks & regards
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0