Viewing 15 posts - 91 through 105 (of 178 total)
Hi,
what about a set based solution? It'll run faster and scale better. This code courtesy of Jeff http://www.sqlservercentral.com/articles/T-SQL/62867/
We'll need a tally table for this so, set one up:
...
July 28, 2009 at 8:12 am
ajaykshanker,
Nor will you be able to search for names with spaces.
What about diacritics? e.g. â, ã, ä, å, æ
Regarding SQL injection, what about carriage returns/line feeds/tabs?
July 21, 2009 at 8:56 am
Can I search for "O'Neil"?
Can I search "';drop table dbo.Contacts;"?
Have you thought about full text index?
July 20, 2009 at 5:56 pm
Hi there,
check out Server Generate SQL Server Scripts Wizard — http://msdn.microsoft.com/en-us/library/ms181421.aspx
July 18, 2009 at 7:51 am
Hello,
It looks as if it should be a fairly easy solution, but without some table structures and some sample data it is difficult to help! See http://www.sqlservercentral.com/articles/Best+Practices/61537/ on...
July 17, 2009 at 11:50 am
Heh heh... np Jeff, any time, probs gonna be the only time I beat you to it... plugging one of your solutions!
@kramaswamy, your solution is based upon pivots,...
July 17, 2009 at 11:06 am
for the static (i.e. all column names for output are know in advance) see http://www.sqlservercentral.com/articles/T-SQL/63681/ — this article also compares pivot solution with cross-tab — cross-tabs are easier to read/maintain...
July 17, 2009 at 10:20 am
If no one else is relying on data in AuditTrail, and you have it backed up, you could consider a truncate on the table (http://msdn.microsoft.com/en-us/library/ms177570.aspx).
However, it concerns me...
July 15, 2009 at 10:28 am
Hi Dan,
It could be, without more details I can't be sure.
Is there anyone else involved with this project, or are you on your own on this?
Also are you sure the...
July 15, 2009 at 9:48 am
Hi there,
Any chance you could post table structures with some sample data and your expected results?
Here is a very useful article on how to post this information: http://www.sqlservercentral.com/articles/Best+Practices/61537/
///edited typo
July 15, 2009 at 9:43 am
Before doing a delete I often find it useful to do a select with the same where clause first so SELECT TOP 100 * FROM AuditTrail WHERE TimeStamp <= '2009/3/23'...
July 15, 2009 at 9:20 am
Hey Dan,
I had made the assumption that AuditTrail would have some timestamp column?
If this is the case then it'll be pretty easy DELETE FROM AuditTrail WHERE TimeStamp <= @YourChosenDate
If no...
July 15, 2009 at 9:09 am
Hi Dan,
the information logged in the AuditTrail table will be being logged by your web application, it really depends how many places in the code base that this is being...
July 15, 2009 at 8:52 am
Viewing 15 posts - 91 through 105 (of 178 total)