delete query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thompson Yip

    #1

    delete query

    The following delete query:

    DoCmd.RunSQL "delete * from [SBCD] where [SRF#]='" & strInput & "'"

    and

    DoCmd.RunSQL "delete [SRF#] from [SBCD] where [SRF#]='" & strInput & "'"

    Are they equivalent in term of functionality?
  • Trevor Best

    #2
    Re: delete query

    Thompson Yip wrote:
    [color=blue]
    > The following delete query:
    >
    > DoCmd.RunSQL "delete * from [SBCD] where [SRF#]='" & strInput & "'"
    >
    > and
    >
    > DoCmd.RunSQL "delete [SRF#] from [SBCD] where [SRF#]='" & strInput & "'"
    >
    > Are they equivalent in term of functionality?[/color]

    Yes.

    I've never used the latter, from a logical standpoint that could look like:
    "update sbcd set [srf#]=null where [SRF#]='" & strInput & "'" as it
    looks like it's deleting one column and not the entire row.

    Access' delete statement is an enigma as the syntax looks column based
    yet the delete command itself is rowset based. Compare that to SQL
    Server where the command would be:

    delete from tablename where columnname='som ething'

    --
    Error reading sig - A)bort R)etry I)nfluence with large hammer

    Comment

    Working...