Results 1 to 7 of 7

Thread: Update

  1. #1
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8

    Unanswered: Update

    Just walk into a new job

    They have a SQLserver Backend with MSaccess frount Ends

    Just found a MS access that runs once a month it run this update query

    only found about Because a Disable his account and it STOP


    UPDATE CurrentMonth INNER JOIN Acc ON CurrentMonth.UserID = Acc.UserID SET Acc.FAT = [ACC].[fat]+[Currentmonth].[fat], Acc.LTI = [Acc].[lti]+[Currentmonth].[lti];

    how would i runit in SQL not using that MSaccess Frount end

    found the the SQL server Agent

    still working on the WHYS
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Create a new SQL Job (look under SQL Server Agent in SSMS).

    Syntactically it's nearly there.
    Code:
    UPDATE ...
    SET    ...
    FROM   ...
     INNER
      JOIN ...
        ON ...
    George
    Home | Blog

  3. #3
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    that was quick Thanks
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by myle View Post
    that was quick Thanks
    Be sure to wait a few days before implementing this solution. Otherwise, people will think your job is too easy.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Jan 2013
    Posts
    354
    Provided Answers: 1

    Look up the MERGE statement

    The old 1970's Sybase UPDATE.. FROM.. syntax has serious problems with cardinality issues; you can google for details. Today, we use the ANSI/ISO Standard MERGE statement. In fact, several MVPs want to deprecate the old syntax.

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I pretty strongly encourage the use of the newer MERGE syntax when it is available. By the same token, I support systems that have documentation on clay tablets too.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by Pat Phelan View Post
    ... I support systems that have documentation on clay tablets too.

    -PatP
    Any documentation is better than no documentation
    George
    Home | Blog

Posting Permissions

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