• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Table merge

 
celina deol
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have 2 tables that has the same fields.One table is for "free" session and the other table is for "pay" session. The fields are: memberid(autoincrement), starttime (type = datetime), endtime(type = endtime)...I want to merge both of them into a new table called just "session". I know how to just merge those 2 table ..but i don't know how to insert them in "starttime" order, so that it inserts the fields from both tables depending on the starttime..One more thing, starttime is null for some rows. So, wut im ASSUMING is Record with a NULL starttime has the same starttime as the record before it.
If anyone can help me out with the code, i would be really grateful...Its really important and urgent. THanks a lot....
 
celina deol
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more thing, the NEW table(Session) will have one extra field named 'TYPE'..it has values of pay or free..if value inserted is from pay table, then that row is inserted into the new table and the field type is set to PAY. If you can even give me an idea on how to do it, that would be appreciated as well..thanks a lot..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic