Viewing 15 posts - 166 through 180 (of 683 total)
Here's one way...
declare @myTable table (firstname varchar(10), lastname varchar(10), itemType varchar(10), created datetime)
insert @myTable
select 'john', 'doe', 'B', '2008-04-01'
union all select...
April 25, 2008 at 9:33 am
karthikeyan (4/25/2008)
CBAC - Context Based Access Control which is related to Network protocols.
what do you mean by TBAT ? I...
April 25, 2008 at 2:31 am
This will work for small databases in SQL 2000 (8000 characters is limiting here). Adapt to a loop for larger databases.
declare @s-2 varchar(8000) --use varchar(max) in SQL 2005
select @s-2 =...
April 24, 2008 at 9:46 am
karthikeyan (4/24/2008)
can we use master..spt_values table to avoid RBAR logic ?
I looks like CBAC logic to me.
Anyway, I've just knocked this up which should be a pretty efficient approach. It's...
April 24, 2008 at 9:40 am
select * from myTable where BatchID not in (select BatchID from myTable where Status = 'Rework')
April 24, 2008 at 4:26 am
it went in vein
Sounds painful.
Anyway, here's someone who asked the same question...
April 24, 2008 at 3:15 am
Check out this article...
http://www.sqlservercentral.com/articles/Advanced+Querying/exoticsqlnullcolumnanalysis/1442/
April 23, 2008 at 4:18 am
Or maybe even UNPIVOT, given the underlying data you seem to be describing there.
You should seriously consider storing your underlying data in a normalized structure...
April 23, 2008 at 3:55 am
I assume that's what NULLIF really is
No! Look it up...
http://msdn2.microsoft.com/en-us/library/ms177562.aspx
NULLIF (expression , expression)
Returns a null value if the two specified expressions are equal.
April 22, 2008 at 1:43 pm
Yep - it has it's limitations. I appreciate you doing the test. Many thanks 🙂
April 22, 2008 at 1:39 pm
GSquared (4/22/2008)
April 22, 2008 at 11:30 am
GSquared (4/22/2008)
On the...
April 22, 2008 at 10:29 am
Since we're discussing the various methods, here's a related excerpt from BOL:
The core of the SQL Server 2005 system catalogs is a set of views that show metadata that describes...
April 22, 2008 at 7:25 am
Ah! The 'null' records are just the totals! It's all fine... 🙂
April 21, 2008 at 10:16 am
Viewing 15 posts - 166 through 180 (of 683 total)