Viewing 15 posts - 4,711 through 4,725 (of 5,394 total)
Check this great article by Jeff Moden:
http://www.sqlservercentral.com/articles/T-SQL/68467/
It should do the trick for you.
Regards
Gianluca
November 18, 2009 at 3:31 am
It could be:
SELECT SomeColumn
FROM SomeTable
WHERE LEN(Name) > 1
AND LEN(Address) > 1
AND LEN(Phone) > 1
... etc
It depends on what you want to achieve. If you set those conditions in the where...
November 18, 2009 at 3:28 am
It might not be the right answer, but check your code for DDL operations inside of TRY/CATCH blocks. Even if your code runs perfectly without a transaction when it gets...
November 18, 2009 at 3:10 am
SELECT SomeColumn
FROM SomeTable
WHERE LEN(SomeColumn) > 1
November 18, 2009 at 3:00 am
Alvin Ramard (11/17/2009)
Steve Jones - Editor (11/17/2009)
That's funny. I wonder how many people will go there right away and not get it?
Probably as many as the one that wouldn't do...
November 17, 2009 at 7:10 am
Is Google down?
No, it's working. I tried google.com and google.it and it seems to work.
Dave, looks like a good thread for lmgtfy. 😀
November 17, 2009 at 1:49 am
Now that I see Gail's reply I understand that you need it in one single row.
Another way to achieve it is with PIVOT:
SELECT [Active], [Inactive], [Total] = [Active] + [Inactive]
FROM...
November 17, 2009 at 1:46 am
ROLLUP is what you're looking for:
DECLARE @TempTab TABLE (
[ID] int,
[Status] varchar(10)
)
INSERT INTO @TempTab VALUES (123, 'Active')
INSERT INTO @TempTab VALUES (234, 'Active')
INSERT INTO @TempTab VALUES (345, 'Inactive')
INSERT INTO @TempTab VALUES (567,...
November 17, 2009 at 1:38 am
No there isn't. The same applies to Crystal XI, just to be clear. The reporting engine has to know which columns will be returned by the procedure, so it makes...
November 17, 2009 at 1:10 am
Charles Kincaid (11/16/2009)
Gianluca Sartori (11/16/2009)
No, seriously, it's just a personal choice. I like languages that force...
November 17, 2009 at 1:02 am
Which is better between C# and VB.Net? ....Uhmmmm.... Java! 😀
No, seriously, it's just a personal choice. I like languages that force you to think in...
November 16, 2009 at 9:52 am
Edited: strange double post.
Anyway you have to test against your DB to decide which one is faster. It depends on your indexes and volumes, there's no single good answer. Check...
November 16, 2009 at 9:36 am
There's at least two ways to achieve it. One is the code you posted, that can be changed to match the outer query and the subquery.
The other way that comes...
November 16, 2009 at 9:36 am
You could also help him with the ADSL line if he has issues uploading the screenshot. You should be quite expert...:-P
November 16, 2009 at 1:54 am
Florian Reischl (11/12/2009)
I completely confirm Jeff! Some random values are really important to ensure some fine tests.I prefer this method:
😀
:hehe::-D:hehe::-D:hehe::-D
Thanks Flo for starting my day with a good laugh!
November 13, 2009 at 1:22 am
Viewing 15 posts - 4,711 through 4,725 (of 5,394 total)