Viewing 15 posts - 76 through 90 (of 2,893 total)
Try to use JOIN instead of IN:
SELECT *
FROM
OPENQUERY([linkedservername],
'
SELECT ic.*
FROM Encounter AS e
JOIN Encounter_ItemChild ...
October 2, 2014 at 8:15 am
Anyone wish to check how 2012 version would do?
select FORMAT(C1*1000+c2,'000000000')
from #TestTable
😉
October 1, 2014 at 8:02 am
What defines period to be "Previous"
We can see that the logic applied quite simple: "2014_S27" is previous to "2014_S28". But, is this always the format?
If yes (two last digits...
September 25, 2014 at 10:09 am
If the above assumptions are right, then you can do this:
;with sd(v)
as (select '10.0.1600.22'
union select '233.38550.10.23423.2'
union select '2353.345.4543'
union select '456433')
SELECT v, LEFT(v, ISNULL(NULLIF(p,-1),LEN(v)))
FROM sd
CROSS APPLY (SELECT CHARINDEX('.',v,CHARINDEX('.',v,CHARINDEX('.',v)+1)+1) -...
September 19, 2014 at 5:51 am
All values have the same format as in your sample?
Always "dot" is a character you are after?
September 19, 2014 at 5:31 am
GilaMonster (9/18/2014)
shahi.alokchandra (9/17/2014)
September 18, 2014 at 4:37 am
Jeff Moden (9/17/2014)
September 18, 2014 at 2:35 am
Strange definition of overlapping eg. not counting cases when second job starts exactly at the same time as first does finish...
Anyway, you may try this:
;WITH AnyOverlapping
AS
(SELECT ...
September 17, 2014 at 8:12 am
Agree with Gail, but there is a shorted, more "cryptographic" version:
declare @t table (Qty decimal(12,3),CF1 Decimal(12,3),CF2 Decimal(12,3),Flag TinyInt)
insert @t select 10,2,6,0
insert @t select 10,2,6,1
select *, Qty * ((CF2/CF1) * ~cast(Flag...
September 17, 2014 at 7:18 am
...
When i try to create the index SQL Server tells me that the index couldn't be created because of a self join on table person.
...
A self join in my perception...
September 17, 2014 at 7:07 am
Most likely it is possible.
To tell for sure we need a bit more details.
Please refer to the link in my signature...
September 17, 2014 at 6:47 am
moz987 (9/12/2014)
Hey,i guess the field "IsEllgible" is supposed to conaint values for true and false. Therefore i would recommend a bit field.
Syntax should be
ADD COLUMN IsElligible bit null
The above also...
September 12, 2014 at 9:13 am
...
What is the easiest way of confirming whether a query was SARGable? Do you have to look at something in the execution plan?
...
Create a temp table with single column (varchar,...
September 12, 2014 at 7:45 am
...
You are still not getting it are you? I'm trying to point out a discrepancy in the way SQL Server handles NULL, a simple example would be
...
As a SQL Server...
September 12, 2014 at 2:09 am
Eirikur Eiriksson (9/11/2014)
F. van Ruyven (9/11/2014)
Eirikur Eiriksson (9/9/2014)
Alan.B (9/9/2014)
Cool. I never knew you could do that, very interesting :laugh:
Edit:...
September 11, 2014 at 11:22 am
Viewing 15 posts - 76 through 90 (of 2,893 total)