Hi Julian,

Try this SQL syntax

YourConnection.Execute "DELETE YOURTABLE FROM (SELECT TOP 1 * FROM YOURTABLE
WHERE PARTNO = 123)"

Don


----- Original Message ----- 
From: "m50h" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 12, 2004 2:55 AM
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
>
>
>
>
>
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/
 

Reply via email to