473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Urgent Assistance with SQL Query (Please)

Hi,

I am rying to generate a report that will give me the result of a search based on two tables within my schema. The basic sql on the main table I can do but I am having trouble with the second part where the results of the first query have to be checked against the second. Here is my script as it stands


Expand|Select|Wrap|Line Numbers
  1. select i.i_no, i.final_code,i.d_code1, i.d_code2, i.d_code3, i.level4
  2. from ilist i, ilist_relation r
  3. where i.final_code in('CR08', 'CR09', 'CR10', 'CR11', 'CR12','CR13','CR13A' , 'CR13B', 'CR13C', 'CR13D', 'CR14', 'PS12', 'CR15','AS13','CR01', 'CR02', 'CR03A', 'CR03B', 'CR03C', 'CR04', 'CR05A', 'CR05B' , 'CR05C', 'CR06', 'CR07') 
  4. and i.i_no = r.unique_ident1
  5. and i.d_code1 is not null
  6. and r.unique_ident2 not like 'CR%'
  7. and r.comment not like 'Added By CIS%'
  8. and i.m_date = '20060824'
The idea is that the search will find all records from ilist that meet the m_date, d_code1 & final_code parameters and will then check for all records where i_no matches unique_ident1 in ilist_relation. And return only those that do not meet the final matching i.e. unique_ident2 and comment do not contain the text shown.

Regards

Mike
Sep 13 '06 #1
0 1060

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: CHRIS ALOZIE | last post by:
NIGERIAN TELECOMMUNICATION LIMITED. FEDERAL SECRETARIAT COMPLEX, GARKI, ZONE II ABUJA. E-MAIL: chrisalozie@uboot.com DATE:16th August 2003 REF:rf/ntl-fgn
0
by: mohemed _altdou | last post by:
Mr mohemed altdou The Manager of Audit & Accountancy Dept. African Development Bank/ADB. Ouagadougou, Burkina-Faso. ( READ CAREFULLY AND KEEP SECRET) Greeting, and how are you doing?I hope...
0
by: Chris | last post by:
Hi, I have been with this for days. I mean days. I am trying to execute a COM ..dll I created in VB.Net via SQL Server. SQL Server is giving me the error Source: ODSOLE Extended Procedure...
8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
2
by: Dimitri | last post by:
PLEASE HELP,I HAVE A DATABSE WITH MULTIPLE RECORDS AS OUTLINED BELOW EMP NO LEVEL NEXTINCREASE WAGETYPE UNIT 1000 1 0 1000 1000 1 0 1002 ...
6
by: varkey.mathew | last post by:
Dear all, Bear with me, a poor newbie(atleast in AD).. I have to authenticate a user ID and password for a user as a valid Active Directory user or not. I have created the IsAuthenticated...
6
by: martin DH | last post by:
**Urgent Need** I'll throw out the basics and any assistance is very, very, very much appreciated! Access 2003 on XP On a form (frmMain) is an option group of check boxes (ReportFrame) from...
2
by: acphiri | last post by:
Hello there, I am please requesting for urgent help. My program is packaged and installed on a pc.I used some data grids and reports on some forms.The problem is that they can only open on the PC I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.