Viewing 15 posts - 766 through 780 (of 993 total)
What about this - no hard coding of values and should be easily adapted to many different situations...
declare @ranges table(minRange int, maxRange int) insert into @ranges(minRange, maxRange) select 1, 20 UNION select 21, 55 UNION select...
November 2, 2005 at 3:41 am
Yes, there's a performance penalty.... But, if it is something that is not done often and can only be performed by a COM call, then by all means, do so...
November 2, 2005 at 3:32 am
You beat me to it AJ ![]()
CUBE is one of those little-used operators that is handy in giving what could effectively be viewed as...
November 2, 2005 at 3:30 am
And you MUST use a proper temp table (starting with #), not a table variable (starting with @)
November 2, 2005 at 3:27 am
I suppose it should be bigger, but I am not sure how the available memory space is split. For example, on a typical 32bit machine, you have 4GB of addressable...
November 2, 2005 at 3:26 am
Well I suppose that's your answer - EM is smart enough not to show permissions that cannot be set. I guess it depends on the type of function - was...
November 1, 2005 at 11:58 pm
There are different types of UDFs - some are inline scalar functions (return a single value), others are inline table-value functions that can be used similarly to a view. One...
November 1, 2005 at 10:40 pm
Good idea Moyete - might be more efficient ![]()
November 1, 2005 at 9:10 pm
Hi Hugh.
Thank you very much for sharing such a wonderful utility with the community. It is obvious that you have thought a great deal about keeping the output flexible whilst...
November 1, 2005 at 6:33 am
Under what account is the MSSQLSERVER service running? Use "services.msc" (start->run->services.msc) to find out.
Run svrnetcn.exe and see if "Named Pipes" is listed under enabled protocols. If not, move it from...
November 1, 2005 at 6:03 am
Yes, there are two forms of the case statement. There is the tradional case statement (which you are using), where you have an expression - left(m.xyz, 6) - and a set...
November 1, 2005 at 5:58 am
If your SP has code like
declare @sql varchar(8000)
set @sql = 'select * from myTable where myCol = 1'
exec(@sql)
You can also add in a line saying
print @sql
And your SQL will be...
November 1, 2005 at 5:54 am
Yes - always easiest to use the actual date functions to work with dates rather than, possible more intuitively, to work with dates by converting to to their parts, performing...
November 1, 2005 at 5:53 am
Look at this simple example of dynamic SQL...
create table #x(myCol int)
declare @sql varchar(8000) set @sql = 'select 1 as mycol union select 2'
insert into #x(myCol) exec(@sql)
select * from #x
drop table #x
You can...
October 25, 2005 at 9:03 am
Viewing 15 posts - 766 through 780 (of 993 total)