Viewing 15 posts - 10,801 through 10,815 (of 13,462 total)
a simple syntax error;
INSERTED is a virtual table that exists just inside the trigger...so there is no table called [TRAIN].[dbo].inserted [/b]
this should be:
SELECT @SRVSTAT = SRVSTAT,
...
July 21, 2009 at 9:05 am
Scripting this out is not all that difficult; I slapped together the examples just from the top of my head...you just have to do it one piece at a time....the...
July 21, 2009 at 8:40 am
if you can provide the actual CREATE TABLE statements for the tables in question, we could help you better;
sp_fkeys tblBOQ would give all the dependant tables to the table(is that...
July 21, 2009 at 6:46 am
yes, it will still work, you just have to follow all of the nodes of the tree:
for example, say my "Childtable" has FK records to it:
it might not be obvious,...
July 21, 2009 at 6:33 am
another way to do the same thing is to order by the length, then by the column:
select * from #temp order by len(Response),response
...well not the same thing, but similar...with the...
July 21, 2009 at 6:03 am
a much better solution is to use a set based operation; cursors are much slower.
you didn't provide any details, so here's a rough example:
by "copying", I'm assuming you mean to...
July 21, 2009 at 5:30 am
i would suggest adding a trace as well as the fine trigger example above; there's a thread here with my example of the trace i use:
http://www.sqlservercentral.com/Forums/FindPost745574.aspx
with the trace, you'd see...
July 21, 2009 at 4:38 am
with a table with no index, SQL server automatically creates a heap index, so there is at least some information on your table.
for the count, I'm guessing that although it's...
July 21, 2009 at 4:26 am
Execute as user = 'NA\TRMR'
BACKUP DATABASE [ReportServer]
TO DISK = N'C:\SQL Server - Backups\ReportServer\JUL20_1332_2009.bak'
correct me i'm wrong, but you saved this script as a stored procedure, and the stored...
July 20, 2009 at 9:22 pm
donato, are you trying to usee a CASE statement to return a desired value as a column, or as a WHERE condition?
SELECT
CASE
WHEN ITM.MNR_CD = '100' THEN '15'...
July 20, 2009 at 12:21 pm
yes; like i had said before, I'd seen the issue in the past. I could never track down exactly what was the cause, but I found that changing that default...
July 20, 2009 at 11:55 am
Jeff Moden has a great quote on changing your mindset from row by row to "set based" thinking:
First step towards the paradigm shift of writing Set Based code:
Stop thinking...
July 20, 2009 at 11:35 am
i was kind of assuming the update was more complicated...you know 500-1000 might be a different multiplier, for example. there was no good reason for it, other than to allow...
July 20, 2009 at 11:18 am
here's my WAG based on your SQL:
UPDATE CP
SET CP.BaseRate = CASE
...
July 20, 2009 at 11:05 am
your cursor does not have an update statement...the only thing it is doing is fiddling with the variable @BaseRate i think.
did you forget to add the UPDATE to teh cursor?
WHILE...
July 20, 2009 at 11:02 am
Viewing 15 posts - 10,801 through 10,815 (of 13,462 total)