"Well I never"

Worked first time.......................

Thanks Chad, I have spent hours on this - YOU ARE THE MAN

Cheers

Julian
  -----Original Message-----
  From: Chad [mailto:[EMAIL PROTECTED]
  Sent: 12 May 2004 10:05
  To: [EMAIL PROTECTED]
  Subject: RE: [vbhelp] Re: Simple database question (I guess)


  > 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

  You may want to use the TOP clause. I have not tested this in Access, but
I
  know it works in SQL.

  DELETE yourtable
  FROM (SELECT TOP 1 * FROM yourtable) AS x1
  WHERE yourtable.partno = x1.partno
  AND x1.partno = 123
  AND x1.description LIKE 'Hello'

  More info here:
  http://msdn.microsoft.com/library/en-us/tsqlref/ts_de-dz_9lut.asp

  -Chad




  '// =======================================================
      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 Sponsor
              ADVERTISEMENT





----------------------------------------------------------------------------
--
  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]



------------------------ 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