Forum Replies Created

Viewing 15 posts - 1,081 through 1,095 (of 8,731 total)

  • RE: Change Null value to 0 in Dynamic pivoted query

    It's possible to do it with PIVOT, but you need 2 different variables for your columns. Instead, I recommend you to use cross tabs which can give better performance. You...

  • RE: time - missing colon :

    mxy - Monday, July 24, 2017 9:40 AM

    i have received a legacy data files from vendor time values are sent without...

  • RE: Dynamic SQL Query Not Fetching Records based on where Not In condition

    This code is wildly open to SQL injection. If you don't know what I'm talking about, please google it.
    Scratch that.
    This code has no reason to be dynamic. It...

  • RE: ORDER BY with CASE in SELCT DISTINCT

    If I understand your problem correctly, you just need to remove the quotes.


    Orderby=( case @id when 1 then varieteit else stockeerder end )

  • RE: Case Statement Help

    A different option:

    SELECT
      I.ADDRESS_1
    ,CASE WHEN I.ADDRESS_1 LIKE 'PO BOX [0-9]%' AND STUFF(I.ADDRESS_1, 1, 7, '') NOT LIKE '%[^0-9]%' THEN 1

  • RE: two decimal points issue

    This would work, you just need to change the variable to use the column that you need.
    SUBSTRING( @[User::Code] , 1, FINDSTRING( @[User::Code]+"..", "." , 2) -...

  • RE: Function vs Procedure

    Jeff Moden - Friday, July 21, 2017 1:59 PM

    Luis Cazares - Friday, July 21, 2017 10:09 AM

  • RE: Extract String

    komal145 - Friday, July 21, 2017 12:21 PM

    Thanks it works.

    Do you understand why and how it works?

  • RE: Are the posted questions getting worse?

    ChrisM@Work - Friday, July 21, 2017 7:56 AM

    Brandie Tarvin - Friday, July 21, 2017 7:22 AM

    July 21, 2017 at 12:04 pm

    #1952178

  • RE: Extract String

    robin.pryor - Friday, July 21, 2017 11:42 AM

    SELECT reverse(left(reverse('\\CORP-BI-DEV-01\Temp\TIVExplorer\vzwprices-2017-06-21.json'), charindex('\', reverse('\\CORP-BI-DEV-01\Temp\TIVExplorer\vzwprices-2017-06-21.json')) -1))

    There's no need to use 2 reverse functions. This is important...

  • RE: Extract String

    komal145 - Friday, July 21, 2017 11:36 AM

    from the given string need to extract the filename:

    \\CORP-BI-DEV-01\Temp\TIVExplorer\vzwprices-2017-06-21.json

    How can i get tihis?

    With extension or...

  • RE: Function vs Procedure

    This is one of the questions I ask while interviewing people for a SQL Developer position.
    The importance of understanding the difference between a function and a stored procedure is...

  • RE: Reseed one table column

    Here's one option before going to bigint.

    DBCC CHECKIDENT ( 'YourTable', RESEED, -2147483648)

  • RE: Are the posted questions getting worse?

    Ed Wagner - Thursday, July 20, 2017 12:24 PM

    Jeff Moden - Thursday, July 20, 2017 12:09 PM

  • RE: Are the posted questions getting worse?

    Thom A - Thursday, July 20, 2017 10:02 AM

    jasona.work - Thursday, July 20, 2017 9:51 AM

    July 20, 2017 at 11:57 am

    #1951932

Viewing 15 posts - 1,081 through 1,095 (of 8,731 total)