Viewing 15 posts - 16 through 30 (of 109 total)
There's two parts to this. First is getting it into SQL, which you can do like this: (props to whoever provided this sample. it didn't say)
DECLARE @FileContents VARCHAR(MAX)
SELECT @FileContents=BulkColumn
FROM...
November 9, 2015 at 6:46 am
There's a textbox in multiline mode bound to your data.
November 9, 2015 at 6:39 am
Ding Ding Ding! We HAVE a winner! And I'm not just saying it 'cause our names sound alike.
November 9, 2015 at 6:36 am
you should change the key.
[UtcTime] [datetime] NOT NULL, -- clustered not unique
--not part of index
[MachineRegisterId] [int] NOT NULL,
[Value] [float] NOT NULL
and add an unique index on utctime and machineregisterid, so...
November 4, 2015 at 7:51 am
Look, I apologize in advance but,
Where are you going with this?
Thanks, Ladies and Gentlemen, I'll be here all week.
January 23, 2015 at 4:33 am
GilaMonster (7/22/2014)
July 22, 2014 at 9:39 am
Could the problem here be the 12 column compound key? We got no table definition to look at, but that seems awful wide. One way to test that would be...
July 22, 2014 at 7:35 am
I believe in trying to help every programmer be the best they can possibly be - otherwise when I crush them utterly it will be meaningless 😀
July 11, 2014 at 5:20 pm
Yep, I understand what you're saying. Really, I don't think the business requirement was well thought out (who breaks ties) but I've tried to explain these things to stakeholders before...
April 22, 2014 at 10:47 am
You're almost there. You just have to add one more line to your query. Instead of
SELECT @SQLStatement = @SQLStatement + ',' + c.name +' '+ CASE
WHEN st.name LIKE '%CHAR%'
THEN...
April 22, 2014 at 10:40 am
OUTER APPLY instead of CROSS APPLY.
April 22, 2014 at 10:20 am
if you wanted to force that business requirement to work, maybe you could insert the original request with a priority of say, 2,000,000,000 and with all future requests decrement that...
April 22, 2014 at 10:18 am
Select *
From TableA
Where endDate >= convert(date,getdate()-1) and endDate < convert(date,getdate())
Any time you have consistent date math it's much faster to go
select * from
(select convert(date,getdate()-1) d1,convert(date,getdate()) d2) a
outer apply
(Select...
April 2, 2014 at 11:29 am
select * from
(
SELECT [columns], row_number() over (partition by c.id order by s.start desc) rn
FROM Client c
INNER JOIN Services s ON
c.SomeColumn = s.SomeColumn
WHERE s.START > GETDATE()-80
) a where rn=1
March 7, 2014 at 1:37 pm
You could try updating your index to be like this
CREATE INDEX IDX_Abstract ON #Diag_Codes(AbstractID,EpisodeNumber,OrderOfDiagnosisInEpisode)
INCLUDE (rowupdatedatetime,DiagnosisIcd)
That way it will be completely covered and won't have to do key lookups.
March 7, 2014 at 1:31 pm
Viewing 15 posts - 16 through 30 (of 109 total)