|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Copy records from one table to another based on a condition
I want the UID & ApplicationRole of all records in category 14 copied to TABLE2 using a trigger of some type. and I want it to do this for existing records and any new records that are inserted.
thanks for any help TABLE1 UID Category ApplicationRole 1 14 Nursing 2 14 Pharmacy 3 15 Doesnt matter TABLE2 UID ApplicationRole |
|
#2
|
|||||
|
|||||
|
Why would you want to duplicate data like this when it you can create a VIEW to accomplish the same thing. Duplicate data is (almost) always a very bad thing in RDBMS's
SQL Code:
Note, your syntax may differ.
__________________
Wolffy ------------------------ Teaching people to fish. |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Copy records from one table to another based on a condition |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
![]() |
|