Viewing 15 posts - 286 through 300 (of 549 total)
Thanks, I hate using temp tables too
and I was sure I wasn't thinking straight with #temp and ROW_NUMBER
Say yes to CTE and Subqueries/Derived Tables!
November 21, 2008 at 10:01 am
I am sure there's a better way, and less #temp tables involved
but here's my first try. Idea is to give Identity to each row, and find the streak, and select...
November 21, 2008 at 7:58 am
Since there's a missing row in the middle you didn't show, so you are looking for any X-consecutive rows right?
so in this case, only rows that fit the criteria would...
November 20, 2008 at 3:33 pm
My first thoughts are either ROW_NUMBER, or Tally table
I'd say provide a sample data set (in SQL code) so that we can assist you better
To clarify though, shouldn't results be...
November 20, 2008 at 9:11 am
I imagine if a company has to comply to SOX, there has been modifications to data retention policies (at a significant cost)
But I do not ever want to be in...
November 20, 2008 at 9:07 am
Thanks for the script, I like it shows Orphan users too
November 20, 2008 at 8:18 am
For those situations, you almost need 1 dataset per 1 dropdown parameter (from query)
You could do cascading dropdown though
e.g.
1st dropdown is Country = select name from country
2nd one is...
November 20, 2008 at 8:10 am
I wonder if SQL Nexus to load 9GB trace file
http://www.codeplex.com/sqlnexus
What is SQL Nexus?
SQL Nexus is a tool that helps you identify the root cause of SQL Server performance issues. It...
November 20, 2008 at 8:05 am
I'll double check the SMTP server is reachable from the SQL Server
The error log did seem to indicate that way, not login failure or mail rejected etc...
November 20, 2008 at 8:03 am
so you want only UNIQUE Field1 from Table1? is that the requirement?
and it's okay to have duplicate entries in Table2?
GROUP BY or ROW_NUMBER can mimic DISTINCT as well
November 20, 2008 at 7:38 am
I don't know how to do this, nor know why this is necessary
Identity is an artificial surrogate key, like someone said, do not give it a meaning 😛 it is...
November 20, 2008 at 7:32 am
Thanks for the script Peso
I am making a little modification to it so that startTime and endTime will use the infoDate date
otherwise it keeps showing "1900-01-01 05:00:00.000" for a Daily...
November 19, 2008 at 12:14 pm
You can install it and not start/enable it, it won't hurt
and when you need it in the future, you don't have to go through the SQL Server installation again
November 19, 2008 at 8:45 am
Absolutely Stable I'd probably pick Windows 2003 R2 SP2 just because it's been out for long and tested
But in general I would pick Windows 2008, I've heard about the performance...
November 19, 2008 at 8:43 am
Note: watch out for ending previous statement with SEMICOLON
Here's a working code sample
CREATE TABLE #Test
(
EmpID INT,
EmpName VARCHAR(50)
)
INSERT INTO #Test VALUES(1,'Daya')
INSERT INTO #Test VALUES(1,'Daya')
INSERT INTO #Test VALUES(1,'Daya')
SELECT * FROM #Test;
WITH Emp...
November 19, 2008 at 8:33 am
Viewing 15 posts - 286 through 300 (of 549 total)