Viewing 15 posts - 61 through 75 (of 137 total)
Jesper, query would still be the same regardless which query run first.
Remi, the issue is about joins vs subqueries. It is about utilizing "the best" query in JOINs and compare that...
July 17, 2005 at 4:33 pm
--kill all processes within a database
--- run in master db
create proc sp__killprocesses
@dbname varchar(50), -- destination database
@object varchar(50) = NULL
as
declare @spid int
declare @killsmt varchar (20)
if @object is not NULL
begin
select @object = @dbname +...
July 17, 2005 at 3:55 pm
I have created two queries on Northwind database, one using Join and the other using subquery.
QUERY A:
select customers.*
from customers
left join orders on orders.customerid = customers.customerid
where orders.customerid is NULL
QUERY...
July 14, 2005 at 9:00 pm
Remi, you always got solutions in hands. Well I'm trying to catche to you.
here you go:
http://geekswithblogs.net/johnsperfblog/archive/2005/05/26/40646.aspx
July 14, 2005 at 7:30 pm
I think it goes something like this:
use master
go
exec sp_dboption dbname, 'single user', false
go
--check point
use dbname
go
checkpoint
go
July 14, 2005 at 6:42 pm
correct it's more safer using scope_identity()
Thanks.
July 14, 2005 at 6:20 pm
I'm still very much using the where clause over joins.
The only reason is that there's still no proof that joins are faster than where clause.
July 14, 2005 at 6:12 pm
if you're creating a trigger where you compare against a text type it won't work.
Eg. where table.textfield = inserted.textfield -- this won't work!!!
Cannot do a 'straight' compare for the text,...
July 14, 2005 at 5:40 pm
Gila, you got me there!!!
Setting schemabinding will not allow you to drop the table first. Thanks for showing me that!!
I learn...
July 14, 2005 at 5:36 pm
how about something like this?
CREATE TABLE #nd_test (col int identity, nd char(3))
CREATE proc sP_nd_test (@identity int OUT)
As
insert into #nd_test (nd)
select 'hello'
set @identity = @@identity
GO
DECLARE @my_test int
exec sP_nd_test @my_test...
July 14, 2005 at 12:32 am
Gila, you're totally correct! but the table still can be dropped before the view
July 14, 2005 at 12:10 am
Yep,Both real and float can sometimes give weird decimal places.
another way is use numeric type.
July 13, 2005 at 11:07 pm
I don't know how to do it thru query.....I'm still trying though
In EM, if you right click on a database --> view-->taskpad, it shows...
July 13, 2005 at 10:28 pm
Viewing 15 posts - 61 through 75 (of 137 total)