Click here to Skip to main content
15,885,757 members
Home / Discussions / Database
   

Database

 
GeneralRe: Help with SQL query Pin
Joe_P31-May-09 14:08
Joe_P31-May-09 14:08 
GeneralRe: Help with SQL query Pin
Mycroft Holmes31-May-09 17:24
professionalMycroft Holmes31-May-09 17:24 
GeneralRe: Help with SQL query Pin
smcnulty20004-Jun-09 1:24
smcnulty20004-Jun-09 1:24 
AnswerRe: Help with SQL query Pin
Niladri_Biswas2-Jul-09 0:25
Niladri_Biswas2-Jul-09 0:25 
Questionget the inserted GUID Pin
Mohammad Al Hoss30-May-09 2:18
Mohammad Al Hoss30-May-09 2:18 
AnswerRe: get the inserted GUID Pin
Mycroft Holmes30-May-09 23:15
professionalMycroft Holmes30-May-09 23:15 
Questionhow do i use a primary key auto-generated in a table as a foreign key in another table? Pin
ChiSmile29-May-09 21:10
ChiSmile29-May-09 21:10 
AnswerRe: how do i use a primary key auto-generated in a table as a foreign key in another table? Pin
Mycroft Holmes29-May-09 23:40
professionalMycroft Holmes29-May-09 23:40 
A couple of things:

What you are describing sounds like a trigger, triggers are EVIL as they make support difficult. I would suggest using a stored procedure to do the updating in both tables wrapped in a transaction @@IDENTITY (SCOPE_IDENTITY() is required if you use triggers) will give you the last entered identity field

nedusmile wrote:
Data_Modification (mod_data_id,Patient_ID, Date_Collected, Wrong_Data_Entry_Date, Data_Field, Provider)

This is going to drive you (or the person who supports your DB) nuts. Get rid of the unserscores they are sooo 80s.

Data_Modification (ModDataID,PatientID, DateCollected, WrongDataEntryDate, DataField, Provider)


is much more readable IMHO.

Foreign keys define relationships and constraints, they will not cause data to be changed.

I recommend getting a beginners book on database design.

Never underestimate the power of human stupidity
RAH

GeneralRe: how do i use a primary key auto-generated in a table as a foreign key in another table? Pin
ChiSmile30-May-09 0:29
ChiSmile30-May-09 0:29 
GeneralRe: how do i use a primary key auto-generated in a table as a foreign key in another table? Pin
Mycroft Holmes30-May-09 0:48
professionalMycroft Holmes30-May-09 0:48 
GeneralRe: how do i use a primary key auto-generated in a table as a foreign key in another table? Pin
ChiSmile1-Jun-09 2:09
ChiSmile1-Jun-09 2:09 
GeneralRe: how do i use a primary key auto-generated in a table as a foreign key in another table? Pin
Mycroft Holmes1-Jun-09 3:33
professionalMycroft Holmes1-Jun-09 3:33 
GeneralRe: how do i use a primary key auto-generated in a table as a foreign key in another table? Pin
ChiSmile1-Jun-09 16:49
ChiSmile1-Jun-09 16:49 
GeneralRe: how do i use a primary key auto-generated in a table as a foreign key in another table? Pin
Mycroft Holmes1-Jun-09 17:17
professionalMycroft Holmes1-Jun-09 17:17 
Questionhow i can do this Pin
NNR_Noga29-May-09 4:22
NNR_Noga29-May-09 4:22 
AnswerRe: how i can do this Pin
Bassam Saoud29-May-09 4:43
Bassam Saoud29-May-09 4:43 
GeneralRe: how i can do this Pin
NNR_Noga29-May-09 5:15
NNR_Noga29-May-09 5:15 
GeneralRe: how i can do this Pin
Bassam Saoud29-May-09 5:29
Bassam Saoud29-May-09 5:29 
GeneralRe: how i can do this Pin
Mycroft Holmes29-May-09 23:44
professionalMycroft Holmes29-May-09 23:44 
QuestionNHibernate - Good or Bad Idea? Pin
Jacobus0129-May-09 3:00
Jacobus0129-May-09 3:00 
AnswerRe: NHibernate - Good or Bad Idea? Pin
Bassam Saoud29-May-09 4:50
Bassam Saoud29-May-09 4:50 
QuestionEDB Pin
ujjawal kumar27-May-09 23:24
ujjawal kumar27-May-09 23:24 
AnswerRe: EDB Pin
Bassam Saoud29-May-09 4:58
Bassam Saoud29-May-09 4:58 
QuestionEvent Viewer Pin
jonhbt27-May-09 22:51
jonhbt27-May-09 22:51 
AnswerRe: Event Viewer Pin
Garth J Lancaster28-May-09 0:06
professionalGarth J Lancaster28-May-09 0:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.