Viewing 15 posts - 1,516 through 1,530 (of 1,923 total)
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...
May 18, 2010 at 1:09 am
To learn more about the CASE syntax, please go through the following BOL link, especially the Examples part of it
😎
May 18, 2010 at 12:24 am
NewBee, replace all of your ELSE IF to WHEN.. That syntax u used is not supported..
Hope this helps you!
May 18, 2010 at 12:21 am
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...
May 17, 2010 at 11:27 pm
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?
May 17, 2010 at 8:23 pm
And as our Jeff said, please go through the article in the first link of his signature line! 🙂
May 17, 2010 at 12:28 pm
Hi there, i am slowly understading your requirement.. got a doubt here, will there be only 3 entries per person per day?
May 17, 2010 at 12:27 pm
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...
May 17, 2010 at 8:28 am
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...
May 17, 2010 at 7:11 am
malleswarareddy_m (5/17/2010)
May 17, 2010 at 7:04 am
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...
May 17, 2010 at 7:00 am
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...
May 17, 2010 at 6:50 am
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, ...
May 17, 2010 at 6:45 am
Nitesh, another question, does your pattern always start and end with underscore ( _ ) ?
May 17, 2010 at 4:50 am
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...
May 17, 2010 at 3:41 am
Viewing 15 posts - 1,516 through 1,530 (of 1,923 total)