Viewing 15 posts - 5,941 through 5,955 (of 8,731 total)
I totally missed that part and understand your pain.
For now, the logic indicates that the "wide" join you're using seems the best option with one slight modification. You can remove...
August 21, 2014 at 4:00 pm
Can you give me an example on what you just said? Are you trying to do a ranking? Or am I misunderstanding you?
Partitioning (using windows) the results is possible, but...
August 21, 2014 at 3:25 pm
The Quirky Update is easy to get, assuming that you already know the rules to follow.
Here's an example with your sample data.
DECLARE @Value float=0,
@id int
UPDATE t...
August 21, 2014 at 3:11 pm
I'd use a cross tabs approach which seems more flexible, but that's up to you.
SELECT YEAR(DateFormCompleted) AS YearRecruited,
Hospital,
COUNT(CASE WHEN month(DateFormCompleted) = 1...
August 21, 2014 at 1:12 pm
But in the advanced "tab" from your flat file connection manager, there's a data type and length defined. The truncation might be occurring in there.
August 21, 2014 at 9:46 am
If it's a currency exchange rate table, you'll always need the date. There's no use of a rate without the date. A non-clustered index makes no sense because the clustered...
August 21, 2014 at 9:44 am
How is the column defined on your flat file connection?
August 21, 2014 at 9:15 am
One reason can be that scalar functions work row by row while inline functions don't.
Or it could be that scalar functions prevent parallelism (because of the previous cause) and...
August 21, 2014 at 9:06 am
If you concatenate anything to NULL, it will return NULL. The same way as if you try to do an arithmetic operation with NULL.
You can validate for nulls.
select idx,
'[LevelID]=' +...
August 21, 2014 at 8:55 am
I used the MAX function because I'm not sure what kind of data you need, so it will aggregate the data to get a single result. You might need a...
August 21, 2014 at 8:41 am
Your problem is the double FULL OUTER JOIN as you can see if you use SELECT * to show all rows and columns.
Here's an alternative, but you should reevaluate the...
August 20, 2014 at 4:43 pm
As Sean said, there are better ways to do it than a cursor. Here's an option using XML PATH which is explained in the following article: http://www.sqlservercentral.com/articles/comma+separated+list/71700/
To solve your problem,...
August 20, 2014 at 2:55 pm
Since a previous poster said that everything was correct on XP but not on Server 2003, my guess is that you might want to check that you have the correct...
August 20, 2014 at 2:30 pm
I was just going to mention that. Here's a revised version to include strings with no matches at all using OUTER APPLY.
WITH cteString ( ArtifactID, PATH )
...
August 20, 2014 at 2:22 pm
I'd also remove the CASE (which doesn't seems to match the pattern search) and include it in the APPLY results.
WITH cteString ( ArtifactID, PATH )
...
August 20, 2014 at 2:14 pm
Viewing 15 posts - 5,941 through 5,955 (of 8,731 total)