Forum Replies Created

Viewing 15 posts - 766 through 780 (of 1,114 total)

  • RE: Merging Rows with comma

    Adrian,

    You are correct. But i don't have the permission to create functions. Can you provide some other alternate ways ?

  • RE: Merging Rows with comma

    Hi Adrian,

    Thanks. I have modified your code.it is working perfectly.

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

    CREATE TABLE #results

    (

    empNo INT,

    accNo VARCHAR(50),

    salary VARCHAR(50)

    )

    insert into #results values(100, '1000', '10000')

    insert into #results values(100, '2000', '20000')

    insert into #results values(100,...

  • RE: NULL & Count()

    When SQL uses a variable in a where clause it uses the contents of the variable as a literal value. Not as a reference to a table/column/database/any other object.

    This is...

  • RE: Finding NULL count

    Thanks a lot Ryan ! Really it opens my eyes broadly.

    CBAC - Context Based Access Control which is related to Network protocols.

    what do you mean by TBAT ? I am...

  • RE: NULL & Count()

    It means

    select @Null = count(*) from #t1 where 'Age' is null

    Not Age as a column name, 'Age' as a string literal. Which IS NOT NULL

    why and How...

  • RE: While Loop Vs Cursor

    rbarry,

    Thanks for your prompt reply.

  • RE: While Loop Vs Cursor

    can i arrange a hot coffee for you ?

  • RE: While Loop Vs Cursor

    Jeff,

    Ok. No problem.

    As you said, He used N as a column name.Please take a look at below the code.

    SELECT TOP 11000 --thanks to Jeff Moden for this technique

    ...

  • RE: NULL & Count()

    I would like to add some more things.

    if i execute the below one, it is giving 3 as the output.

    Declare @Nm varchar(25),@Null int

    --select @Nm = 'Age'

    select @Null = count(*) from...

  • RE: NULL & Count()

    Yes.

    what will happen internally is

    Declare @Nm varchar(25)

    select @Nm = 'Age'

    select @Null = count(*) from #t1 where @Nm is null

    it means select @Null = count(*) from #t1 where Age...

  • RE: While Loop Vs Cursor

    rbarry,

    Thanks a lot.

    what do you mean by 'N Between N' ?

    I tried out it in a sample query. It is showing NULL in the first Row.Remaining rows are showing...

  • RE: Finding NULL count

    can we use master..spt_values table to avoid RBAR logic ?

  • RE: NULL & Count()

    Gila,

    it's simply going to evaluate it as a scalar value.

    what it means ?

  • RE: NULL & Count()

    Thanks Raja.

    karthikeyan (4/23/2008)

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

    Carl Federl

    select @Nm = 'Age'

    select @Null = count(*) from #t1 where (@Nm) is null

    As "where (@Nm) is null" will always be false, zero rows will meet the...

  • RE: NULL & Count()

    karthikeyan (4/23/2008)


    Carl Federl

    select @Nm = 'Age'

    select @Null = count(*) from #t1 where (@Nm) is null

    As "where (@Nm) is null" will always be false, zero rows will meet the

    restriction....

Viewing 15 posts - 766 through 780 (of 1,114 total)