Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Posts
    54

    Question Unanswered: Order Entry Verification

    I have 10 tables. Each table is for a separate branch of one company. Inside each table are 3 fields (WH_CODE, PROD_CLASS, AND GL_CODE).

    When someone is entering information for each branch, I need to verify that they are entering correct information. I would like to create a query that will do the work for me.

    For example:

    WH_CODE PROD_CLASS GL_CODE
    A1 L1 62349102
    A1 LF 62349102
    A1 P1 62356102
    A1 PF 62356102
    A1 SF 62363102

    I need to ensure that the GL Code for any product class containing an "L" in warehouse A1 is correct (62349102) and return a result for any that are incorrect.

    Any help would be greatly appreciated.

    Thanks bunches,

    Mary

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Something like

    WHERE InStr(PROD_CLASS, "L") > 0 AND GL_CODE <> 62349102
    Paul

  3. #3
    Join Date
    May 2005
    Posts
    54
    It is giving me a syntax error in the query expression.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    It would help to see the actual SQL, and the data types of the fields in the WHERE clause.
    Paul

Posting Permissions

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