Viewing 15 posts - 9,106 through 9,120 (of 15,381 total)
Thanks for picking this up and seeing it through Chris. I got slammed yesterday afternoon and couldn't get back to this one.
March 12, 2013 at 7:25 am
Sergiy I don't think yours is returning the correct information. The OP wants the count of rows that are open during the month. For example look at November 2012. Yours...
March 12, 2013 at 7:20 am
bugg (3/11/2013)
If you do just change the...
March 12, 2013 at 7:16 am
Not totally sure what you want for output but this is probably a decent place to at least get you started.
I first added 1 more row to your table so...
March 11, 2013 at 3:54 pm
A better approach then using "select top 1" as way to check if data exists is to use...EXISTS.
IF EXISTS(SELECT * FROM TABLEA WHERE COLUMN4 = 'xxxx' and COLUMN6 = 'xxxx'...
March 11, 2013 at 1:26 pm
Sqlism (3/11/2013)
Is this is the Best Practice to select E: for the SQL Server root directory? Please let me know the Pros/cons and the practices to be followed.
Thanks a...
March 11, 2013 at 1:23 pm
Love & Peace (3/11/2013)
I am a Sql Server Newbie.
I am writing a stored procedure which has one input...
March 11, 2013 at 1:21 pm
Excellent job posting ddl and sample data. There are a couple ways this could be done and it somewhat depends on what you want as output. Do you want to...
March 11, 2013 at 12:38 pm
You could use a recursive cte to navigate through your table. This is not the fastest methodology but would be faster than a cursor in most cases. Maybe you could...
March 11, 2013 at 12:00 pm
The big challenge you have here is that you have two tables each with an identity primary key and foreign keys. You are going to have to do quite a...
March 11, 2013 at 11:55 am
Well that was close. There were still a few issues but I was able to muddle my way through. (the insert issue was the very last one on the list...
March 11, 2013 at 10:40 am
Nice attempt at posting ddl and sample data. I would recommend you try running your code prior to posting. There are literally hundreds of issues with what you posted. Some...
March 11, 2013 at 8:34 am
And be careful of using NOLOCK. Given that this looks like a sales report accuracy might be important and NOLOCK is not going to be accurate.
http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.aspx
http://www.jasonstrate.com/2012/06/the-side-effect-of-nolock/%5B/url%5D
March 11, 2013 at 8:23 am
Please take a few minutes and read the first link in my signature about best practices. We need ddl, sample data and desired output. Your design does indeed look a...
March 11, 2013 at 8:20 am
Lynn Pettis (3/8/2013)
Erin Ramsay (3/8/2013)
That's why I used -3 milliseconds, Lynn. 🙂Was actually talking to Sean and his code subtracting 1 millisecond.
/facepalm
I think you both saw the error of my...
March 8, 2013 at 3:33 pm
Viewing 15 posts - 9,106 through 9,120 (of 15,381 total)