deleting rows from TR_QUERY_ELEMENT

Hello,

I'd like to delete a row from TR_QUERY_ELEMENT because its not needed anymore. When I try to I get an error because of an attempted constraint violation:


Updates of TR_QUERY_ELEMENT FAILED.
547 : SQLSTATE = 23000
Microsoft OLE DB Provider for SQL Server
The DELETE statement conflicted with the REFERENCE constraint "FK_TX_QUERY_ELEMENT_TR_QUERY_ELEMENT_id".
The conflict occurred in database "impresario", table "dbo.TX_QUERY_ELEMENT", column 'element_no'.

No changes made to database.

DELETE FROM TR_QUERY_ELEMENT
WHERE id = 257 AND
description = 'Preference-Interests_Merch' AND
category = 105 AND
data_select = 'isnull(!.PreferenceValue,0)' AND
data_from = '(select a.customer_no, a.tkw, case a.selected when ''Y'' then 1 when ''N'' then 0 end as [PreferenceValue] from [tx_cust_tkw] a )' AND data_where = '!.tkw = 32' AND control_group = -1 AND single_row = 'Y' AND primary_group_default = 'N' AND created_by = 'aglynn' AND create_dt = {ts '2016-09-07 08:24:06.787'} AND create_loc = 'AUDIUSER57' AND last_updated_by = 'aglynn' AND last_update_dt = {ts '2016-09-07 08:24:06.787'}

Does anyone know of the proper way to disable/delete/deactivate an output set element in TR_QUERY_ELEMENT?

Parents Reply Children