Viewing 15 posts - 1,741 through 1,755 (of 1,957 total)
And one more for luck:
If you are looking to strip a local variable:
DECLARE @strVariable VARCHAR(100)
SELECT @strVariable = '| hello | world | I love sql server'
--== Only strip out...
November 18, 2010 at 5:04 pm
I would say it does not calculate it twice.
You can try it yourself by viewing the text or xml execution plan for the query- it will be obvious if it...
November 18, 2010 at 4:45 pm
Hugo Kornelis (11/18/2010)
Carlo Romagnano (11/18/2010)
Hugo Kornelis (11/17/2010)Without the reversal, the question would have been a solid test of whether people know about the dangers of using CASE in ORDER BY,...
November 18, 2010 at 2:30 am
All,
Thanks for taking the time to explain things to me - this is certainly a tricky subject and I appreciate your help.
November 18, 2010 at 2:17 am
All interesting points, which I also will have to investigate.
The only reason for not including Paul's safety check was that it was not in the Article which is where I...
November 18, 2010 at 1:06 am
Hello All,
I have been playing with the QU code in Jeff's article and discovered a couple of things....
It seems you CAN update in any order you like regardless of the...
November 17, 2010 at 6:14 pm
I don't know if I like being hashed like that! :hehe:
November 16, 2010 at 7:37 am
Hugo Kornelis (11/4/2010)
mislamuddin (11/3/2010)
If select distinct specified order by item must appear in the select list
It does. The code window has a scroll bar at the bottom; you'll find the...
November 16, 2010 at 7:27 am
Thanks to those of you who appreciate this question.
To those who think it had unnecessary "tricks" in it, I did try several variants of this question and they all ended...
November 16, 2010 at 7:22 am
Daniel Bowlin (11/16/2010)
I don't understand the implicit conversion. Why is it happening?
Hi Daniel, good question!
Microsoft http://msdn.microsoft.com/en-us/library/ms190309.aspx
When an operator combines two expressions of different data types, the rules for...
November 16, 2010 at 7:18 am
@chris-2 - but how do you select only the 3rd Salary?
November 16, 2010 at 7:05 am
;with ranked_data as
(
select name,salary,DENSE_RANK() OVER(order by salary,name,(SELECT X FROM (SELECT 1) a(a) CROSS APPLY(SELECT RAND(CHECKSUM(NEWID()))) b(X)) ) as position
from SAL
)
select *
from ranked_data
where...
November 16, 2010 at 6:44 am
hannas46 (11/14/2010)
Thanks MM!It works perfekt , but MM, i' m just a beginner writing sql-code
😉
\\ H F
I understand - and I am a beginner at graciousness - forgive my comment...
November 14, 2010 at 11:30 am
You sure you should be writing SQL? You don't want to count the varchars, but varchar the count...
WHEN COUNT(customer_id) = 0 THEN 'No customers'
ELSE CONVERT(varchar(20),COUNT(customer_id))
November 13, 2010 at 4:41 pm
Viewing 15 posts - 1,741 through 1,755 (of 1,957 total)