Forum Replies Created

Viewing 12 posts - 1,036 through 1,047 (of 1,047 total)

  • RE: UPDATE Does Nothing (Executing Query displays in status)


    It should be

    UPDATE table_name

    SET RefreshDate = '20120822 08:00';

    rather than

    UPDATE cjs

    SET RefreshDate = '20120822 08:00';

    else it will throw error



    I run the similar query and I didnt get the any error.

    create procedure abc as

    select,y.name1 from name1 x

    inner join Practice.dbo.name1 y ON

    Command executed successfully

    EXEC abc

    Result- it returns the...

  • RE: Spiltting columns in sql 2008

    Hi vivek,

    SELECT SUBSTRING(ageatdeath,0,CHARINDEX('Y',ageatdeath,0)) AS AGE_VAL,

    SUBSTRING(ageatdeath,CHARINDEX('Y',ageatdeath,0),LEN(ageatdeath)) AS AGE_UNIT

    this code also works fine.

  • RE: DECLARE - 1

    You haven't specify the length of datatype in "DECLARE @myVariable AS varchar" that's why it is giving 1 as output.

  • RE: DECLARE - 1

    how Casting or converting a string literal behaves returning 30 characters.

    this is the only thing on which am stuck..

    plz explain

  • RE: DECLARE - 1

    How in case of

    LEN(CONVERT(VARCHAR,@a)) AS 'Converted'

    , LEN(CAST(@a AS VARCHAR)) AS 'Cast'

    It is returning 30?

    Can you plz exlpain.

  • RE: DECLARE - 1

    declare @a varchar(5)='56767'

    select LEN(@a)

    It will result into 56767.

    DECLARE @a VARCHAR ='xyz'


    LEN(@a) AS 'Declared'

    , LEN(CONVERT(VARCHAR,'xyz')) AS 'Converted'

    , LEN(CAST('xyz' AS VARCHAR))...

  • RE: DECLARE - 1

    thanks Kingston..

  • RE: DECLARE - 1

    can anyone explain me why select len(@a) as 'declared' gives output as 1

  • RE: Days Difference Between 2 Dates

    I have a table CityMaster, LocationMaster and Location table from another database. In LocationMaster CityID (int) is stored while in Citymaster (CityID, CityName, StateID) fields are stored, in Location CityName...

  • RE: Days Difference Between 2 Dates


  • RE: Days Difference Between 2 Dates

    DECLARE @Date1 DATETIME = '2012-08-28 11:53:00'

    select cast(@Date1 AS int)

    It gives the result 41147. Can anyone tell me how this conversion is done.

Viewing 12 posts - 1,036 through 1,047 (of 1,047 total)