Jump to content

Sql Server


fruitbat

Recommended Posts

Right, I am currently using and learning SQL and everything that goes along with it.

Anyone on here pretty good with it as I need a little help with a statement I need to write?

I have tried a couple of statements and they aren't working, any help greatly appreciated

Reply here or PM me

Frooty

Link to comment
Share on other sites

I'll explain from the start so you know what i'm doing

I have 2 tables

One called tbl_jobs, another called tbl_outlet.

tbl_outlet holds information about an Outlet, tbl_jobs holds information about all jobs relating to the outlets.

Each holds different bits of information the only link between them is a column which is the OutletID number, which is unique for each record in tbl_outlet. The identity column in the jobs table has a JobID, which is again unique for each job

A collegue has been through the information and deleted any duplicate Outlets, so that there is only 1 OutletID for each outlet, but what he hasn't done is changed the OutletID in the tbl_jobs table to reflect this change

What I need to do is find all records in the tbl_jobs table, where there isn't a match to the OutletID in the tbl_outlet table (this will mean i can change the OutletID in the jobs table to match the change done in the Outlet table.

Hope that made sense

Frooty

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...