-2

Using the following SELECT Statement, I see all active drivers with a Credit Card Number :

SELECT top 1000 *
FROM cashcard
WHERE crd_status = 'A'

Based on that query, I get a table with a bunch of columns. The column I'm focused on is the first one titled crd_cardnumber which is a list of credit card numbers that are associated with people that are active in our database.

This is connected to our in-house database and we have an application that will run an automated query.

I just need to create a SELECT statement that will return What has changed... in the crd_cardnumber column when I run it.

Can anyone help me out?

John K. N.
  • 18,854
  • 14
  • 56
  • 117
Chase Sarhan
  • 1
  • 1
  • 1

1 Answers1

2

Directly plagiarized from my answer on a similar question:

If you're not already logging changes yourself in your user defined tables (either with a column to denote when a change occurs, at least, or by capturing the actual changes themselves), then you'll need to implement a feature that does so for your. Here is a list of features you can use to accomplish this:

  1. Triggers - Fire whenever data changes in a table, can implement logic similar to being in the context of a stored procedure.

  2. Temporal Tables - System versioned copies of the user defined tables that track changes.

  3. Change Tracking - Automated tracking of changes for your user defined tables.

  4. Change Data Capture - Keeps track of DML changes to the specified user defined tables.

  5. Audit - Automatically tracks a multitude of actions at the server level.

J.D.
  • 40,776
  • 12
  • 62
  • 141