Viewing 15 posts - 10,336 through 10,350 (of 15,381 total)
beebkhan (10/17/2012)
October 17, 2012 at 1:37 pm
pwalter83 (10/17/2012)
robert.gerald.taylor (10/16/2012)
pwalter83 (10/16/2012)
SUM of NCV_BL.TEU where NCV_BL.POL_LOCATION_CD or NCV_BL.POD_LOCATION_CD is not present in MG_VSLVOY_SCHEDULE.PORT_CD for the SAISAN_VESSEL_CD,...
October 17, 2012 at 1:34 pm
jon.wilson (10/17/2012)
FALSE for a value...
October 17, 2012 at 12:47 pm
dallas13 (10/17/2012)
SELECT @lClub_group_joined_test = club_group_id
FROM dba.t_club_group
WHERE acct_id = @iAcctid
UPDATE #temp_ticket ...
October 17, 2012 at 12:32 pm
Why are you inserting the data again to the same table? You have effectively created an endless loop. There is no need to insert the data to the same table...
October 17, 2012 at 12:30 pm
briancampbellmcad (10/17/2012)
trigger is on) to identify what rows were affected by the insert"
I'm...
October 17, 2012 at 9:13 am
Jeff Moden (10/16/2012)
October 17, 2012 at 8:20 am
jasona.work (10/17/2012)
Brandie Tarvin (10/17/2012)
dwain.c (10/16/2012)
Jeff Moden (10/16/2012)
... and he couldn't name the function to get the current date and time
Perhaps he was so focused on the future he's never interested...
October 17, 2012 at 8:19 am
Can you provide some sample data (insert statements) and an explanation of what you want the trigger to do?
October 17, 2012 at 7:48 am
briancampbellmcad (10/17/2012)
I'm thinking an "IF" condition on transaction_type may be a step in the right direction (?):
USE [TrackIT]
GO
CREATE TRIGGER [dbo].[trDecrementBulkPurchases]
ON [dbo].[tblTransactions]
AFTER INSERT
AS
BEGIN
IF Transaction_Type = 'From...
October 17, 2012 at 7:08 am
Temp tables are created in tempdb. That is how it works. Easy enough to demonstrate.
create table #MyTable ( ID int )
select * from tempdb.sys.objects
where name like '#MyTable%'
drop table #MyTable
October 16, 2012 at 1:29 pm
Did you read my post? You need to refer to the INSERTED table which in your code you still don't. The way you have it coded is that it will...
October 16, 2012 at 11:34 am
Check out this article from Phil Factor. http://www.simple-talk.com/sql/t-sql-programming/temporary-tables-in-sql-server/%5B/url%5D
October 16, 2012 at 10:53 am
Actually that probably would not get items that are not yet returned. You probably need something like this to accommodate a NULL in Date_in.
select * from #mytable
where Date_out <= @TargetDate...
October 16, 2012 at 10:32 am
Thanks for the ddl and sample data.
Something like this?
declare @TargetDate datetime = dateadd(dd, datediff(dd, 0, getdate()) - 2, 0) --this will get a date 2 days ago
select @TargetDate
select * from...
October 16, 2012 at 10:28 am
Viewing 15 posts - 10,336 through 10,350 (of 15,381 total)