SQL Troubles

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

    SQL Troubles

    Could anyone tell me what is wrong with this statement and if it is
    possible to use?

    INSERT INTO tblConditionLin e (dealID) VALUES (SELECT MAX(dealID) FROM
    tblDeal)

    Thanks!

  • LeighP

    #2
    Re: SQL Troubles

    Try

    INSERT INTO tblConditionLin e ([dealID]) SELECT MAX([dealID]) FROM tblDeal

    hth

    "Beacher" <beacher@gmail. com> wrote in message
    news:1118071837 .727152.295200@ g49g2000cwa.goo glegroups.com.. .[color=blue]
    > Could anyone tell me what is wrong with this statement and if it is
    > possible to use?
    >
    > INSERT INTO tblConditionLin e (dealID) VALUES (SELECT MAX(dealID) FROM
    > tblDeal)
    >
    > Thanks!
    >[/color]



    Comment

    • Beacher

      #3
      Re: SQL Troubles

      Thanks alot, works great :)

      Comment

      • Tim Marshall

        #4
        Re: SQL Troubles

        Beacher wrote:
        [color=blue]
        > Thanks alot, works great :)[/color]

        B, are you using the Access query design window? What I always do when
        I'm not sure is rig up the statement I want using the query design
        window and then switch to SQL view and there ya go! 8)

        --
        Tim http://www.ucs.mun.ca/~tmarshal/
        ^o<
        /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
        /^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

        Comment

        Working...