Forum Replies Created

Viewing 15 posts - 196 through 210 (of 1,468 total)

  • Reply To: Can someone explain quirkiness of DateTimeOffset query?

    You can also use the AT TIME ZONE functionality for the test

    /*
    Queries tested on SQL Server 2012 with default timezone of Eastern Standard Time.
    */

    DECLARE @ComparisonDateAsDTO datetimeoffset(7) =...
  • Reply To: List 4 row into 4 column with same ID

    This is easily achieved with a cross-tab query

    CREATE TABLE #Animal (ID int, Animal varchar(20), Number int, [Year] int);

    INSERT INTO #Animal ( ID, Animal, Number, [Year] )
    VALUES (...
  • Reply To: SQL Query Required

    This is very easy to achieve using the LAG function

  • Reply To: Storing large LOB data

    Depending on the actual data in the xml as well as the xml structure of the various records, you find storage improvements by storing the xml as [n]varchar(max).

  • Reply To: Update table based on Rownumber

    You have not provided any usable data or a base query to be able to test against.

    The following code should get you moving in the right direction

    WITH...
  • Reply To: SSRS Query - Allow user to specify size

    2Tall wrote:

    Hi. Thanks for the response.

    "On a side note, you declare @Size as bigint."

    I am showing my lack of understanding 🙂

    What would you suggest?

     

    When assigning values to a string data...

    • This reply was modified 4 years, 4 months ago by DesNorton. Reason: Fixed copy/paste error (Thanks kaj)
  • Reply To: Extract Characters after symbol from the end

    The following code should do the trick

    SUBSTRING(part, LEN(part) - CHARINDEX('-', REVERSE(part)) -1, 2)
  • Viewing 15 posts - 196 through 210 (of 1,468 total)