Forum Replies Created

Viewing 15 posts - 1,861 through 1,875 (of 8,731 total)

  • RE: Find the brackets

    funbi (11/17/2016)


    Laurie Dunn (11/17/2016)


    This would also work and keep the code simple...

    SELECT *

    FROM dbo.MyData

    WHERE Left(mychar,1)='[';

    Yeah I got

    select * from MyData where CHARINDEX('[',mychar,0) = 1

    which works fine, then looked at...

    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: Duplicate results from stored procedure calling functions

    drew.allen (11/16/2016)


    These types of functions are best left to the presentation layer.

    Drew

    +100

    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: Using 'AND' in an INNER JOIN clause

    When using AND in a JOIN, it usually means that you have a composite key which would consist on 2 or more columns.

    As you have realized, removing one or more...

    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: total and group by

    You can use something like this

    WITH CTE AS(

    SELECT Product,

    SUM( CASE WHEN Category = 'Something' THEN Value ELSE 0...

    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: Benefits of SQL 2014/2016 over 2005 ??

    If you needed more benefits, there are many Enterprise features that have been made available for 2016 SP1 Standard edition.

    https://blogs.msdn.microsoft.com/sqlreleaseservices/sql-server-2016-service-pack-1-sp1-released/

    https://blogs.technet.microsoft.com/dataplatforminsider/2016/11/16/sql-server-2016-service-pack-1-generally-available/

    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: Today's Random Word!

    crookj (11/16/2016)


    Y.B. (11/16/2016)


    djj (11/16/2016)


    Ed Wagner (11/16/2016)


    Grumpy DBA (11/16/2016)


    Brandie Tarvin (11/16/2016)


    Removal

    Alien probe

    X Files

    X Men

    Mutants

    Inhumans

    S.H.I.E.L.D.

    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: Replace uppercase words with bold

    I still prefer the Pattern splitter.

    DECLARE @String varchar(1000);

    SET @String = 'Lorem ipsum dolor sit amet, CONSECtetur adipiSCIng elit. PelleNTesque in ELIT ut ex accumsan sagittis in a urna. ÄÅÖ'

    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: Query Question

    ajkarora (11/15/2016)


    so sorry but I posted in SQL Sever 2014 by mistake. Will this work on SQL Server 2008?

    No, it has functionality that was introduced on 2012.

    Have you read 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: EXEC and EXECUTE

    DamianC (11/15/2016)


    Knew the answer but not sure why there are 2 almost identical commands that do exactly the same thing

    Those are not 2 commands. It's one command and its short...

    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: Today's Random Word!

    Hugo Kornelis (11/15/2016)


    Manic Star (11/15/2016)


    crookj (11/15/2016)


    djj (11/15/2016)


    Ed Wagner (11/15/2016)


    Hugo Kornelis (11/15/2016)


    Brandie Tarvin (11/15/2016)


    djj (11/15/2016)


    Ed Wagner (11/15/2016)


    Revenant (11/15/2016)


    Ed Wagner (11/15/2016)


    Brandie Tarvin (11/15/2016)


    Y.B. (11/15/2016)


    Luis Cazares (11/15/2016)


    Ed Wagner (11/15/2016)


    djj (11/15/2016)


    Manic Star (11/15/2016)


    djj (11/15/2016)


    Ed...

    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: Using UPDATE with ROW_NUMBER()

    Use a CTE or a derived table to update it using ROW_NUMBER.

    WITH CTE AS(

    SELECT t1.*,

    t2.country...

    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: Query Question

    This is an option using windowing functions.

    This is also an example on how you should post sample data.

    CREATE TABLE #Sample(

    TravLotID int,

    ...

    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: Query Question

    Would you be open to try the Quirky Update?

    http://www.sqlservercentral.com/articles/T-SQL/68467/

    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: How can automate report from sqlserver to be sent on email everyday.

    I wonder why an SSRS subscription wasn't considered. Too late for that, I suppose.

    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: TSQL Formatting tool?

    Let us know if you decided for anyone.

    As Jeff, I don't like to depend on a formatting tool, but it's good to have one when dealing with code written by...

    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 - 1,861 through 1,875 (of 8,731 total)