I am using C#, SQL Server CE
I have two tables
1. tblPatientDetail
2. tblPTOPHCRRecor
I tried to delete rows from two different tables using sql command
cmd.CommandText = "DELETE from tblPTOPHCRRecord,tblPatientDetails where tblPTOPHCRRecord.IncidentID = '"+ IncidentID +"' and tblPTOPHCRRecord.RecordNum = tblPatientDetails.RecordNum"
RecordNum is primary key in tblPTOPHCRRecor
and foreign key in tblPatientDetails
Delete from tblPTOPHCRRecord where IncidentID = 21 (RecordNum = 965)
Delete from tblPatientDetails where tblPatientDetails.RecordNum is equal to tblPTOPHCRRecord.RecordNum
This does not work for me, but ok on select statements
What i would really like to is delete rows in both tables once they exceed five
can anybody help me with this.
thanks ada