Viewing 15 posts - 12,211 through 12,225 (of 13,469 total)
when i reformatted your sql for readability, it was missing a couple of commas.
this works:
CREATE TABLE BATCHES_LOTS (
[BATCHNO] varchar (15),
[TRANSFERID] int,
CONSTRAINT PK_BATCHES_LOT PRIMARY KEY (BATCHNO,TRANSFERID ))
CREATE...
November 29, 2007 at 10:34 am
i googled for "oracle epoch date" and found a lot of stuff.
one of the more obvious selectiosn was where they took the datatime as a double, and subtracted it from...
November 29, 2007 at 5:32 am
Andras's example of the trigger determining what changed is perfect...but you want to send the email outside of the trigger code, and not inside it.
remember that a trigger needs to...
November 29, 2007 at 5:05 am
the case statment is for a field, I think you thought you needed to identify the table and where for each case, and that's not true:
this is syntactically correct:
DECLARE @Ind...
November 29, 2007 at 4:46 am
here's how I do it as a scheduled job; i don't need instant updates via a trigger:
--new records first
INSERT INTO ARCHIVETABLE(list_of_Columns)
SELECT list_of_Columns from ACTIVETABLE
LEFT OUTER JOIN ARCHIVETABLE ON...
November 29, 2007 at 4:40 am
SET QUERY_GOVERNOR_COST_LIMIT sets the limit for all commands in a batch, not at a connection or user level. so the limit was invoked during the life of the trigger execution,...
November 19, 2007 at 9:38 am
there's so many levels you can check, it depends on what you want to do.
For example:
--you can ping a server via a script to see if DNS works/server exists on...
November 16, 2007 at 10:01 am
the SET NOCOUNT ON command is to affect all of the subsequent commands in the batch you are running....
if you were to set it off at the end of a...
November 15, 2007 at 10:52 am
yeah a double reverse will work here; i broke it into a couple of steps to make it a bit more obvious:
declare @filename varchar(1000)
set @filename = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyFile.txt'
select...
November 14, 2007 at 11:11 am
damn that is interesting...my first instinct was that the len() function would work on a varchar(max), but it just returns 8000 if it is too big: I'll look some more.....
create...
November 14, 2007 at 10:19 am
Rama (11/14/2007)
I have a delete procedure that has to check a dependent table (t2) for records before deleting from the main table (t1). If there is records the procedure has...
November 14, 2007 at 10:04 am
if your other SQL server has a dynamic IP, and you need a real hostname for it, look at the free services at dyndns.org.
you run a service on your remote...
November 12, 2007 at 10:58 am
I also have no problem with sponsored articles...a lot of the time,regardless of the source,they have a valueable lesson or tidbit of knowledge in them.
As long as it's technical, it'd...
November 12, 2007 at 7:55 am
I have a very similar situation: we use virtual machines for testing our application. the virtual machines can connect to dozens of sql servers on our network with no problem.
...
November 12, 2007 at 6:34 am
well i found that SQL2005 has a stored proc to mark a specific object as system, instead of an on/off switch, so I'm still looking:
-- SS2k5 provides a stored procedure...
November 7, 2007 at 12:19 pm
Viewing 15 posts - 12,211 through 12,225 (of 13,469 total)