Viewing 15 posts - 5,746 through 5,760 (of 6,486 total)
Phone Test phase 1 - CLR version....
the SQL
use testing
go
dbcc freeproccache
dbcc dropcleanbuffers
--set things up
declare @StartTime datetime
IF OBJECT_ID('TempDB..#mattPhoneExtTest','U') IS NOT NULL
drop table #mattPhoneExtTest
PRINT REPLICATE('=',78)
PRINT SPACE(12)+'Matt''s CLR Solution for...
November 14, 2007 at 9:29 am
All right - here's the CLR solution for the Comedy-Separated Value field challenge.
First - the CLR function:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports Microsoft.SqlServer.Server
Imports System.Runtime.InteropServices
Partial Public Class UserDefinedFunctions
...
November 14, 2007 at 8:59 am
Giants? Nah - I aint that tall....
More like - boys with their toys:)
November 14, 2007 at 6:34 am
I will tackle the split challenge tomorrow - I will not get a chance to set up both of the test scenarios etc.
Phone numbers challenge... This is 500,000 records,...
November 13, 2007 at 10:53 pm
This part here isn't correct SQL - you have 2 FROM statements, and expressions in the FROM statements.
Nuts (11/13/2007)
Select
...
From c.dates,f.clinicalService,
(f.cost / (DateDiff(dd, f.[Start date], f.[End date]) + 1))...
November 13, 2007 at 8:21 pm
I just noticed - some part of your aggregate query is missing, because that syntax should NOT be getting past the syntax checker. There's no way that's running. ...
November 13, 2007 at 7:31 pm
Jeff Moden (11/13/2007)
but we have others who are about to (use this to "gut" CTE's).
Like me! 😀
Heh... I don't need this thread to gut CTE's... most code examples that use...
November 13, 2007 at 7:16 pm
what are the data types of cost, startdate and enddate in the patients table?
November 13, 2007 at 4:07 pm
When doing count, either count the specific field (in this case, you want to count patients, so count the primary key of the patient), or count(*) (which will count each...
November 13, 2007 at 3:34 pm
You're supposed to set that before the stored proc. The procedure will emulate whatever the ANSI_NULLS setting was at the time when it was created.
So, -
SET ANSI_NULLS ON
GO
create...
November 13, 2007 at 3:04 pm
Vivien Xing (11/13/2007)
Comparing query performance from different server/SQL edition? It is supposed to compare based on the same server setting/configuration.
..only if your server has 1 processor, and 1GB...
November 13, 2007 at 10:55 am
Got it Adam. Must be it:).
By the way - if you were to rely on the execution plan - the CTE is "cheaper". So - processor time is...
November 13, 2007 at 10:51 am
I always used the
Delete tableA from
tableA inner join TableB on tablea.ida=tableb.idb
kind of syntax. Two FROM's? that's confusing.... Much more readable if you skip the first FROM,...
November 13, 2007 at 10:42 am
Jeff Moden (11/13/2007)
November 13, 2007 at 10:38 am
Brandie Tarvin (11/13/2007)
Anything that doesn't kill you is something else you can add to your resume. @=)Good luck with your move.
Anything that DOES just gets added to your tombstone:D
November 13, 2007 at 9:27 am
Viewing 15 posts - 5,746 through 5,760 (of 6,486 total)