Viewing 15 posts - 766 through 780 (of 819 total)
Noel McKinney (11/3/2009)
This is the main reason I make it a habit to use COALESCE rather than ISNULL unless there's a reason I need the behavior of ISNULL.
I prefer ISNULL...
November 3, 2009 at 6:07 am
From BOL:
Return Types
Returns the same type as check_expression.
In this case, a cast from varchar(12) to varchar(10)
November 3, 2009 at 1:34 am
San-847017 (10/28/2009)
I always increment identity column with default value.
I used a seed = 1 and an increment of 5 and in another table seed = 2 and an increment of...
October 29, 2009 at 2:49 am
Min-437192 (10/18/2009)
Yours is pretty cool, but what do I need to modify if I want to get rid of duplicates? 🙂
Simply add DISTINCT clause.
create table fruit(name varchar(20))
insert into...
October 18, 2009 at 11:25 am
msam77-503326 (10/15/2009)
declare @res varchar(Max)
select @res = coalesce(@res + ',', '') + [name]
from
(
select 'Apple' as...
October 17, 2009 at 9:20 am
declare @l varchar(max)
,@comma varchar(2)
set @l = ''
set @comma = ''
select @l = @l + @comma + name
,@comma = ', '
from
...
October 14, 2009 at 6:17 am
Mighty (10/1/2009)
I'm of the opinion that the answer(s) are incorrect.CUBE and ROLLUP where already available in SQL Server 2005, so they were not introduced with SQL Server 2008.
CUBE and ROLLUP...
October 1, 2009 at 7:14 am
dave.farmer (9/7/2009)
I added 10,000 rows (actually 10,001 - as below) and this time query 1...
September 7, 2009 at 6:27 am
Artur Sokhikyan (8/4/2009)
nice question-------------------------
- Name?
- Abu Dalah Sarafi.
- Sex?
- 3 times a week!
- No, no. Male or Female?
- Male, female, sometimes camel...
Strong!!!!
August 4, 2009 at 2:00 am
Lynn Pettis (7/23/2009)
There really should have been a third choice: It Depends. It really does, what data type is being converted to what data type?
For example you can't eliminate...
July 23, 2009 at 10:04 am
Not always. Converting varchar to int, may fail if some value is not numeric.
July 23, 2009 at 12:50 am
EdVassie (7/2/2009)
I have seen some poor database designs that have ignored this fact, with varchar(1), varchar(2), etc fields.
Everybody always should use the RIGHT type.
varchar(1) and char(1) are not similar nor...
July 2, 2009 at 3:51 am
I answered varchar(1), because I like to use varchar. I hate CHAR cause of big problem that can lead, and NCHAR NVARCHAR cause of waste of space.
June 5, 2009 at 9:59 am
Viewing 15 posts - 766 through 780 (of 819 total)