Forum Replies Created

Viewing 15 posts - 211 through 225 (of 7,164 total)

  • RE: Holidays and Calendar Generation

    I have seen holidays stored as bit-columns on traditional calendar tables that contain one row for each date and have seen them normalized out to separate tables. Thanks for sharing...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: How to "Date" help

    select datefromparts(year(getdate())-1,1,1) as beginning_of_last_year,

    datefromparts(year(getdate())-1,12,31) as end_of_last_year;

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Scheduling Job Steps

    michael_okonji (2/15/2016)


    I've got this job that needs to be executed in prod during downtime at exactly 9pm EST, starting with a backup. But the database that ill be setting up...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: SSIS Error Temp tables

    I am not sure why are you involving xp_cmdshell in this. If you execute your command-line in an SSIS Execute Process Task and capture the output to a variable or...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Help with understanding how SQL behaves with inner joins

    DOes your real City tale only have Malaysian cities in it? I am guessing not, but in this small example there are only 695 rows in the city table and...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Should Production Databases Be in a VCS?

    This person asked if we could put the production database code into a VCS. Not as a way of tracking development tasks, but as a way of auditing production and...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: QUERY: GET SPACE USED/FREE in All Databases

    For someone who has made so much hay off helping others slay RBAR processing, I don't blame you one iota for not wanting to review something you have no opportunity...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Migrating SQL Server 2008 to 2012 plus col and date format changes

    Start by running Upgrade Advisor against your database to see if any red flags are raised, e.g. deprecation announcements or features that been dropped from the product in use.

    https://msdn.microsoft.com/en-us/library/ms144256(v=sql.110).aspx

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: QUERY: GET SPACE USED/FREE in All Databases

    It can skip databases: https://www.mssqltips.com/sqlservertip/2201/making-a-more-reliable-and-flexible-spmsforeachdb/

    It can be very disruptive. Scary fact: Maintenance Plans used to rely on the proc, may still.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Help with dynamic stored procedure

    At the bottom of your dynamic proc change you needed to change this:

    and InjectedDate Between + '''@DateFrom +'''And''' +@DateTo ''

    to this:

    and InjectedDate Between ''' + convert(varchar(100),@DateFrom) +'''And''' + convert(varchar(100),@DateTo) +...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: QUERY: GET SPACE USED/FREE in All Databases

    Ramesh Saive (3/6/2009)


    There is an undocumented system procedure that executes any T-SQL query in all databases.

    EXECUTE sp_MSforeachdb 'EXECUTE sp_spaceused'

    Just in case anyone else happens to stumble on this thread, this...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: QUERY: GET SPACE USED/FREE in All Databases

    Wow, this thread has come back from the dead not once, but twice now!

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Restoring a backup file on a remote server

    Perry Whittle (2/15/2016)


    Orlando Colamatteo (2/13/2016)


    Be wary of the PowerShell step type in SQL Agent though. I prefer to have a my PowerShell scripts saved to .ps1 files (ideally on a...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: purging old data and outer joins

    Can you try it in order from most rows to least, see Jeff's follow-up post to mine. The thought being to reduce the set as much as possible as early...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Maximum Identity Value Reached

    I do know from experience that you can add a column to a table with no immediate effect but,

    True, provided the column is nullable, my understanding is also that...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 15 posts - 211 through 225 (of 7,164 total)