May
6
awarded  Critic
May
6
comment Count Consecutive Codes
Could you elaborate on what you mean by "Consecutive"? Resource 656 has a gap of 15 days between it's dates.
May
4
awarded  Commentator
May
3
comment How to simply add ' and " to numeric values for height(inch) format?
As long as both values are between 0-9, you could do CAST(SUBSTRING([value],0,1) AS char(1)) + '''' + CAST(SUBSTRING([value],1,1) AS char(1)) + '"'
May
3
comment How to simply add ' and " to numeric values for height(inch) format?
If the value I give you is 111, how can you tell if the value is 1'11" or 11'1"?
May
3
awarded  Yearling
May
3
answered Why am I receiving the identity insert error even after explicitly setting IDENTITY_INSERT ON and using a column list?
Apr
30
comment 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
@ypercubeᵀᴹ That is the funniest thing I've seen all week!
Apr
30
answered 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
Apr
30
awarded  Teacher
Apr
29
comment Update inner join query efficiencies
Awesome, submitted an answer.
Apr
29
answered Update inner join query efficiencies
Apr
29
comment Update inner join query efficiencies
No problem! Let us know how it goes. To be honest, unless you have a really busy/underpowered DB, I don't know how the query could take 45+ mins even without an index, but hopefully indexes will help.
Apr
29
comment Update inner join query efficiencies
Try putting a nonclustered index on both - use batch_id and batch_li as the keys, and make sure to include comments. The order in which you include them depends on the contents of the columns - I'd read up on that before you make a decision.
Apr
29
comment Update inner join query efficiencies
Could you include details of the indexes (or lack thereof) in your question? Might help the accuracy of any answers.
Apr
17
awarded  Scholar
Apr
17
accepted Equivalence of correlated DATEADD intervals
Apr
16
awarded  Editor
Apr
16
revised Equivalence of correlated DATEADD intervals
added 145 characters in body
Apr
16
comment Equivalence of correlated DATEADD intervals
I guess that's sort of the point of the question - apologies if it was ambiguous! Lines 1-3 of my question were what I was aiming to "resolve". Edited my question to clear it up - added the fourth line.