Forum Replies Created

Viewing 14 posts - 16 through 30 (of 30 total)

  • RE: Alternate Way to Write query: ISNULL function causing issues

    Sergiy (6/6/2016)


    and NOT (pm.pdenddate=pt.pdenddate

    OR (pm.pdenddate is NULL and pt.pdenddate is NULL)

    )

    This logic doesn't quite match what's given - the pm.pdenddate=pt.pdenddate part excludes all lines where one side only of the...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Populating SQL tables with entries from Windows folders

    You could try something like the following, though you'll still have some work to do to split out the datestamp, filesize and filename.

    IF OBJECT_ID('Folders','U') IS NOT NULL

    DROP TABLE Folders;

    GO

    CREATE...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Script to delete old bak files in sql server 2008

    A free comprehensive third party option is Ola Hallengren's solution (http://ola.hallengren.com) which is based on stored procedures, sqlcmd, and SQL Server Agent jobs. We've used it on SQL2008 R2,...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Function to format a datetime variable by a mask

    Agreed, if you can use one of the standard styles.

    The initial triggers for me writing this were a couple of requests that didn't seem to fit in with one...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Analytical function for my Q

    dwain.c (7/29/2013)


    Your expected results are off for the <30 days column (can't be less of a percent than <20 days), but something like this should do it:

    SELECT datein

    ...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Config File Package Configuration

    Setting up a SQL Agent job to run the master SSIS package may help. The job step configuration for an SSIS package includes a "Configurations" tab for defining which config...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: orphaned users in sql server

    Alternatively, you could transfer the logins and passwords from the original server to the target server. This can have the advantage of not having to deal with orphaned users...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Day Zero with PowerShell

    Thomas - yes. Also "ft -a" instead of "ft-a" in the example script.

    Other than that, finally got me going with PowerShell - thanks Aaron!

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: MSDB Job History Tables

    Alternatively, add a column with the instance name to your CentralJob table and view and optionally set composite key on InstanceName and job_id e.g. your view could look like:

    CREATE VIEW...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Fun with Scale and Precision

    Nadabanan - thanks for spotting this. Have updated with correct text.

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Fun with Scale and Precision

    This explains it:

    http://msdn.microsoft.com/en-us/library/aa258274(SQL.80).aspx

    For division:

    [EDITED - was incorrect, apologies CFF]

    scale of the result = max(6, s1 + p2 + 1)

    where s1 is the scale of the numerator...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Fun with Scale and Precision

    The missing digits is due to the initial casts - with decimal, they are automatically converted to the minimum numeric precision and scale required before the calculation is done, so...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: copying data from one sql server to another

    An alternative option may be to restore the database as a whole rather than exporting data from one server to another - maybe the existing DTS package does this already...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: IN Operator

    Interestingly

    SELECT entryname FROM test2 WHERE entrycode LIKE 'MU' -- no trailing space

    returns the result MUMBAI. MSDN is illuminating on how leading and trailing spaces are treated...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

Viewing 14 posts - 16 through 30 (of 30 total)