Viewing 15 posts - 2,716 through 2,730 (of 4,087 total)
dhanekulakalyan (4/26/2016)
Thank you I need to check with ltrim(rtrim(avg(datesdiff))) to get in one row. I will keep you posted .
LTRIM() will remove leading spaces, RTRIM() will remove trailing spaces....
April 27, 2016 at 8:29 am
Your data has a tab in it, so you are getting two rows: one with a tab, and one without. SQL will often ignore trailing spaces, but tabs are...
April 26, 2016 at 3:42 pm
The GROUP BY clause creates a grouping set and you can only select or order by properties of the grouping set. A grouping set has two kinds of properties...
April 26, 2016 at 9:46 am
Is there some reason that you chose to use CROSS APPLY rather than CROSS JOIN? I tend to only use CROSS APPLY if the right side is somehow dependent...
April 20, 2016 at 2:41 pm
Part of the problem is that you are accessing the VehicleMaintenance table SIX times when I think you can do what you need to by replacing your sub-queries with CASE...
April 20, 2016 at 12:24 pm
Eirikur Eiriksson (4/18/2016)
Why does the ActivitiesSamplesPartners join not have an ON clause or is it just bad code formatting?😎
The tables are logically joined in the order of the ON clauses....
April 18, 2016 at 3:11 pm
ROW_NUMBER() is deterministic as long as the ORDER BY clause is deterministic. This is why it's a good idea to add enough keys to the ORDER BY clause to...
April 18, 2016 at 3:03 pm
Depending on your indexes, the following may be better (and also produces the full concatenated string using the XML concatenation method).
Create table #TestTable (EmailID Int, EmailAddress Varchar (100))
Insert #TestTable Values...
April 18, 2016 at 2:46 pm
Also, you can't just assume that the function is not the problem. Unless it's a inline table-valued function, it quite possibly is the problem and re-writing it to be...
April 18, 2016 at 12:13 pm
You have several issues here.
1) This requires an order and your data has no obvious way to specify that order.
2) You are combining columns with different data types into a...
April 15, 2016 at 7:42 am
Luis Cazares (4/14/2016)
drew.allen (4/14/2016)
April 14, 2016 at 10:49 am
Jeffery Williams (4/14/2016)
I am getting an error that I need an output clause. Sorry, not sure where to put that or what syntax.
Exact Error:
Msg 10716, Level 15, State...
April 14, 2016 at 9:24 am
You need to be VERY CAREFUL with the quirky update. It is undocumented, not guaranteed, and requires a clustered index on the sort order. If you DO have...
April 14, 2016 at 7:50 am
Tables represent sets, which are inherently unordered. All of the rows that contain NULL values are indistinguishable from each other based solely on the data that you have provided,...
April 13, 2016 at 2:28 pm
It's probably going to be much easier to work from the raw data rather than pre-processed data. Can you post samples from the original table and the original query?
Drew
April 13, 2016 at 12:04 pm
Viewing 15 posts - 2,716 through 2,730 (of 4,087 total)