Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Procedure Statement in Access SQL (2000)

    Hi,

    I was trying this query:

    <code>TRUNCATE TABLE <tblName>;</code>

    in Access' SQL view and it prompted me with something that approximately translates to:
    <hr>Invalid SQL statement; 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT' or 'UPDATE' statement expected.<hr>
    My question is not why it doesn't accept TRUNCATE TABLE, but rather what is a PROCEDURE statement and what does it do?
    And further, is Access SQL documented somewhere? I started studying it via web resources about a year ago and still find unveiled chunks every while -- eg. I found that Access SQL accepts the IIF function about a month ago.

    Thank you in advance
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Procedure Statement in Access SQL (2000)

    There is no statement called TRUNCATE in Access, are you trying to do this from Access to a SQL Server backend?

  3. #3
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Procedure Statement in Access SQL (2000)

    I realized the moment Access prompted me. That's why I said it wasn't my question <img src=/S/wink.gif border=0 alt=wink width=15 height=15>.
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Procedure Statement in Access SQL (2000)

    Sorry, i missed that point, must be going blind or senile.

    A procedure is code in VBA that can be behind a form, report or a module.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Procedure Statement in Access SQL (2000)

    I don't know exactly how to get it in Access 2000, but you should be able to get to Microsoft Jet SQL Help from the contents of the built-in Access help.

    Access SQL understands most VBA functions.

    For a description of the PROCEDURE keyword, see Advanced Microsoft Jet SQL for Access 2000 (Microsoft Access 2000 Technical Articles).

  6. #6
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Procedure Statement in Access SQL (2000)

    Hi Hans,

    Thanks for that! It seems a quite comprehensive resource. I'll read it in more detail over the next days.
    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  7. #7
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Procedure Statement in Access SQL (2000)

    Hello Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    <hr>A procedure is code in VBA that can be behind a form, report or a module.<hr>
    In this case, I had a hunch it was something different. In the link Hans provided there's a description of SQL Procedures (I haven't read it in full detail yet).
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  8. #8
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Procedure Statement in Access SQL (2000)

    This link: http://sqlserver2000.databases.aspfaq.com/...sql-server.html might come in handy. I'll leave it here for (my ( <img src=/S/grin.gif border=0 alt=grin width=15 height=15>)) future reference.
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Procedure Statement in Access SQL (2000)

    Thanks, I'm sure it'll be handy for others too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •