Technical Notes

From Kbwiki
Revision as of 12:47, 16 January 2008 by Aubrey Moore (Talk | contribs)

Jump to: navigation, search
  • Query to find unmatched trap_id's:
SELECT trap_routes.trap_id, trap.trap_id
FROM trap_routes
LEFT JOIN trap ON trap_routes.trap_id = trap.trap_id
WHERE trap.trap_ID IS NULL 
  • Query to update trap table using values from trap_routes table:
  trap, trap_routes 
  trap.trap_route = trap_routes.trap_route,
  trap.trap_route_sequence = trap_routes.trap_route_sequence 
  trap_routes.trap_id = trap.trap_id