Ok, so it sounds like you’re almost there. From your original post, it sounds like FSQL will be a perfect fit. Here’s what you need to do:
Map your OPC items to the right FIELD names. That is, say you want your control logix tag name “tank_level” to point to a column in your db called “tlvl”. When you brought that tag down into a group (by browsing, dragging, and dropping), it created an OPC item called “tank_level”. That name is the default column name it’s going to use. By double clicking the item, or simply hitting ENTER, you would change it to “tlvl”. Now it will be mapped to that field.
You’ve set your table name, so now you have the table and the column to look at. The final step is which ROW to go to. A standard group will look at one row at a time- and the settings are FIRST, LAST or CUSTOM, where you would put in your where clause.
The trick now it to figure out how to identify the row. Most tables will have what’s known as a “primary key”. This is one (or more) columns who value will be unique for every row. For example, on every table that FactorySQL creates, there’s a column call tablename_ndx, which is an auto incrementing number.
Say you have a column called “tank_number”, and a row for every tank. You’ve created a group, added that item above, and want to tie it to tank number 4. Your where clause would then be “tank_number=4”, without the quotes.
There’s one other thing to note: FactorySQL expects each table to have a primary key, and by default it expects it to be a certain name. To change this to accomidate an existing table, click “Options” on the action tab, right above “Table Name”, and select the correct key.
Hope this helps, welcome to the forum, and please feel free to post with any other questions!