Forum Replies Created

Viewing 15 posts - 61 through 75 (of 216 total)

  • RE: contains column_list as variable

    Hi ,

    you can pass variable using dynamic SQL.

    declare

    @Column_list varchar(max)

    set @Column_list = '(MM_Title, MM_Author, MM_Theme, MM_Description, MM_Publisher, MM_Source, MM_Copyright, MM_Language, MM_Location)'

    declare @search varchar(20);

    set @search='test'

    declare @sql varchar(max);

    set @sql='SELECT *

    FROM GEN_L_MM

    WHERE...

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: DDL trigger

    Nice Question .Thanks

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: SET option hierarchy

    Nice question on set options

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Rainbow Table

    Thanks for new question.First time am hearing about this.

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: How to create recursive query in SQL Server?

    using Common table expressions (CTE).

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Toatal count

    Cannot able to understand properly may be

    this query will work

    declare @username varchar(10),@fromdate datetime ,@todate datetime;

    select username,ACTION,COUNT(action) from table1

    where username=@username and datetime between @fromdate and datetime

    group by username,ACTION

    ...

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Recursive loop

    Hi,

    with cte this code will work fine.

    with cte as

    (select 1 as i

    union all

    select i+1 from cte where i<5

    )

    select 'ABC'+CAST(i as varchar) from cte

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: New Year's Eve Query

    Happy new year to all

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Group by in Stored procedure

    Hi,

    This sample may be helpfull.

    declare @Rel char(100);

    SET @Rel='surname'

    declare @sql nvarchar(2000);

    set @sql='Select Top 10 ';

    SET @sql=@sql+' CASE WHEN @Rel=''surname'' then surname ELSE given_names end'

    set @sql=@sql+' AS '+@Rel

    set @sql=@Sql+' from person

    group...

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Happy Holidays

    Happy and merry X-mass

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Output Parameter

    Hugo Kornelis (12/22/2011)


    malleswarareddy_m (12/22/2011)


    I think the above result depends on the insert statement.which ever first inserted it is showing that only.Please clarify

    me if am wrong.

    You are somewhat right and somewhat...

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Output Parameter

    Hi,

    Before answering the question. i tested with test data like

    declare @test-2 table(mm varchar(10))

    INSERT INTO @test-2 VALUES ('TEST')

    INSERT INTO @test-2 VALUES ('abc')

    INSERT INTO @test-2 VALUES ('145.87')

    INSERT INTO @test-2 VALUES ('1059.31')

    INSERT...

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Sorting triggered by data type

    Choosed third option.got it wrong. did not think about data.

    in question they did not given any sample data.

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

  • RE: Complex joins

    I got it wrong.till now id id not worked on nested joins.thanks i leanred one new point today

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)

Viewing 15 posts - 61 through 75 (of 216 total)