Forum Replies Created

Viewing 15 posts - 6,196 through 6,210 (of 8,731 total)

  • RE: Generate column numbers using dynamic SQL and pivot command

    It's not that we can't, it just seems useless if the weeks will always be 52.

    This is an example on how to do it.

    Note that I changed the code to...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Best way to prepare for interview?

    Study, practice, study, practice and keep going even if you get a job.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: The Case Of the Downward Pointing Arrow

    I met Kendal once in a SQL Saturday at Orlando but couldn't relate him. the description doesn't fit him at all. 😛

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need help with employee hierrarchy

    Is the order your only problem?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Help on PIVOT Query

    There's no need to read the table trice.

    WITH CTE AS(

    SELECT ID,

    Orderamt,

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: curser problem

    You shouldn't cross post, it will only fragment the responses.

    No more answers here, all should refer to: http://www.sqlservercentral.com/Forums/Topic1588259-3412-1.aspx

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: cursor problem. not working properly

    That's because you're not executing steps 2 and 3.

    Step 3 will fail because you only have a condition. I'm not sure what you are trying to do with step 2,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: curser problem

    That's because you're not executing steps 2 and 3.

    Step 3 will fail because you only have a condition. I'm not sure what you are trying to do with step 2,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need to resume code execution efter error

    Have you used TRY...CATCH to handle errors?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL Server 2008 performance issue

    Could it be possible that you have that limit established on the "max server memory" configuration options?

    SELECT *

    FROM master.sys.configurations

    WHERE name = 'max server memory (MB)'

    There are many things that...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Generate column numbers using dynamic SQL and pivot command

    Why do you want to use dynamic SQL?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Copying from SQLSMS grid, pasting in Excel, the word "NULL" is pasted!

    sleipner (7/1/2014)


    Besides which - if the results grid isn't designed for copy/paste to Excel or other programs - what the heck is it actually for?

    It's used to review...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Copying from SQLSMS grid, pasting in Excel, the word "NULL" is pasted!

    The reason behind this problem is that the results grid is not intended to be copied to Excel. For a huge amount of data, you could get out of memory.

    You...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: CONVERT PLSQL TO TSQL

    Remove the quotes from '@periodname'

    declare @period_name as date = 'DEC-10'

    SELECT CASE WHEN substring(period_name,5,2) = @periodname THEN SUBSTRING(@periodname ,5,2)

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Stored procedure to create a view in ANOTHER database.

    You can't use GO in an EXEC statement for dynamic code.

    You could use the SP sp_executesql from the destination database. You could complicate it more and use dynamic code to...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 6,196 through 6,210 (of 8,731 total)