Viewing 15 posts - 8,071 through 8,085 (of 13,469 total)
blandry (2/23/2011)
Lowell, there will NEVER be any deleted records, but I think I see what you are doing with your suggestion that way, eg, test for update that way, yes?
I...
February 23, 2011 at 9:54 am
ok, you should be able to streamline your trigger, and configure it for multiple rows as well.
see if this makes sence to you:
ALTER TRIGGER [dbo].[Update2ndTable]
ON [dbo].[Table1]
AFTER INSERT, UPDATE
AS
--if there is...
February 23, 2011 at 9:25 am
mzettler (2/23/2011)
SKYBVI (2/22/2011)
3) What is the angle between the minute hand and the hour hand of a wall clock when the time is3:40
with no...
February 23, 2011 at 8:10 am
you'd need a lot more details to get a more refined answer, but offhand, this might get you started:
SELECT
'http://tgl.test.com/plc/login/confirm.asp?'
+ 'c=' ...
February 23, 2011 at 7:24 am
there's no need;
SQL server is designed to work in sets; so the time it takes to apply a calculation against 1 row of data is about the same as 10K...
February 23, 2011 at 6:46 am
this is a fairly common requirement.....delete lots of data, but not the look up tables kind of thing.
the things to watch out for are the order of the deletes...you can't...
February 23, 2011 at 6:33 am
personally i use an integer with a check constraint limiting values to 0 and 1;you could use a BIT data type,but I like an integer to anticipate those situations where...
February 23, 2011 at 5:40 am
here's a cursor example that is based on what you posted:
DECLARE @CustNo VARCHAR(MAX)
DECLARE @SQLQUERY VARCHAR(MAX);
SET @SQLQUERY = ''
declare c1 cursor for
select
CustNo
...
February 22, 2011 at 3:30 pm
there are a number of posts by Jeff Moden to do this via BCP; he refer's to the issue as "ragged right";
here's one example he posted to address the issue...it's...
February 22, 2011 at 1:13 pm
consumable data for the next poster:
With [MY DATE](ITEM_NAME , CODE , [DATE] , OB_QTY , RECD_QTY , ISSUE_QTY, BALANCE_QTY)
AS
(
SELECT '5 PR CABLE','05','01/04/10','25','0','0','25' UNION ALL
SELECT '5 PR CABLE','05','02/04/10','0','2','0','2' UNION ALL
SELECT '5...
February 22, 2011 at 12:55 pm
you might need to explicitly define the columns:
INSERT INTO tblHistorySource(Column1,ColumnList,CreationDate)
select Column1,ColumnList, getdate()
from DELETED --the old values...new values are ijnt eht able if you need to compare them.
also, completely remove this...
February 22, 2011 at 12:47 pm
wouldn't the new to SQL2008 Change Data Capture do what you need? plenty of articles on that, when i tested it it worked really nice.
February 22, 2011 at 12:27 pm
The scripts for an index, like the scripts for a table, don't actually get saved/stored the way a procedure or function's body does;
it goes straight into the metadata, so you...
February 22, 2011 at 11:15 am
abhas (2/21/2011)
Thank u LowellBut i need avarage upon time not on date.and time is in miliseconds.So i have to find largest 90% avarage from table.How can we do?
Regards
Abhas.
details....
February 21, 2011 at 9:52 am
I've got a nice example where a replace all the Last Names of a table with one of the standard HTML colors;
I use variations of this to munge data so...
February 18, 2011 at 3:04 pm
Viewing 15 posts - 8,071 through 8,085 (of 13,469 total)