My object is to keep track the frequency of viewing of records.
For example- A visitor is searching books. His search matches with 1200 books. When the result list is being sent back to the visitor, I would like to store ID of those 1200 books in another table. So that I can get the data of how may times a book was searched.
Hypothetically, the sql might be something like-
SELECT BookId, BookName FROM Books(INSERT INTO SearchLogs(BookId) VALUES(BookId))
I don't even know whether it is possible or not. I am using SQL Server 2008 R2.
Any idea?