Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Converting from Access to MSDE 2000

Converting from Access to MSDE 2000

Scheduled Pinned Locked Moved Database
databasexmlhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 7983068
    wrote on last edited by
    #1

    I am using a windows 2000 operating system (not by choice). A VB6 program uses an access database. I am converting access db to MSDE 2000 db. I need to write a query that Deletes all of the records in a table called ResultNotes. Below is a brief schema of the db with relationships. tblResultNotes - this is the table I want to delete from ResultID - Links to ResultID in teh tblResults table Notes tblResults startTime JobID - Links to JobID in tblJobs ResultID tblJobs CreateDate JobID I need to delete all records from tblResultNotes that have a ResultID corresponding to the tblResults table. The records that have the ResultID in the tblResults need to correspond to the tblJobs JobID. The actual criteria for deletion is that startTime and CreateDate are older than 12/1/2000. Any help is appreciated!

    C 1 Reply Last reply
    0
    • U User 7983068

      I am using a windows 2000 operating system (not by choice). A VB6 program uses an access database. I am converting access db to MSDE 2000 db. I need to write a query that Deletes all of the records in a table called ResultNotes. Below is a brief schema of the db with relationships. tblResultNotes - this is the table I want to delete from ResultID - Links to ResultID in teh tblResults table Notes tblResults startTime JobID - Links to JobID in tblJobs ResultID tblJobs CreateDate JobID I need to delete all records from tblResultNotes that have a ResultID corresponding to the tblResults table. The records that have the ResultID in the tblResults need to correspond to the tblJobs JobID. The actual criteria for deletion is that startTime and CreateDate are older than 12/1/2000. Any help is appreciated!

      C Offline
      C Offline
      Corporal Agarn
      wrote on last edited by
      #2

      Since you did not include what you have tried. Try using an inner join

      BEGIN TRAN
      DELETE tblResultNotes FROM tblResultNotes
      INNER JOIN tblResults
      ON tblResultNotes.ResultID = tblResults.ResultID
      ROLLBACK TRAN

      Look up BEGIN TRAN to see what to replace ROLLBACK TRAN with to commit the delete.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups