Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)

  • RE: Data conversion

    create table D1 (a int,df varchar(20),)

    Note: Nothing to worry about it.

    Bcoz aftet df varchar(20) declaration , its considering as we are going to declare one more variable....

  • RE: T-SQL

    Hi Gopi,

    select * into TestTable from

    (

    select CAST(1 as smallint) as C1, CAST(6 as smallint) as C2

    union

    select CAST(2 as tinyint),CAST(6 as int)

    union

    select CAST(3 as bigint),CAST(6 as smallint)

    union

    select CAST(4 as int),CAST(6 as...

  • RE: T-SQL

    Hi Gopi,

    select * into TestTable from

    (

    select CAST(1 as smallint) as C1, CAST(6 as smallint) as C2

    union

    select CAST(2 as tinyint),CAST(6 as int)

    union

    select CAST(3 as bigint),CAST(6 as smallint)

    union

    select CAST(4 as int),CAST(6 as...

  • RE: T-SQL

    Hi Gopi,

    Fantastic answer and Explanation..

    good

    good

    select * into #D1 from (

    select '1' as c1,'A' as c2

    union

    select '','B'

    ) T

    select * from #D1

    go

    select * into #D2 from (

    select 1 as c1,'A' as c2

    union

    select...

  • RE: T-SQL

    ya i'm Agreeing this.

    First of all insert into #test values(2,'A'),(' ' ,'B') this is not there in sqlserver 2005.

    So now we can't consider data type issue.

    IF u go with...

  • RE: T-SQL

    For datatype , this doubt clarification i've posted one answered already.

    varchar accepts both number and character and without single quote number also like (1,'b') or ('1','b')

    both possible in sqlserver2005

  • RE: T-SQL

    Hi Gopi,

    i was explaing about insertion syntax,

    not about selection process. In both 2005 and 2008 will display ans for selection command for insertion command.

    bcoz sqlseerver 2005 doesn't support this syntax...

  • RE: T-SQL

    And are you sure this below code executed successfully in 2005 ?

    This is not a correct syntax in sqlserver2005 which is below given query

    insert into #test values

    ('1','A'),

    ('','B')

    correct answer:

    insert into #test...

  • RE: Data conversion

    no. it will not display. Bcoz insertion is not happening then how can display sum?

    then creating table is happening and insertion is not happening and sum is coming null in...

  • RE: Scaled-down SQL

    My answer is like this

    first part which is i 've answered:

    Declare @value1 decimal(20,10),@value2 decimal(20,3)

    SET @value1 = 1234567890.123456789

    SET @value2 = 0.1

    SELECT @value1 * @value2

    Second part is screened answer:

    DECLARE @value1...

  • RE: T-SQL

    No. My answer is first time BEGH, second time BEGH and Third time BEGH. Bcoz these two variables are varchar only. so if u pass the interger value without...

Viewing 11 posts - 1 through 11 (of 11 total)