Have you tried using nested select statements? I don't remember the
syntax, but here's an idea
Delete row
>From table
Where partno in
{select top(partno)
from table
where partno=123
}
-----Original Message-----
From: Julian Holt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 2:39 AM
To: [EMAIL PROTECTED]
Subject: RE: [vbhelp] Re: Simple database question (I guess)
Hi
I am using access ----- a trawl round t'internet has revealed nothing.
Looks like this is an incredibly difficult and highly unusual thing to
want
to do :-)
Just to clarify further
I have a table like this
PartNo Description
111 Hello
123 Hello
456 World
123 Hello
123 Hello
123 Hello
123 Hello
I want to delete the first occurrence of "123 Hello" to leave
PartNo Description
111 Hello
456 World
123 Hello
123 Hello
123 Hello
123 Hello
All the SQL I have tried to date would either delete all occurrences of
"123
Hello" or delete all repeated occurrences to leave
PartNo Description
111 Hello
123 Hello
456 World
TA
Julian
-----Original Message-----
From: m50h [mailto:[EMAIL PROTECTED]
Sent: 11 May 2004 19:56
To: [EMAIL PROTECTED]
Subject: [vbhelp] Re: Simple database question (I guess)
Dear Julian Holt
if you want to do this first of all you have to specify your database
format and after specifying that then we can offer you a way for
doing that.
for example may be your database format be mdb(access) or text in
binary or other things.
Good luck
Mohsen.
--- In [EMAIL PROTECTED], "Julian Holt" <[EMAIL PROTECTED]> wrote:
> Guys
>
> I have a database looking something like this,
>
> PartNo Description
> 111 Hello
> 123 Hello
> 456 World
> 123 Hello
>
> I want to detect the first occurrence of a given PartNo (say 123)
and delete
> the whole row from the DB
>
> So for example I want to delete the row "123 Hello" given
the PartNo
> 123
>
> I guess its SQL but I am not too sure what to do
>
>
> Any ideas?
>
>
> Many thanks
>
> Julian Holt
>
>
> [Non-text portions of this message have been removed]
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [EMAIL PROTECTED]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
------------------------------------------------------------------------
----
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
b.. To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
[Non-text portions of this message have been removed]
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [EMAIL PROTECTED]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/k7folB/TM
---------------------------------------------------------------------~->
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [EMAIL PROTECTED]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/