Re: Delete Query
- From: "SusanV" <svanallen@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 07:16:21 -0400
Is there something running prior to this that is locking the table? You
could try closing the table via code first...
Just a thought,
Susan
"dallin" <dallin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2DD59266-7C7D-487B-A2EC-91CF26A1C5C8@xxxxxxxxxxxxxxxx
> Thank you - your reponse was right on -- however, I am getting an
> additional
> error that says "Could not delete from specified tables. (Error 3086)
> You tried to delete data from one or more tables, but the deletion could
> not
> be completed." I've checked the permissions?
>
> --
> thanks, mc
>
>
> "Steve Schapel" wrote:
>
>> MC,
>>
>> A Delete Query needs to have the table specified. The SQL always looks
>> like this...
>> DELETE TableName.* FROM ...
>>
>> It is not clear what you are trying to achieve with the Left Join. This
>> would appear to indicate that you have records in the 2_073105 table
>> which do not have corresponding records in the Almost table. Is that
>> right? And in that case, the data returned by the query will include
>> these records, right? So how do the non-existent Almost records relate
>> to what you are trying to achieve, if you catch my drift here? Are you
>> really trying to delete all records from the Almost table where there
>> *are* matching records in the 2_073105 table? If so, the SQL would be
>> like this...
>> DELETE ALMOST.*
>> FROM ALMOST INNER JOIN 2_073105
>> ON ALMOST.[Well No]=[2_073105].QEP
>>
>> Otherwise, if I have misunderstood, please try to explain what you want
>> to happen.
>>
>> --
>> Steve Schapel, Microsoft Access MVP
>>
>>
>> dallin wrote:
>> > Below is the sql statement. Thanks.
>> >
>> > DELETE ALMOST.Co, ALMOST.ST, ALMOST.[Opr #], ALMOST.[Well No],
>> > ALMOST.Operator, ALMOST.[Well Name], ALMOST.[Prod Date],
>> > ALMOST.[Current Gas
>> > Imb], ALMOST.[Prior Mo Gas IMb], ALMOST.Status, ALMOST.[Stmt Mailed],
>> > ALMOST.[DOM requests], ALMOST.PIPELINE, ALMOST.Purchaser,
>> > ALMOST.SYSTEM,
>> > ALMOST.GWI, ALMOST.[Last Request], ALMOST.Comments, ALMOST.[P&A/Sell
>> > Form],
>> > ALMOST.[P&A/Sell Form to Acctg], ALMOST.GBA, ALMOST.[MAKE-UP],
>> > ALMOST.[TERMS
>> > FOR GBA], ALMOST.County, ALMOST.[LEGAL DESCRIPTION], ALMOST.ACQ,
>> > ALMOST.[SOLD
>> > DATE], ALMOST.[SOLD TO], ALMOST.[FILE LOCATION], ALMOST.Reserves,
>> > ALMOST.ID
>> > FROM 2_073105 LEFT JOIN ALMOST ON [2_073105].QEP = ALMOST.[Well No];
>> >
>>
.
- References:
- Re: Delete Query
- From: Steve Schapel
- Re: Delete Query
- Prev by Date: Re: Parameter default value
- Next by Date: Not In Query
- Previous by thread: Re: Delete Query
- Next by thread: Re: Delete Query
- Index(es):
Relevant Pages
|