Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)

  • RE: Derived column Replace function not working for double quotes

    Try:

    REPLACE(UPPER(NAME), '"','')

    Here's a working example:

    declare @name varchar(30)

    set @name = 'a"string"with"double"quotes'

    set @name = REPLACE(UPPER(@NAME), '"','')

    select @name

    If you have quoted_identifier set off, you can use:

    REPLACE(UPPER(NAME), """","")

    set quoted_identifier off

    declare @name varchar(30)

    set @name...

  • RE: Foreign Key ...CHECK constraint

    As I understand what you're saying, you have two databases, each with an identical foreign key constraint, which, as far as you know, are behaving identically.

    For each, you have...

  • RE: date time diff

    Let's try that again:

    create function dbo.

    DATEDIFFYMD ( @STARTDATE datetime,

    @ENDDATE ...

  • RE: date time diff

    When 50 months have passed, do you want to see:

    50 months, 04 years

    or

    02 months, 04 years

    ?

    declare @startdate datetime

    declare @enddate datetime

    set @enddate = '29-Aug-2015'

    set @startdate = '11-Apr-2010'

    -----------------------------------

    declare...

  • RE: Sorting with multiple columns using CASE

    Glad to be of help.

  • RE: Sorting with multiple columns using CASE

    As I understand it, you want to sort on two criteria, the first being defined by the procedure's parameters, and the second, always being FULLNAME asc.

    If this is the case,...

  • RE: Using composite key to update

    update

    [Sample]

    set

    ImportDate = '2010-08-29'

    where

    Code = 1

    and Rate = 4200

    and StarDate = '2004-01-01'

Viewing 7 posts - 16 through 22 (of 22 total)