July 8, 2011 at 5:48 am
Hi all,
I tried to search on my question, but I'm having difficulty specifying helpful search parameters.
We have a central database of customers that has records in place for customers that could be many years old without having been changed.
A new program has been launched that allows people the option to register for it; however, the program was launched very quickly and our developers have not finished the web interface that will allow people to directly register in our customer repository.
So, the people responsible have just put a temporary link on the website that has people register using a form which is sent to our office until the proper interface is finished.
What happens is, we receive a form, and a person uses an existing web interface to look up the individual who is registering for the new program. 99% of those registering already exist in our database, so the app is simply doing a SELECT against the database and returning the person's information.
We need a way to "tag" the selected person as being registered in the new program, but triggers don't work on SELECT's as far as I know.
It's not a problem to add a field to the table - e.g. an indicator that a specific record should now be included in the new program, but I'm looking for suggestions on how best to do it.
Since it is a temporary solution, we can get the clerk to make some aribtrary modification to the record when they look it up - then we could query the audit fields "Modified By" and "Modified Date" and write an update trigger based on changes to the table made by specific users to set an indicator column... it's not elegant, but it should work for the short term.
Can anyone validate this approach, or suggest a way to do this?
Any thoughts are much appreciated.
Steve
July 8, 2011 at 6:14 am
How about modifying the procedure that returns the look up information to update a column if a match is found?
For e.g. something like
SELECT <...> FROM Table WHERE Criteria = @Criteria
IF @@ROWCOUNT <> 0
UPDATE Table SET AccessedFlag = 1 for that row
July 8, 2011 at 6:24 am
Thanks winash,
We'll take a look at that - I'll see how easily we can make that type of modification
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply