Viewing 15 posts - 1 through 15 (of 16 total)
You are splitting each string 3 times, once for each UNION - exactly the same way each time. Pre-process the string splitting: take the results from the splitting subqueries...
December 6, 2016 at 6:30 am
If I understand the problem correctly, try adding this to the outer part of your main query (copied from your subquery):
and (OH.ConDate is not null or OH.ConDate <> '')
Oh, and...
August 24, 2012 at 11:26 am
You refer to a 'derived column' - you are looking for a way to define a very complex computed column (at the table level) is this correct?
January 5, 2012 at 10:21 am
Are you perhaps looking for a view solution? Views are a great way to encapsulate reusable logic, but from a set-based perspective.
Additionally, you may want to investigate user-defined functions,...
December 30, 2011 at 1:12 pm
Just a stab in the dark - what data type is the column being cast to? If it's text (not varchar or char), the left function won't work.
December 20, 2011 at 2:59 pm
Seems to me that this could be leveraged as a home-grown replication solution between non-homogeneous databases. Just need an application at either end to ship-and-apply the changes.
December 7, 2011 at 1:28 pm
You could use OPENROWSET, but yeah, if you are having performance issues it is probably due to joins on tables between servers.
If the remote set of data is relatively small,...
September 21, 2011 at 9:20 am
Keep in mind that the RAND() function is only pseudo-random. If you need truly random numbers, I'd go with another technique - perhaps utilizing GUIDs?
Edit: Jeff beat me...
September 8, 2011 at 7:25 am
I suppose one could just put a check constraint on the source field based on the first part of case statement above. However, that probably wouldn't make any friends...
September 3, 2011 at 2:40 pm
Right, just a simple case statement like this (I'm sure this probably has plenty of holes, but it's not a half-bad place to start)
Select Case When Len(InputDate) <> 8 Then...
September 2, 2011 at 2:51 pm
What would be the benefit of converting the UDF to a CLR? In my mind, I would just use a transform on the field(s) at load-time using the UDF...
September 2, 2011 at 7:20 am
I actually designed an app that worked in a similar way. The application would read the sql out of a (developer maintained) table and present the results in the...
August 31, 2011 at 8:21 am
From Chris Hays's Reporting Services Sleazy Hacks Weblog:
http://blogs.msdn.com/b/chrishays/archive/2004/07/27/allparametervalue.aspx
August 25, 2011 at 1:07 pm
You noted that you were toying with the idea using SSRS. Had you considered going this route and providing the end users access to build their own reports using...
August 25, 2011 at 10:39 am
This meets the requirements, but why you'd need something like this is beyond me. Dynamic sql, use at your own risk...
CREATE PROCEDURE USP_CreateDatabase (
@DBName varchar(50)
) AS
BEGIN
...
August 18, 2011 at 8:52 am
Viewing 15 posts - 1 through 15 (of 16 total)