ktjamms2
asked on
Delete one field's data from a table with a relationship
I want to delete the credit card number from the database kept on the server for security purposes. I used a cfquery
<CFQUERY NAME="DeleteCrNo" datasource="database">
DELETE No FROM CustTable
</CFQUERY>
but the table is related to another table and I get an error cannot be deleted or changed because table 'sales' includes related records.
Can someone tell me how to delete the data from this field?
Thanks!
<CFQUERY NAME="DeleteCrNo" datasource="database">
DELETE No FROM CustTable
</CFQUERY>
but the table is related to another table and I get an error cannot be deleted or changed because table 'sales' includes related records.
Can someone tell me how to delete the data from this field?
Thanks!
Hi ktjamms2,
if there is some constrain then you need to remove that constrain also...
Regards,
---Pinal
if there is some constrain then you need to remove that constrain also...
Regards,
---Pinal
ASKER
The relationship ties the customer to the item they purchased and therefore necessary. The field is not in both tables
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I need the info from the column. I want to keep the database backed up on some other media and keep the info from being stored in the database on the server.
1) you need to drop the relations.
If you are deleting them then the relations anyway does not mean to you as you are loosing the information. So you need to remove the realtions.
2) then you can delete them.
Regards,
---Pinal