Friday, February 10, 2012

comparing two string columns and show difference

Hello,

I am having this problem. I have a table to log any changes to the configuration of a program. If something changes, it gets recorded in this table.

So, I have two columns: BeforeChange, AfterChange. It looks like this:

BeforeChange AfterChange
------------------------
Amount = 30.00, Quantity = 3 Amount=30.00, Quantity=2

When I query those changes, I want to show only the changed values.
So, it will show only:

ChangeMade
------
Quantity = 2

Can anyone help me on this?

Thanks in advance.What about to normalize your table - problem will be resolved by itself.|||Originally posted by snail
What about to normalize your table - problem will be resolved by itself.

The problem is that, this table is filled by a program that I have no access to. (Honestly, I don't really know about the program at all)

I can only query the modificationlog table, and I have to make a report of any changes made with stored procedure.

If you can enlighten me a bit more, I would really appreciate it. I'm new to this MS SQL)

Thank you...

No comments:

Post a Comment