Forum Replies Created

Viewing 15 posts - 3,106 through 3,120 (of 9,720 total)

  • RE: Compare two columns

    That is a good point, Tom. And not something even my Theatre of the Absurd code addresses.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Add a total column

    Luis Cazares (8/22/2014)


    I can't relate to the Phineas and Ferb moment. Should I watch more episodes? 😀

    ABSOLUTELY.

    Misc. Person: Aren't you boys a little young for ...

    Phineas: Why, yes. Yes we...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Add a total column

    Luis Cazares (8/22/2014)


    Are you mocking my signature? :ermm:

    I hope that it can create awareness. :hehe:

    I am not mocking the signature. I am drawing attention to something that most people might...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Running report based on current date

    You are quite welcome.

    EDIT: It occurs to me that you might want to substitute "trandate" for GETDATE().

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Compare two columns

    ChrisM@Work (8/22/2014)


    Brandie Tarvin (8/22/2014)


    ChrisM@Work (8/22/2014)


    Brandie Tarvin (8/22/2014)


    Chris,

    Why the STUFF() and the XML?

    It's concatenation of values from different rows of the same column, Brandie.

    Split up the email addresses onto different...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Running report based on current date

    rkl1v09 (8/22/2014)


    Hi Brandie,

    Due date is DATETIME and i am literally just looking for 2 months data.

    Kind Regards,

    R

    Then instead of

    WHERE DATEDIFF(MONTH,a.trans_date,a.due_date) >= 2

    Try

    WHERE a.due_date >= DATEADD(m,-2,CONVERT(DATE,GETDATE(),101))

    This gives you every date...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Compare two columns

    ChrisM@Work (8/22/2014)


    Brandie Tarvin (8/22/2014)


    Chris,

    Why the STUFF() and the XML?

    It's concatenation of values from different rows of the same column, Brandie.

    Split up the email addresses onto different rows, eliminate any...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Compare two columns

    Chris,

    Why the STUFF() and the XML?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Return records that only match set criteria in various tables

    Steve,

    Look at Chris's code carefully, because he makes a point I think you missed. OUTER JOINs don't work as OUTER JOINs when you explicity reference the columns in the WHERE...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Compare two columns

    djj (8/22/2014)


    Brandie Tarvin (8/22/2014)


    lpablo (8/22/2014)


    DECLARE @Email VARCHAR(100)

    DECLARE @Email2 VARCHAR(100)

    Set @email= 'helper@sql-server-helper.com'

    set @email2='fff@dd.com, helper@sql-server-helper.com,vc@.com'

    SELECT case when @email2 like '%'...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Running report based on current date

    Important questions. What data type is DueDate? DATE or DATETIME / SMALLDATETIME?

    If a DATETIME variety, do you need everything from midnight on or are you looking for literally 2...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Compare two columns

    Aaaannnnnddddd... From the theatre of the absurd, I couldn't get PATINDEX() to work, but I did get CHARINDEX() and REPLACE() to work. I don't know why anyone would want to...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Compare two columns

    Myke85 (8/21/2014)


    How I can get 'good'?

    DECLARE @Email VARCHAR(100)

    DECLARE @Email2 VARCHAR(100)

    Set @email= 'helper@sql-server-helper.com'

    set @email2='fff@dd.com, helper@sql-server-helper.com,vc@.com'

    SELECT case when @email like...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Compare two columns

    lpablo (8/22/2014)


    DECLARE @Email VARCHAR(100)

    DECLARE @Email2 VARCHAR(100)

    Set @email= 'helper@sql-server-helper.com'

    set @email2='fff@dd.com, helper@sql-server-helper.com,vc@.com'

    SELECT case when @email2 like '%' + @email1 +...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • RE: Add a total column

    Bah... Crosstabs...

    Luis Cazares (8/21/2014)


    Are you seriously taking the advice and code from someone from the internet without testing it?

    Why, yes. Yes I am.

    Luis Cazares (8/21/2014)


    Do you at least understand...

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 15 posts - 3,106 through 3,120 (of 9,720 total)