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.
| Author |
Topic |
|
Tim_Field
Yak Posting Veteran
87 Posts |
Posted - 2005-07-07 : 10:47:12
|
Hi All, I have some data which I'd like turn into something unrecognisable.... I'd ideally like to keep the same surname where there is a sims.stud_relation record.Anyone know a quick way to do this??-- For encrypting data.declare @mappingstable table (old_person_id int, new_person_id int, surname varchar(200), midname varchar(200), forename varchar(200))declare @relationstable table (student_id int, contact_id int)insert into @relationstable (student_id, contact_id) -- these are person_id'sselect student_id, contact_id from sims.stud_relation insert into @mappingstable (old_person_id, new_person_id, surname, midname, forename)select person_id, person_id, surname, midname, forename from sims.sims_person |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-07-07 : 10:55:55
|
quote: Originally posted by Tim_Field Hi All, I have some data which I'd like turn into something unrecognisable....
I betcha Jon could help....You got some of the info we need, could you follow the link below and give us the rest of the puzzle...Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
Tim_Field
Yak Posting Veteran
87 Posts |
Posted - 2005-07-07 : 11:03:56
|
Something like this....CREATE TABLE sims_person(person_id int,surname varchar(200),midname varchar(200),forename varchar(200),legal_surname varchar(200),chosen_forename varchar(200),dob datetime )-- BOTH ID's LINK INTO PERSON TABLECREATE TABLE stud_relation(student_id int, contact_id int ) |
 |
|
|
Tim_Field
Yak Posting Veteran
87 Posts |
Posted - 2005-07-07 : 11:09:49
|
and these....insert into sims_person(person_id ,surname ,midname ,forename ,legal_surname ,chosen_forename ,dob )values( 1,'Jones','John','Peter','Jonesr','Jon', '1980-01-01' )insert into sims_person(person_id ,surname ,midname ,forename ,legal_surname ,chosen_forename ,dob )values( 1,'Jones','Robert','Bob','Jonesr','Rob', '1990-01-01' )insert into stud_relation(student_id, contact_id)(1, 2 ) |
 |
|
|
jhermiz
3564 Posts |
Posted - 2005-07-07 : 14:26:23
|
quote: Originally posted by X002548
quote: Originally posted by Tim_Field Hi All, I have some data which I'd like turn into something unrecognisable....
I betcha Jon could help....You got some of the info we need, could you follow the link below and give us the rest of the puzzle...Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
I'll take that as a compliment, considering the source, do you like talking behind people's back ? You know for your age you really are childish. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]Imperfection living for perfection -- [url]http://jhermiz.blogspot.com/[/url] |
 |
|
|
Tim_Field
Yak Posting Veteran
87 Posts |
Posted - 2005-07-08 : 04:37:27
|
| Can anyone help then??? |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-07-08 : 04:43:55
|
| what do you mean by unrecognizable? like being encrypted?create two functions, one for encrypting and the other for decrypting,for the algorithm to be used, that depends on your needs, search the forum and internet, as far as I can remember, someone posted relevant algorithmsHTH--------------------keeping it simple... |
 |
|
|
Tim_Field
Yak Posting Veteran
87 Posts |
Posted - 2005-07-08 : 05:12:17
|
| Nope.... just turning smith into djxjdj or something like that... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-08 : 05:50:53
|
quote: Originally posted by Tim_Field and these....insert into sims_person(person_id ,surname ,midname ,forename ,legal_surname ,chosen_forename ,dob )values( 1,'Jones','John','Peter','Jonesr','Jon', '1980-01-01' )insert into sims_person(person_id ,surname ,midname ,forename ,legal_surname ,chosen_forename ,dob )values( 1,'Jones','Robert','Bob','Jonesr','Rob', '1990-01-01' )insert into stud_relation(student_id, contact_id)(1, 2 )
What is your expected result after the insertion?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|