Viewing 15 posts - 18,886 through 18,900 (of 49,552 total)
Why do you need a function at all?
btw, that function will throw errors and not do what you want even if it did compile. To filter requires a where...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 9:49 am
No, that's not going to work. Run that and you'll see. Read carefully over the article, it does show you how to pull sample data.
I'll write up an 8 question...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 9:04 am
.Netter (4/22/2012)
There will only be one Exam which is the one in question at the moment, When users come in for an interview they will sit this exam!
Ah, now things...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 7:58 am
Are you absolutely sure there will never, never, never, never be a second exam? Never have something with a second set of answers?
p.s. You need to change the examresults table...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 7:50 am
.Netter (4/22/2012)
There is only one row in the correct_ExamAnswers with 36 columns is that what you ment?
So what happens if a second exam is added? How would you be able...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 7:35 am
Right, now let's take a look at how this works:
select uir.RoleId
FROM aspnet_UsersInRoles uir
inner join aspnet_Users u ON u.UserID = uir.UserID
WHERE...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 7:31 am
Mando_eg (4/22/2012)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 7:14 am
Sample data please?
How many rows in Correct_ExamAnswers? How do I tell which exam a user wrote?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 7:10 am
Mando_eg (4/22/2012)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 6:11 am
This might help a bit: http://www.simple-talk.com/books/sql-books/the-red-gate-guide-to-sql-server-team-based-development/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 5:58 am
Mando_eg (4/22/2012)
Perfect solutionThank you so much
so I missed the 'cast' function and I think it works as you have used it in this example
Please don't use dynamic SQL. You're just...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 5:54 am
A query's cost is not the number of seconds that SQL thinks it will take to run. Yes, the documentation says it is, the documentation here is wrong. Costs (and...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 5:50 am
Sounds possible, but without seeing the table definitions it's hard to be more precise than that.
Please post table definitions, sample data and desired output. Read this to see the best...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 5:44 am
There is absolutely no need to use dynamic SQL here. All you're doing by using dynamic SQL is making it more complex and less secure. There's also no need for...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 22, 2012 at 5:39 am
It's not a question of what's better, it's a question of what's possible.
If you're retrieving all columns, all rows, then a table scan (clustered index scan) is the only option....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2012 at 3:31 pm
Viewing 15 posts - 18,886 through 18,900 (of 49,552 total)