Forum Replies Created

Viewing 15 posts - 2,116 through 2,130 (of 8,731 total)

  • RE: how to convert navarchar to datetime

    PhilipC (9/23/2016)


    Thanks Luis, that did the trick 🙂

    When you say "You probably have your server configured incorrectly, using the U.S. defaults. ", where is this configuration option?

    In the GUI, 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: Remove data - Please help

    Be careful when using those updates, they can be really bad. At least, that's what it's explained in here: http://www.sqlservercentral.com/articles/Performance+Tuning/62278/

    To prevent the problem, always include your target table in the...

    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 question

    Different option:

    SELECT '/' + LEFT( newpathx, CHARINDEX( '/', newpathx, CHARINDEX('/', newpathx) + 1))

    FROM #t

    CROSS APPLY( SELECT STUFF( pathx, 1, CHARINDEX('/', pathx), '') newpathx) x

    WHERE pathx LIKE '%/%/%/%';

    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 question

    mw112009 (9/26/2016)


    Eirikur Eiriksson:

    Sorry, but the first 2 entries in your solution should not be there. The output that I wanted will have exactly 3 "\" characters included.

    I will go with...

    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: Any way to clean up mutually exclusive OR conditions?

    Why do you want to short circuit the conditions? It won't improve performance and might actually harm it.

    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 question

    mw112009 (9/26/2016)


    I need a SQL statement that will out put the following values:

    ( The objective is to grab any values between the first and third "\" character

    Sample Output

    "/MidwestHealthPlan/Claims/"

    "/MidwestHealthPlan/Authorization/"

    CREATE TABLE #t(...

    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: Truncate tables with same prefix

    Can you share the code that you're using? (you can change the filter if needed)

    Also, how are you validating the size? Why are you using disk space to measure them...

    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: Truncate tables with same prefix

    Do you realize that dbo is not part of the table name? It's the schema name.

    In the case that you really have a point in your table name, the option...

    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: PLSQL Business Hours

    Here's a modified version of the function I posted in here: http://www.sqlservercentral.com/scripts/Working+Hours/111097/

    I removed breaks and lunch, and adapted the times.

    The DATEADD(DD, DATEDIFF(DD, 0, @StartDate), 0) can be replaced by TRUNC()...

    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: WHERE Name LIKE N'[CDW]%' ?

    johnbergholm (9/30/2015)


    SELECT *

    FROM dbo.LIKETest

    WHERE Name LIKE N'[CDW]%';

    What is the function of the 'N' after LIKE.

    This is an old post, but it never had a reply because...

    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: Multi value parameter

    I'm not sure if it changed in 2016.

    The parameters have a property to allow multiple values. If you have a dataset for the available values of your parameter (strongly recommended),...

    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: Are the posted questions getting worse?

    Someone needs a course on how to write basic DML. Or maybe I'm just grumpy this week.

    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: T-SQL Stored procedure with multiple if-else conditions

    Remove the parenthesis in the column list from the SELECT

    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: [dbo].[sysusers] column issue

    vblllove (9/23/2016)


    The problem is that I dont have a way if changing the source code. this is an old ERP system (PSI) that its was based on SQL server 7....

    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: T-SQL Stored procedure with multiple if-else conditions

    Phil Parkin (9/23/2016)


    Telling us that you are "getting errors" without telling is what the errors are is most unhelpful ... are we supposed to guess? Please post them.

    Repeating this.

    Also, stop...

    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 - 2,116 through 2,130 (of 8,731 total)