Forum Replies Created

Viewing 14 posts - 301 through 315 (of 315 total)

  • RE: Find Number of Character Repeated

    karthikeyan (12/21/2007)


    Can you tell me where exactly you can apply spt_values table?

    I mean In which situations you go to spt_values.can you list out some examples ?

    Also, say for example...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: INSERT INTO OPENROWSET

    Rame... (12/26/2007)


    I have used the code like this.. but Still I recieve the Error message like this ..

    Could not process object 'SELECT * from [testing$]'. The OLE DB provider...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: Seperate Foreign Key Table column value with comma (,)

    Sarfaraj Ahmed (12/28/2007)


    Hello EveryBody

    I have 3 tables. Customer, Order, CustomerOrder

    I want to write a query where my output should be below

    Cust_ID Order_ID

    C1001 ...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: Palindrome-SQL

    Jeff Moden (12/21/2007)


    Karthik,

    This is what I spoke of on one of the other posts... it's also why people get so angry with you. You banter the "Senior Software Engineer"...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: Isnull function

    GilaMonster (12/21/2007)


    Hint

    DECLARE @Var1 INT

    SET @Var1 = NULL

    SELECT

    CASE WHEN @Var1 = NULL THEN 'Var1 = Null' ELSE 'Var1 <> NULL' END AS EqualityTest,

    CASE WHEN @Var1 <> NULL THEN...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: Palindrome-SQL

    karthikeyan (12/21/2007)


    @length/2.0 + 1

    I am not able to understand the above statement.Why are you dividing it by 2 and add with 1.

    Are you a front-end developer or back-end developer?

    What do...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: How to avoid While Loop - RBAR ?

    karthikeyan (12/21/2007)


    Now,i want to split the following string in the below format.

    Declare @Str varchar(4000)

    set @Str = 'David,karthikeyan'

    Expected Format:

    D

    D A

    D A V

    D A V I

    D A V I D

    K A R...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: How to avoid While Loop - RBAR ?

    Thanks Jeff Moden for the testing

    I usually suggest CTE to handle small set of data and to retreive hierarchical data 🙂


    Madhivanan

    Failing to plan is Planning to fail

  • RE: Convert Row values to Columns

    ravindra.gangadhar (12/17/2007)


    Hi Guys,

    I have table which retrives values and i want to convert those values to columns but the values are not fixed it may increase.

    example

    ID TEXT

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

    1...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: How to avoid While Loop - RBAR ?

    Jeff Moden (12/10/2007)


    I'll show how, you explain why...

    DECLARE @Str CHAR(6)

    SET @Str = 'ABCDEF'

    SELECT LEFT(@Str,Number)

    FROM Master.dbo.spt_Values

    WHERE Type = 'P'

    AND Number BETWEEN...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: Hidden RBAR: Triangular Joins

    Good article Jeff Moden. 🙂

    When I saw the topic I thought you must be the author (due to the word RBAR). I never see anyone using this term over any...


    Madhivanan

    Failing to plan is Planning to fail

  • RE: pivot-unpivot

    Also, If you use Front End application, you can very well handle this there


    Madhivanan

    Failing to plan is Planning to fail

  • RE: Timeout expired error

    See if this helps you

    http://vyaskn.tripod.com/watch_your_timeouts.htm


    Madhivanan

    Failing to plan is Planning to fail

  • RE: How do I do this...

    I think, no need to use isnull function

    select id

    ,  case when record1 is null then 0 else 1 end

    +  case when record2 is null then 0 else 1 end

    + ...


    Madhivanan

    Failing to plan is Planning to fail

Viewing 14 posts - 301 through 315 (of 315 total)