Viewing 15 posts - 12,181 through 12,195 (of 13,465 total)
looks like we'll need more info...can you post the actual contents of the bat file?
I've used xp_commandshell lots of times, and usually, if it doesn't come back it's due to...
January 9, 2008 at 7:20 am
glad you got it working Leonard; this is one of those things that adds to the toolbox, but you don't use too often.
I made this function to try and...
January 9, 2008 at 7:14 am
I tested this just now with the same example I had posted, but with 2005; I had to enable OLE witht he surface area tool first, of course.
It works on...
January 8, 2008 at 3:51 am
similarly, there is a SET command which rollsback automatically if an error occurs, so there's no need to explicitly check for @@errors:
create proc name
as
begin
SET XACT_ABORT ON
begin tran
update .....
update......
update......
update......
commit tran
end
January 4, 2008 at 11:31 am
if you care to use SQL's built in rounding, you can simply use the convert function:
select convert(decimal(10,3),108451.4587) results in 108451.459
so simply format the column in your view as convert(decimal(10,3),columnmname)
if you...
January 4, 2008 at 11:23 am
looks like you have some holes in your logic...let me try to explain.
typically, a julian date is the number of dasy since a certain start date.
select getdate(),convert(int,getdate())
results:
DATE: 2008-01-04...
January 4, 2008 at 10:13 am
here's the easiest way i know:
hold down shift, and right click on a .sql file.
select "Open With..Choose Program" from the context menu.
browse to the right folder, which is C:\Program...
January 3, 2008 at 10:22 am
you can't set a session/connection to use a certain type of collation...it's all in the database.
we run into this occasionally, where a client will have a default collation of case...
January 2, 2008 at 10:48 am
here's an example SQL: note that the function object_name takes a second paramter, dbid, only in SQL 2005.
Create Table #tmplocks (
spid int,
dbid int,
objid int,
indid int,
type varchar(30),
Resource varchar(30),
Mode varchar(30),
Status varchar(30) )
insert...
December 27, 2007 at 11:43 am
run the stored procedure sp_lock, and pay particular attention to two columns "Type" and "Mode"
exec sp_lock
a value of X for Mode means it is exclusively locked, and it...
December 27, 2007 at 11:33 am
a scenario like you describe depends on a few assumptions that you don't mention. Do you need the values so you can insert new records? you do know that you...
December 26, 2007 at 10:56 am
with NO downtime isn't possible...you can minimize it to under a minute per database, assuming the databases are not huge terabyte sized db's. two ways i can think of, maybe...
December 9, 2007 at 8:08 pm
I'll ask a different way:
when i create a stored procedure, i only want it to get data from the database it exists in.
It is incredibly rare that i create a...
December 7, 2007 at 8:46 am
an index seek is better...an index is stored in order. so if a query tries to look for say, PROD_ID=7, it knows to use the index to SEEK the PROD_ID...
December 7, 2007 at 6:35 am
I've got two ideas to look at:
one is related to cross database chaining:
one command points to one database, and the other points to a different one ...which is correct?
set @muusid...
December 6, 2007 at 5:44 pm
Viewing 15 posts - 12,181 through 12,195 (of 13,465 total)