Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Importing Unique Values (MySQL)

Author  Topic 

fuderyuu
Starting Member

2 Posts

Posted - 2005-04-23 : 15:35:10
Hello there - this is my third time at trying to make my FIRST post . I sure hope you guys can help...here goes nothing...
What I am trying to do is merge data from one database table to another where both database tables have seperate Primary Keys, the source table has one more column than the destination, and the relationship between the two that should be followed will be a column that is only the Primary key on the destination table.
Needless to say - this is way over my head and so I seek help!!

Basic Info

  • Source Table Setup

    COLUMNS: Counter, SIDs, Nicks, IPs, LastConnected, TotalTimeOn
    (where SIDs = Key)


  • Destination Table Setup

    COLUMNS: ID, SIDs, Nicks, IPs, LastConnected, TotalTimeOn
    (where ID = key)


  • Entry Separator in Nicks & IPs = ?
    (i.e. IPs:192.168.0.2?192.168.2.233?165.36.21.45)


SCENARIO:

  • Insert UNIQUE values for all IPs & Nicks where SIDs match and each entry is separated by a ?


  • For every Source SID that does not have a match in Destination, create new record


  • Create Counter Column in Destination Table and fill in values for all entries where SID from Source does not already exist in Destination


  • For LastConnected & TotalTimeOn only insert values where SIDs do no exist and insert values based on matching SIDs


I would really appreciate any and all help!
Thank you all ahead of time!

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-04-23 : 15:40:54
Seem to be a lot of MySQL questions lately, I guess the fact that SQL Team is a Microsoft SQL Server site is lost upon everyone.

There's a MySQL forum here you might have better luck with:

http://dbforums.com/
Go to Top of Page

fuderyuu
Starting Member

2 Posts

Posted - 2005-04-23 : 16:03:09
I apologize for that...
Go to Top of Page
   

- Advertisement -