Forum Replies Created

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

  • RE: Transpose Columns to Rows

    Deepak, let me tell u this, this was one of the longest ask i had worked on :-D, not cos' of the code, but for importing data into my machine!

    Here...

  • RE: incorrect syntax near 'if'

    To learn more about the CASE syntax, please go through the following BOL link, especially the Examples part of it

    CASE (Transact-SQL)

    😎

  • RE: incorrect syntax near 'if'

    NewBee, replace all of your ELSE IF to WHEN.. That syntax u used is not supported..

    Hope this helps you!

  • 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...

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