For the first time I am trying to create a DataSet/TableAdapter in the VS2010 DataSet Designer using a query with a join and function; NVL(). Typically I had only used single database tables by dragging them to the designer workspace from the server explorer. In this case I right-clicked and added a TableAdapter and entered the following query:
SELECT a.primary_key, NVL(a.message, b.subject) as subject
FROM TableA a, TableB b
WHERE a.primary_key = b.primary_key (+)
AND (a.time_stamp BETWEEN :time_start AND :time_end);
The DataTable was created with the appropriate columns. The issue is that when attempting to execute the query on the TableAdapter I am given the error:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
I don't see anything unusual in the properties of the individual columns. What am I missing?
Thanks!