Viewing 15 posts - 1,516 through 1,530 (of 1,920 total)
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
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...
May 17, 2010 at 3:33 am
Nitesh, apart from _x002F_ and x_0020_ , are there any other pattern that might come in the string??
May 17, 2010 at 3:30 am
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...
May 15, 2010 at 1:32 am
Viewing 15 posts - 1,516 through 1,530 (of 1,920 total)