Viewing 15 posts - 196 through 210 (of 1,217 total)
This should work better than correlated subquery:
declare @t table (No int, value int)
insert into @t
select 1,25 union
select 2,25 union
select 1,45 union
select 3,25 union
select 1,35 union
select 2,35 union
select 3,35
select tt.*
from...
June 6, 2008 at 7:05 am
It is a useful to have comments in all procedures and views, describing what it is, how it is used, and who and when has changed the definition... but that's...
June 1, 2008 at 11:32 am
Actually, Kenneth, it isn't INNER JOIN - all conditions in WHERE clause are IS NULL 😎 that means "corresponding row does not exist". It is a bit confusing because of...
May 30, 2008 at 5:40 am
I prefer to use the same syntax as for a select when deleting, instead of twisting it to WHERE EXISTS... I think this is what you were asking about originally...
May 30, 2008 at 4:52 am
Mark (5/30/2008)
Setting ansi_warnings to off will ignore the truncate error. You are better off explicitly casting/truncating yourself though.
Are you sure about that, Mark? Well, I wouldn't want to truncate myself...
May 30, 2008 at 3:49 am
Hello Carl,
ït took some time to think of a different approach, but in the end I came up with this. It is based on the idea, that if someone changed...
May 30, 2008 at 2:47 am
As far as I know, there isn't. COALESCE and ISNULL work when doing this thing on a row /like COALESCE (home_phone_no, office_phone_no)/, while aggregation is needed when you do the...
May 30, 2008 at 1:33 am
You can never write a query that will take care of everything and split names or addresses 100% correctly... so your task should be to write a query that will...
May 30, 2008 at 1:15 am
Solution depends on whether the data sample you supplied is representative. Try this and if it doesn't work as you expected, give us new sample data that will reflect all...
May 30, 2008 at 12:58 am
The same question was posted in SQLS2005 forums
http://www.sqlservercentral.com/Forums/Topic507496-338-1.aspx
and received some answers there.
Please don't cross-post. Always choose one forum where you will post your question, based on what you need to...
May 29, 2008 at 1:32 am
Sure... what's the problem? Only those columns that you name in the SELECT will be returned.
If you are asking whether you can write SELECT * FROM .... and exclude some...
May 29, 2008 at 1:11 am
The LEFT JOINs are IMHO incorrect. The way you have written the query, only those rows where ALL columns should be updated will be affected. By putting all these additional...
May 28, 2008 at 7:11 am
Nice! I didn't know that, Barry - thanks. I'm still fairly new to 2005 and have only basic knowledge of how TRY..CATCH works.
Well, this seems to be the solution to...
May 28, 2008 at 6:43 am
You can use either TOP 1 or MIN / MAX functions, but in both cases you will need to filter out duplicate rows using GROUP BY (or, in case of...
May 28, 2008 at 5:06 am
Hmmm... there are certain limitations to using TRY..Catch, and - as I understand it - nonexistent objects (tables) are one of the things that doesn't work because of deferred name...
May 28, 2008 at 2:02 am
Viewing 15 posts - 196 through 210 (of 1,217 total)