Transfer of data

Reply

Join Date: Oct 2008
Posts: 9
Reputation: bvssam is an unknown quantity at this point 
Solved Threads: 0
bvssam bvssam is offline Offline
Newbie Poster

Transfer of data

 
0
  #1
Nov 14th, 2008
Hii Group,

This is samuel Like to hav a small suggestion from you hope u ppl do.
"I would like to copy dat from one table to another of the same database in a give
timestamp,I mean when system time equals to the feild time then the entire data should
be transfered Will it be possible in MySql?
."


To be more specific:

1.The Tables doesnt have same structure.

Hope it is clear.

So,all the Querie may be simple but please kindly explain me the proccess to do so.

Thanks in Advance.
SAM
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,158
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 136
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Transfer of data

 
0
  #2
Nov 14th, 2008
  1. SELECT INTO
is your friend
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: bvssam is an unknown quantity at this point 
Solved Threads: 0
bvssam bvssam is offline Offline
Newbie Poster

Re: Transfer of data

 
0
  #3
Nov 16th, 2008
Hi

Thanks for the reply ...I wrote a procedure which copies the data from one table to other but no idea regarding when and where it should be invoked in order to tansfer at the given timestamp.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,158
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 136
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Transfer of data

 
0
  #4
Nov 16th, 2008
if you need some help post your schema and what the timestamp requirements are
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: bvssam is an unknown quantity at this point 
Solved Threads: 0
bvssam bvssam is offline Offline
Newbie Poster

Re: Transfer of data

 
0
  #5
Nov 21st, 2008
Hi,

Sorry For the delayed reply.

The functionality db of my appplication is around two tables
both of different structures.

Table1chedule
Table2:Out


Schedule(id,recipient,Text,TimetoSend)
Out(id,recipient,text,...........)

Ok SO the Table Schedule is populated before and when ever the "Timetosend " equals to that of system time then the selected rows whose feild value(TimeToSend)
should be copied to Table Out


I would like to know how to solve this minor task

when I googled a bit I found "mysql.event" ,Can I Use the same here.... if so please let me know how to do so.


Thanks in Advance.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: bvssam is an unknown quantity at this point 
Solved Threads: 0
bvssam bvssam is offline Offline
Newbie Poster

Re: Transfer of data

 
0
  #6
Nov 21st, 2008
>>select into

I think it is used in SQL Server.
is it possible in Mysql?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,158
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 136
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Transfer of data

 
0
  #7
Nov 21st, 2008
event i believe is only only available in 5.1.6

select into with my sql is an insert statement with a select

  1. INSERT INTO Out(recipient, Text)
  2. SELECT recipient, Text FROM Schedule WHERE TimeToSend = curdate();

i would suggest timetosend be <= curdate(), you'll never get a match exactly on times most likely unless you are going by date only
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 9
Reputation: bvssam is an unknown quantity at this point 
Solved Threads: 0
bvssam bvssam is offline Offline
Newbie Poster

Re: Transfer of data

 
0
  #8
Nov 22nd, 2008
Hi, Thanks fo rthe reply right now I odnt have nay problem with my statements..

yes u r right mysql.event is available for 5.1.6 or gretaer than that

I wrote a procedure schedule() in that proc i used the "insert into command " ..
when i created an event using

"create event transfer on schedule every 1 second
do call db.schedule();"

it works fine ... but i have a minor probvlem here ..
when my system reboots .. the event doesnt work automatically ..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC