Forum Replies Created

Viewing 15 posts - 766 through 780 (of 993 total)

  • RE: Grouping

    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...
  • RE: Caom Object???

    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...

  • RE: counting rows and getting averages

    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...

  • RE: INSERTING INTO A TEMPORARY TABLE OUT PUT OF BATCH QUERIES

    And you MUST use a proper temp table (starting with #), not a table variable (starting with @)

  • RE: Maximum size of a process on Windows 2003 64-bits

    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...

  • RE: Function Privileges

    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...

  • RE: Function Privileges

    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...

  • RE: Problems with OpenQuery and variables

    Good idea Moyete - might be more efficient

  • RE: CASE PROBLEM

    No probs - glad to help

  • RE: Simplify the Creation of XML from SQL Server Data

    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...

  • RE: FYI: SP4 Install Failure on replsys.sql

    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...

  • RE: CASE PROBLEM

    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...

  • RE: Seeing the source of dynamic stored procedure

    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...

  • RE: Problem with handling dates

    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...

  • RE: Problems with OpenQuery and variables

    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...

Viewing 15 posts - 766 through 780 (of 993 total)