Forum Discussion
Append Query (does not work when primary query is empty)
gwizzer wrote:
I have two queries which may or may not return rows. However, if the primary query is empty then when a refresh is issued there is an error
Column 'anycolumn' in Table 'primaryTable' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.
Do you have to create a temporary record ... or is there another method of appending ?
Based on my test, that error occurs when there exists null values in the "one" table's related column(s).
A solution can be filtering out the null values in "one" table or replacing null with other value.
I don't find this error has anything specific to do with "primary query in apend query return no row". Could you elaborate more details?
If you have any question, feel free to let me know
HI Eric,
No Table 1 has no NULL records ... just create the table. The requirement is that I am appending two task tables into a single view, however, it will happen that either may be blank ... for sure if a record is returned then the ID will not be blank. I have not tested waht you describe below, and the issue only happens when either table is blank
- Eric_Zhang10 years agoMicrosoft Employee
Can you post a picture of the appended query result and the relationships correlated to the table "PrimaryTable" in your case?
- jayaramankumar8 years agoRegular Visitor
I am getting the same exception while appending two tables.
Column 'column 2' in Table 'Current table' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.
I have made sure that there are no null on primary columns but there are column which has null in current table. I do not understand why does that impact in append ?
Please help me understand this issue.