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 |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2007-03-15 : 14:48:32
|
| Hello,I have a database with many tables.I want to integrate my tables with a table which has the UserId as PK.The problem is that this table can be an ASP.NET 2.0 Memebership table or any other table created by my clients.Note that I don't want the deletion of a user to affect my tables. I only want to be able to get UserId from the User's table.1. How can I "inform" my Stored Procedures from which table should it get the UserId and the column name of the UserId?Maybe using parameters?2. How can I use this information in my tables? For example: Select [UserId Given Column Name] FROM [Given Users Table]3. And should I create another table to hold such information?Thanks,Miguel |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2007-03-15 : 15:44:50
|
you should ask for the ddl and then map their table to one of yoursunless you want to directly refer to that table which can be a problem if it's housed in some other database which you will require another user accountin short, just ask them which table is it, create a procedure or a view or a function to extract the infoor if you're referring to dynamic sql, then pass the table name as parameterbut as i said, if the table is somewhere else in another database, you may get more problems, i'd just ask their DBA to create a job for you to import the information over to your database so you get the updates as welldoes this make sense? i got a little confused there... --------------------keeping it simple... |
 |
|
|
VincentFrandsen
Starting Member
39 Posts |
Posted - 2007-03-16 : 07:15:36
|
| Why dont you set statuses for you users whether they are active, deleted, inactive etc so you dont actually delete the user entirely. but perhaps i am misunderstanding the question?Hope that helpsVincent Fradnsen |
 |
|
|
|
|
|