Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
Insert new records across multible tables |
Wed, Aug 16 2006 7:02 PM | Permanent Link |
Brent | I have two tables.
Master table is PatientInfo Fields are: SSAN, Name, Phone Detail table is PatientNotes Fields are: SSAN, Date, Notes I would like to be able to insert a new record in PatientInfo table and at the same time, create a new record in the PatientNotes table. The key or link is the SSAN field. Any help would be greatly appreciated in showing me how to do this. Brent |
Thu, Aug 17 2006 3:26 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Brent
add the record to PaitientInfo and post it THEN add the record to PaitientNotes using PatientNotesSSAN.Assign(PatientInfoSSAN); Wrap in a transaction just in case and you're there Roy Lambert |
Fri, Aug 25 2006 8:50 AM | Permanent Link |
adam | Dear Brent,
A key issue with your request is whether the system is multi-user. If not you can write something like: --- INSERT INTO Table1 (SAAN, otherfields ...) (values ....) ; INSERT INTO Table (fields ...) SELECT Max(SAAN) FROM Table1 --- If the system is multi-user the easiest way is to create the SAAN in Delphi, or via some kind of trigger then use it as a Param and pass it into the SQL in code with 2 SQL snippets that have space to accept the params. |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |