Viewing 15 posts - 5,641 through 5,655 (of 5,684 total)
Jeff Moden (9/8/2010)
IF ( (SUBSTRING(COLUMNS_UPDATED(),1,1)=power(2,(3-1))
+ power(2,(5-1)))
...
September 8, 2010 at 10:19 am
I've never seen a situation where it didn't unless the clustered indexing was changed (since you don't have an order by) or there's something strange going on with the identity...
September 7, 2010 at 5:19 pm
igngua (9/7/2010)
[IdContrato] [decimal](10, 0) NOT NULL,
[EiCanalId] [decimal](10, 0) NOT NULL,
[EiFechServ] [datetime] NOT NULL,
[EiFechMaq] [datetime] NOT NULL,
[EiFechCorr] [datetime] NOT NULL,
[EiValorFis] [decimal](25, 4) NOT NULL,
[EiValorNum] [decimal](25, 4) NOT...
September 7, 2010 at 4:41 pm
Lowell (9/7/2010)
remember the UPDATE() function and the COLUMNS_UPDATED() function just returns whether the column was actually referenced in the insert/update statement, NOT whether the column changed it's value;
If I'd...
September 7, 2010 at 4:09 pm
Msg 286, Level 16, State 1, Procedure TR_WHATEVER, Line 5
The logical tables INSERTED and DELETED cannot be updated.
Um, errr... dang, I'd have sworn I've done that before. I'm off...
September 7, 2010 at 3:53 pm
Jeff Moden (9/7/2010)
September 7, 2010 at 3:47 pm
I think you're looking for something like:
CREATE TRIGGER tr_test ON dbo.A FOR INSERT AS
UPDATE inserted
SET col1 = <value>
where col1 = 'm'
UPDATE inserted
SET col2 = <value2>
where col2 = 'n'
END
September 7, 2010 at 3:09 pm
Personally, I'd bulk insert into a staging table and then run on my insert to the real one a REPLACE( Column, ',', '') statement.
September 7, 2010 at 2:48 pm
I'm sorry, but without having the data and the database in front of me to help figure out what exactly is going on there, I'm afraid I'm at a loss....
September 7, 2010 at 12:52 pm
Try this (note the two left joins now)
SELECT
RM20101.DOCDATE AS bldat,
RM20101.POSTDATE,
RM20101.DOCNUMBR,
RM00101.CUSTNAME,
RM20101.CURNCYID,
RM20101.ORTRXAMT,
CASE WHEN RM20101.ORTRXAMT = RM20101.CURTRXAM THEN 0 ELSE RM20101.CURTRXAM END AS 'Remaining Amt',
RM20101.ORTRXAMT,
RM20101.CUSTNMBR,
SOP10106.USRTAB09...
September 7, 2010 at 12:45 pm
Well, since we only have psuedocode from you, you'll have to include our results and translate it into whatever you've got.
Basically, for the above calculations:
UPDATE
...
September 3, 2010 at 1:00 pm
This is borrowed from:
http://www.eggheadcafe.com/software/aspnet/30488923/script-which-will-shrink-all-databases.aspx
EXEC sp_MSForEachDB @Command1 = N'DBCC SHRINKDATABASE (?, 10)', @replacechar = '?'"
There's some other notes and scripts there that may be more in line with what you're...
September 3, 2010 at 12:50 pm
NJ-DBA (9/3/2010)
September 3, 2010 at 12:28 pm
Looks like you've just got nasty data issues. I would start with going after the knowns instead of the unknowns. Do a replace on ," with ,| then...
September 3, 2010 at 12:24 pm
Hey Jatrix,
Wayne will swing by I hope with his link snippet to one of the cleanest functions I've seen regarding separating delimited lists, but in your case, I think the...
September 3, 2010 at 12:15 pm
Viewing 15 posts - 5,641 through 5,655 (of 5,684 total)