Viewing 15 posts - 301 through 315 (of 335 total)
why do people always want to use cursors?
Embrace relational theory:
UPDATE f
SET close_date = w.maxdate
FROM feeback f
JOIN (
select feedbackid, MAX( response_date ) AS maxdate
from responses GROUP...
October 7, 2004 at 1:29 pm
default constraints are in sysobjects type = 'D'
values for these are in syscomments where id = sysobjects id
table object id (sysobjects) is in the parent_obj column of the constraint row...
October 7, 2004 at 1:19 pm
you can use various means using
CASE ...look it up in online help
RIGHT( '000' + RTRIM( numbercolumn ) , 3 )
and/or
PATINDEX( '%[A-Z]%, numbercolumn)
(THAT IS, I don't know what possibilities...
October 6, 2004 at 2:32 pm
um, no, and I never beat my wife either.
there's nothing special about the dash (or any other character) unless it is stripped by your client process on loading. So take...
October 6, 2004 at 2:19 pm
from what you wrote, it looks like you need varchar(20) and not (10)
it truncates at the tenth char and these two would then be identical
October 6, 2004 at 2:02 pm
If you really have no options for space, and don't want to BCP the [desired] data out, truncate, and BCP back in (you know BCP supports select statements now)...
I had...
October 6, 2004 at 1:11 pm
And to do that...
you can right a proc that you run once a minute (or whatever) to look at the sysprocesses table for SPID, login_date, sid, and what ever else...
October 6, 2004 at 1:03 pm
I'm not having trouble with the norecovery option on sql2k. The upgrade process only happens when the 'with recovery' option is selected. What's the syntax you're using?
September 29, 2004 at 1:13 pm
See the sql help on OBJECTPROPERTY function.
September 28, 2004 at 3:51 pm
The first question has got to be, why do you need a cursor?
but apart from that...
why do you not just load the data from the spreadsheet into a temp or...
September 28, 2004 at 3:42 pm
If this job runs every day and needs the extra space then why do you want to shrink the DB (and force it to have to reallocate the extra space...
September 28, 2004 at 3:38 pm
The last_batch column is the date/time of the prior statement.
Probably this in conjunction with cmd = "AWAITING COMMAND" is sufficient (you don't want to kill something currently involved in a...
September 28, 2004 at 3:31 pm
it sounds like you mean that it is a two part primary key dp + num.
so then you could do exactly the same thing except with a self join
select...
FROM legal...
September 22, 2004 at 12:34 pm
yes but the temp table layout must match what the proc is going to spit out:
create proc itest
as select id, name from sysobjects
GO
--1 create temp table
select id, name into #t...
September 21, 2004 at 3:10 pm
it sounds like it is behaving as if the "NORECOVERY" option is set (meaning waiting for further tansaction logs to be applied.)
try it the old fashioned way by TSQL:
RESTORE DATABASE...
September 21, 2004 at 3:05 pm
Viewing 15 posts - 301 through 315 (of 335 total)