-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinsertler.sql
70 lines (61 loc) · 3.42 KB
/
insertler.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
USE [mavi]
GO
/****** Object: StoredProcedure [dbo].[insertSatis] Script Date: 12/10/2015 2:03:14 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[insertSatis]
@ref varchar(100),
@perID int ,
@fiyat money,
@odemeTipi tinyint
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
insert into satis values(@ref,@perID,@fiyat,@odemeTipi,GETDATE())
END
GO
/****** Object: StoredProcedure [dbo].[insertSepet] Script Date: 12/10/2015 2:03:14 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[insertSepet]
@RefKod varchar(50),
@PerID int,
@barkod varchar(100)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
INSERT INTO [dbo].[sepet]
([refKodu]
,[personelID]
,[urunID]
,[urunFiyat]
,[adet]
,[durum]
,[tarih])
VALUES
( @RefKod,@PerID,(select urunID from urunler where barkodNo=@barkod)
,(select uFiyat from urunler where barkodNo=@barkod)
,1
,0
,GETDATE())
END
GO