• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

SQLSTT=42702 Error when using filter widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQLSTT=42702 Error when using filter widget

    I have a data source that consists of two files joined by the same field name. In the data source, I use the fully qualified name to select/join the two tables (filename.fieldname). I also have the field renamed using AS.

    Code:
    SELECT
    order_id,
    rtmhdrwh.mfg_id AS mfgid,
    com_name,
    cust_id,
    reptim_id,
    bill_name,
    bill_adr1,
    bill_adr2,
    bill_city,
    bill_st,
    bill_zip,
    ast_date,
    ast_time,
    rrn(RTMHDRWH) AS rrn1,
    rrn(RTMCNFIG) AS rrn2
    FROM
    rtmhdrwh
    LEFT JOIN rtmcnfig ON rtmcnfig.mfg_id = rtmhdrwh.mfg_id
    WHERE
    ((ast_com = '') or ast_date = current_date)
    The data source and widgets work fine. However, my app is using a chart widget to filter my grid widget. I'm getting the error:
    Code:
    VV00007 - SQL statement prep failure (SQLSTT=42702) - SQL0203 - Name MFG_ID is ambiguous.
    Help Text
    The value of the statement is: SELECT order_id , rtmhdrwh.mfg_id AS mfgid, com_name , cust_id , reptim_id , bill_name , bill_adr1 , bill_adr2 , bill_city , bill_st , bill_zip , ast_date , ast_time , rrn(RTMHDRWH) AS rrn1, rrn(RTMCNFIG) AS rrn2 FROM rtmhdrwh LEFT JOIN rtmcnfig ON rtmcnfig.mfg_id = rtmhdrwh.mfg_id WHERE ((ast_com = '') or ast_date = current_date) AND ((MFG_ID='M31993'))
    I've tried changing the field name to something else and updating my widgets... I still get the same thing.

    The filter widget shows the fieldname as it appears in the file (so there are two MFG_ID fields listed)... Like it is ignoring the "AS".

    I've not encountered this previously

  • #2
    Can you try resaving the grid widget that is attached to this data source? Also, then go into the behaviors for this app and resave the filter widget action.

    Comment


    • #3
      Originally posted by sean.lanktree View Post
      Can you try resaving the grid widget that is attached to this data source? Also, then go into the behaviors for this app and resave the filter widget action.
      I did that several times before posting... I also tried again this morning. I actually deleted the behavior and recreated it. Still get the error.

      Comment

      Working...
      X