Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Delete one field's data from a table with a relationship

Posted on 2004-10-22
5
Medium Priority
?
161 Views
Last Modified: 2013-12-24
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!
0
Comment
Question by:ktjamms2
  • 2
  • 2
5 Comments
 
LVL 21

Expert Comment

by:pinaldave
ID: 12382804
Hi ktjamms2,
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
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 12382811
Hi ktjamms2,

if there is some constrain then you need to remove that constrain also...

Regards,
---Pinal
0
 

Author Comment

by:ktjamms2
ID: 12383974
The relationship ties the customer to the item they purchased and therefore necessary. The field is not in both tables
0
 
LVL 9

Accepted Solution

by:
shooksm earned 375 total points
ID: 12384462
UPDATE CustTable
SET No = NULL

Or if you no longer want the No column, alter the table and remove it.
0
 

Author Comment

by:ktjamms2
ID: 12385348
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.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question