Viewing 15 posts - 256 through 270 (of 761 total)
Have you tried something like this??
Update a Set a.Value = b.Value From @temp2 As a
JOIN @temp1 As b ON a.Member = b.Member
June 19, 2012 at 11:47 pm
Thank you very much Dwain. I got to understand almost all of it. But the only thing I don't understand is that I can get the results using the following...
June 19, 2012 at 11:43 pm
drew.allen (6/19/2012)
vinu512 (6/19/2012)
Can you post a link where there is a good explanation on the STUFF Function, the way it is being used here??
The BOL entry for STUFF (Transact-SQL) gives...
June 19, 2012 at 10:05 pm
Olalekan Adewale (6/19/2012)
Thanks all..Cadavre , vinu512 ,dwain.c, Ravi Kumar-191606
.. you all are wonderful .. God bless.
You'r Welcome 🙂
June 19, 2012 at 10:03 pm
dwain.c (6/19/2012)
DECLARE @t TABLE (mystring VARCHAR(100))
INSERT INTO @t
SELECT '100034/com.ccs.ccscontact'
UNION ALL SELECT '1003/com.ccs.ccscontact'
UNION ALL SELECT '100/com.ccs.ccscontact'
UNION ALL SELECT '20005/com.ccs.ccscontact'
SELECT SUBSTRING(mystring, 1, PATINDEX('%[^0-9]%', mystring)-1)
FROM @t
Just guessing...
June 19, 2012 at 5:05 am
dwain.c (6/19/2012)
Easy, peasy![/code]
Lol Dwain.....:-D:-D:-D
June 19, 2012 at 5:04 am
erics44 (6/19/2012)
🙂very helpful thanks
i assume you dont understand?
Wow!!!....You're smart. That was a simple question to understand the Logic.
June 19, 2012 at 3:49 am
You can use ParseName as follows as well:
Select PARSENAME(REPLACE(Column1, '/', '.'), 4) From TableName
June 19, 2012 at 3:40 am
erics44 (6/19/2012)
I have a table with 2 ids in it
here is an example
ID FromID
1 0
2 1
3 0
4 ...
June 19, 2012 at 3:34 am
IgorMi (6/19/2012)
Hi,If I were you, I would create the new table with identity key + the same structure of the table you're migrating.
Regards
IgorMi
+1.
Only creating an Identity Column in the new...
June 19, 2012 at 3:23 am
440692 I am just a number (6/19/2012)
Depending on how you generate the values for the @EmpID, it may be worth looking at declaring it as a table and populating it...
June 19, 2012 at 3:12 am
dwain.c (6/19/2012)
vinu512 (6/19/2012)
Hi Dwain,
Can you post a link where there is a good explanation on the STUFF Function, the way it is being used here??
I see it all the time,...
June 19, 2012 at 3:08 am
It could be done as follows:
;With CTE
As
(Select a.emp_code, a.old_emp_code, a.emp_name, b.emp_amount,
ROW_NUMBER() Over (Partition By a.emp_code Order by (Select NULL) ) As rn
From @team As a
Left JOIN...
June 19, 2012 at 3:04 am
What is the DataType of @EmpId?? Is it Varchar??
June 19, 2012 at 12:32 am
dwain.c (6/18/2012)
Jeff Moden (6/18/2012)
krishusavalia (6/18/2012)
Thanks , That's what I was looking for.
Great. The next questions would be 1) Do you actually understand how it works so you can support...
June 19, 2012 at 12:27 am
Viewing 15 posts - 256 through 270 (of 761 total)