Non unique column reference

FLPFLP Member Posts: 9
Hi,

Among other tables I'm trying to get data from the Item table in NAV 4 (runtime NAV 2009) by using NODBC. The other tables are running fine but when I reach the Item table I get the error message "Non Unique Column Reference 'Common Item No.' ". I have checked the captions of all the fields in the Item table and all captions are unique - I have even tried renaming the caption of the field 'Common Item No.'.

Any one having an idea on how to overcome the problem?
Finn Landgreen-P
www.corpital.com

Comments

  • garakgarak Member Posts: 3,263
    SQL Serveroption?
    Try: "Common Item No_"
    Do you make it right, it works too!
  • FLPFLP Member Posts: 9
    Its native NAV DB and the field 'Common Item No.' is not within my script:

    SQL SELECT Description as ItemDesc,
    "Gen_ Prod_ Posting Group" as CategoryID,
    "No_" as ItemID,
    "Vendor No_" as VendID
    FROM Item;
    Finn Landgreen-P
    www.corpital.com
  • cernstcernst Member Posts: 280
    You have the same caption for two fields, it has nothing to do with the field Common item no.
    Look for identical captions in the tabel and change it then it'll work.
    _____________________
    NAV Freelance Consultant
  • FLPFLP Member Posts: 9
    Thanks - by sorting the fields in caption in order in Excel I found the field with identical caption. After changing caption everything worked fine.
    It would have been nice if the 'Non unigue column reference' message came with the field name that actually gave the problem....
    Finn Landgreen-P
    www.corpital.com
  • michalkmichalk Member Posts: 43
    It is 2011 now and problem still exists :) Just found that 2 fields have same caption in ITEM table.

    Thank You for help haha (karma after 3 years ;))

    M
Sign In or Register to comment.