Forum Replies Created

Viewing 15 posts - 1,516 through 1,530 (of 1,920 total)

  • RE: Transpose Columns to Rows

    Deepak, the excel was a good one.. but we need DDLs to work on man.. creating 35 column table, some 100 rows and then working on the request will take...

  • RE: Replace Function Doesn't Seem to Work

    I guess the column data-type for the column u are tryin to replace is NVarchar.. Can you please show us the REPLACE statement u tried?

  • RE: Multiple Row Into Columns

    And as our Jeff said, please go through the article in the first link of his signature line! 🙂

  • RE: Multiple Row Into Columns

    Hi there, i am slowly understading your requirement.. got a doubt here, will there be only 3 entries per person per day?

  • RE: Remove Pattern in sql query

    Nitesh, here is a function that i coded for your requirement. I have used WHILE loop which is RBAR practice. There are lot of set-based code for this, which i...

  • RE: Working With comma Separated values

    Another variant of the code. This will also perform the same

    ;WITH Master_CTE AS

    (

    SELECT

    Emp.EmpID, Emp.EmpName, Emp.Salary ,dep.DeptName

    FROM

    [Empmaster] EMP

    LEFT JOIN [EmpMapping] Map

    ON Emp.EmpId = Map.EmpId

    LEFT...

  • RE: Working With comma Separated values

    malleswarareddy_m (5/17/2010)


    I thought that want to put insert scripts but the table is available.that's why i copy & pasted.sorry for wasting your time.next time i will put complete script...

  • RE: Working With comma Separated values

    malleswarareddy_m (5/17/2010)


    But your solution is good. but for last value in column there is comma. we want to remove that comma also

    Please revisit the code i had given, i have...

  • RE: Working With comma Separated values

    You have provided the DDLs, alright, but what about the INSERT INTO scirpts for the sample data! It took me about 15 mins to format the data u had given...

  • RE: Working With comma Separated values

    Malli, this will get you there

    ;WITH CTE AS

    (

    SELECT Map.EMpId, Dep.deptName

    FROM [EmpMapping] Map

    LEFT JOIN [DeptMaster] dep

    ON Map.DeptId = dep.DeptId

    ),

    Concat_Data AS

    (

    SELECT dep1.empid, ...

  • RE: Remove Pattern in sql query

    Nitesh, another question, does your pattern always start and end with underscore ( _ ) ?

  • RE: Remove Pattern in sql query

    If '_x0020_' and '_x002f_' are going to be the only patterns that need to be replaced, then this following code with do the trick for you!

    First, check out how i...

  • RE: Remove Pattern in sql query

    Also as u are brand new to this forum, i would recommend you going through this following article 🙂

    CLICK HERE FOR FORUM POSTING ETIQUETTES - JEFF MODEN[/url]

    so please post:

    1. Table...

  • RE: Remove Pattern in sql query

    Nitesh, apart from _x002F_ and x_0020_ , are there any other pattern that might come in the string??

  • RE: Oder by a particular value

    Malavika, without seeing you data we cant actually write a positively superior code, buy judging what u want from the code u put up, this might help you

    select 0 as...

Viewing 15 posts - 1,516 through 1,530 (of 1,920 total)