gamer4eva
:D
quoted him.
Printable View
gamer4eva
:D
quoted him.
Tsangpo Gorge
AMD X2 4200+ Manchester
ASUS A8N32-SLI Deluxe ATX S939 NFORCE4 SLI X16 DDR 2PCI-E16 SATA2 RAID Sound 2GBLAN 1394 Motherboard
OCZ Platinum EL PC3200 1GB 2X512MB DDR400 (@ 2-3-2-5)
Corsair HX520 CMPSU-520HX 520W ATX Triple 12V 40A Continuous 24PIN ATX Modular 120MM Power Supply
Antec Nine Hundred Mid Tower Gamer Case
Seagate Barracuda 7200.10 250GB SATA 3GB/S 7200RPM 16MB Cache Hard Drive
eVGA 6600GT PCI-E Video Card
my specs :D
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
ALTER TRIGGER UpdateDaysUpdate ON [dbo].[Order Lines]
FOR UPDATE
AS
Declare @UpDDate as datetime,
@Exists as int,
@ClientId as uniqueidentifier
Select @ClientId = ClientNumber from Inserted
select @Exists = Count (*) from [order lines] where (ClientNumber = @ClientId)
If @Exists = 0 return
If not @clientId is null
Begin
set @UpDDate = (Select Top 1 [Date] from [Order Lines] where (ClientNumber = @ClientId) Order by [Date])
End
Else
Begin
Select @UpDDate = isnull([Date],dateadd(day,-365,Convert(datetime,getdate(),103))) from Inserted
End
Select @Exists = Count(*) from Days where (Date = @UpDDate)
set @exists = isnull(@exists,0)
if @Exists = 1
Begin
Update Days set CDUpdate = 1 where ([Date] = @UpDDate ) And (CdUpdate = 0)
End
Else
Begin
Insert into Days ([Date],CdUpdate)
Values (isnull(@UpDDate,dateadd(day,-365,Convert(datetime,getdate(),103))), 1)
End
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
:ermm:
What the hell is that?
a client merge script ...to merge duplicate clients :ermm:
i love it when you get all technical
:blushing:
i love it when you blush too :wub: