Forum Replies Created

Viewing 15 posts - 1,216 through 1,230 (of 8,731 total)

  • RE: Between statement not working correctly

    Here's a possible workaround. Note that this will prevent the use of index seeks.

    CREATE TABLE #Sample(
      DecoderCode varchar(20))
    INSERT INTO #Sample
    VALUES( '4294967296'), ('8589934591'), ('7220817'),...

  • RE: Remove non-unicode characters from a column

    komal145 - Friday, June 2, 2017 11:11 AM

    How can we modifythis function to retrieve the column value ?
    SELECT [dbo].[RemoveNonUnicodeChars](Contractplan) FROm...

  • RE: Remove non-unicode characters from a column

    The problem is that you're only leaving letters and numbers instead  of all non-unicode characters.
    The following function uses several techniques such as a tally table,and using FOR XML to...

  • RE: SP output is -1

    Ron007 - Wednesday, May 31, 2017 9:37 AM

    when we get a store procedure output as -1 ?

    [/quote]

    Are you getting that output? How...

  • RE: float to date SSIS

    joanna.seldon - Wednesday, May 31, 2017 7:54 AM

    Hi

    the source is an excel document

    OrderYearMonth
    201601
    201501
    201401

    I am using then a data conversion for...

  • RE: float to date SSIS

    joanna.seldon - Wednesday, May 31, 2017 6:54 AM

    hi

    I am receiving an error with the code

    cannot use DT_DBTIMESTAMP with a...

  • RE: float to date SSIS

    The problem is that you're coding in T-SQL and SSIS uses a different language for derived columns.
    Here's a formula you can use:

    (DT_DBTIMESTAMP)((DT_WSTR,4)(OrderYearMonth / 100) +...

  • RE: Cursor removal

    jcelko212 32090 - Tuesday, May 30, 2017 8:15 PM

    >> Need help with update query<<

    you are doing the wrong thing badly. An update...

  • RE: convert year to last date of the year

    Summarizing (and correcting) the options:

    SELECT YEAR(GETDATE()) YEAR,
       CAST(DATEADD(dd, -1, DATEADD(yy, DATEDIFF(yy, -1, GETDATE()), 0)) as date) LastDayofYear,
       CONVERT(date, DATENAME(YEAR,GETDATE())+'1231'),
       DATEADD(yyyy, DATEDIFF(yyyy, 0,...

  • RE: Are the posted questions getting worse?

    Obviously, the column names were changed, but I left the length exactly the same.
    Several pork-chop airstrikes where ordered for this.
    I'm not sure if data types are subject...

  • RE: Are the posted questions getting worse?

    So, today I got this beauty for deployment. Things like these make me want to either slap or choke the developers.

    CREATE TYPE [dbo].[udtbl_ParentSomeColumnXXID_ParentSomeOtherColumnXXID_ChildSomeColumnXXID_ChildSomeOtherColumnXXID_FlipFlag] AS TABLE

  • RE: Multiple Values for Single Parameter in User Defined Function

    jcelko212 32090 - Friday, May 26, 2017 9:33 AM

    wweraw25 - Wednesday, May 24, 2017 1:57 PM

  • RE: Rowcount SSIS - Dataflow task

    Why are you even using a loop? Why don't you do it in a single execution? What changes?

  • RE: CTE and UNION performance issue

    cmartel 20772 - Thursday, May 25, 2017 9:09 AM

    This means that Q1 is now only evaluated once.

    That's correct.

  • RE: Function to Round or Truncate DateTime

    What about creating a function that would run 5 times faster?

    CREATE FUNCTION ifn_TruncateOrRoundDatetime(
      @Datetime datetime,
      @DatePart char(2),
      @Truncate bit
    )RETURNS TABLE WITH SCHEMABINDING

Viewing 15 posts - 1,216 through 1,230 (of 8,731 total)