Re: Is this impossible?

From: Keith Kratochvil (sqlguy.back2u_at_comcast.net)
Date: 10/13/04


Date: Wed, 13 Oct 2004 09:20:50 -0500


> Is this impossible?
Probalby not

> Is the above possible?
Probably

It is very difficult based on your lack of table definition and sample data.

It would be very helpful to have DDL (create table) scripts as well as some
sample data in the forms of (INSERT INTO....) statements. Knowing what
results you expect based on your sample data would help someone write a
query that would take care of your need.

-- 
Keith
"John Barwell" <johnbarwell@msmdirect.co.uk> wrote in message
news:416d36be$0$44876$ed2619ec@ptn-nntp-reader02.plus.net...
> Dear All,
>
> I am trying to write a query to extract information from my database. The
> query uses four tables. They are as follows:
>
> Client
> Policy
> Tracking
> Action
>
> We have a number of actions that can be associated with a single client.
> I.e. A form being issued or returned.
>
> The sceniro:
> John, Simon and Paul have all being issued a form and the tracking table
> action id field has being updated with 1 to indicate the form has being
> issued. John has now returned his form and the tracking table action id
> field has being updated with 2. This meaning that John has 1 and 2 logged
> against his record id, whilst simon and paul only have 1 logged against
> their record ids.
>
> I wish to bring up all the records that have being issued with a form, but
> not had the form returned. I.e. If action id = 1 and action id <> 2 then
> display record.
>
> Is the above possible?
>
> Thanks,
>
>
> John
>
>


Relevant Pages

  • Re: creating recordset with only one entry per user
    ... > i want the query to produce this ... > photo_id 150 m_name dave ... > photo_id 147 m_name john ... the test table below is based on the sample data ...
    (microsoft.public.access.queries)
  • Is this impossible?
    ... I am trying to write a query to extract information from my database. ... We have a number of actions that can be associated with a single client. ... John, Simon and Paul have all being issued a form and the tracking table ...
    (microsoft.public.sqlserver.programming)
  • Re: Update Query Error 2007 Correction
    ... John, the query seemed to work to a point. ... I suspect that the sample data I am working with ... If there is a matching record it will return the ...
    (microsoft.public.access.reports)
  • Re: UDF and SQL2000 - Why doesnt this work?
    ... Basically This is what I want to do - I have created a query ... as DDL (i.e. CREATE TABLE statements; ... Sample data that illustrates the problem, ... Expected output from the sample data supplied; ...
    (microsoft.public.sqlserver.programming)
  • Re: New to SQL and trying multiple table joins
    ... > Can't be certain of how to write this query for you without DDL (CREATE ... Previous msg edited plus added in keys, and sample data at end. ... EmpAvailID (Primary Key), EmpID, EAMonthID(Foreign ... AbilityID, EmpID, MainAbility ...
    (microsoft.public.sqlserver.programming)