السلام عليكم
لدى جدولين بنفس الحقول table1 table2
اريد اى عملية تتم فى الجدول رقم 1 يحدث تحديث فى الجدول رقم 2 اى بمعنى انهم يكونو نسخة من بعض
السلام عليكم
لدى جدولين بنفس الحقول table1 table2
اريد اى عملية تتم فى الجدول رقم 1 يحدث تحديث فى الجدول رقم 2 اى بمعنى انهم يكونو نسخة من بعض
Adel Khayata كتب:السلام عليكم.
يمكنك استخدام ال Triggers لعمليات الادخال و التعديل و الحذف.
هذا مثال ل Trigger عند إجراء إدخال على الجدول table1:
ON table1
AFTER INSERT
AS
INSERT INTO table2 (field1,field2)
VALUES (inserted.field1,inserted.field2)
GOCREATE TRIGGER Duplicate
شكرا لك اخى تم تنفيذ الكود
CREATE TRIGGER Duplicate ON [dbo].[AVANTI$Trans_ Sales Entry] AFTER INSERT AS INSERT INTO [dbo].[AVANTI$Trans_ Sales Entry1]([Transaction No_],[Line No_],[Item Department] ,[Receipt No_],[Barcode No_],[Item No_],[Sales Staff], [Item Group],[Price],[Net Price] ,[Quantity] ,[VAT Code] ,[Transaction Status],[Discount Amount] ,[Cost Amount],[Date],[Time],[Shift No_] ,[Shift Date] ,[Net Amount] ,[VAT Amount] ,[Offer No_] ,[Standard Net Price],[Disc_ Amount From Std_ Price],[Statement No_],[Customer No_] ,[Section] ,[Shelf],[Statement Code],[Item Disc_ Group],[Transaction Code] ,[Store No_],[Item Number Scanned],[Keyboard Item Entry],[Price in Barcode] ,[Price Change] ,[Weight Manually Entered] ,[Line was Discounted] ,[Scale Item] ,[Weight Item],[Return No Sale],[Item Corrected Line] ,[Type of Sale] ,[Linked No_ not Orig_] ,[Orig_ of a Linked Item List] ,[POS Terminal No_] ,[Staff ID],[Item Posting Group],[Line Discount] ,[Replicated],[Customer Discount],[Infocode Discount],[Cust_ Invoice Discount] ,Unit of Measure] ,[UOM Quantity],[UOM Price] ,[Total Discount] ,[Total Disc_%],[Tot_ Disc Info Line No_],[Periodic Disc_ Type] ,[Periodic Disc_ Group] ,[Periodic Discount] ,[Discount Amt_ For Printing] ,[Brand],[Gender],[Vendor],[Class (collection)],[Size Code],[TransactionNo],[Cost Total],[Remarks]) VALUES (inserted.[Transaction No_],[Line No_],[Item Department] ,[Receipt No_],[Barcode No_],[Item No_],[Sales Staff], [Item Group],[Price],[Net Price] ,[Quantity] ,[VAT Code] ,[Transaction Status],[Discount Amount] ,[Cost Amount],[Date],[Time],[Shift No_] ,[Shift Date] ,[Net Amount] ,[VAT Amount] ,[Offer No_] ,[Standard Net Price],[Disc_ Amount From Std_ Price],[Statement No_],[Customer No_] ,[Section] ,[Shelf],[Statement Code],[Item Disc_ Group],[Transaction Code] ,[Store No_],[Item Number Scanned],[Keyboard Item Entry],[Price in Barcode] ,[Price Change] ,[Weight Manually Entered] ,[Line was Discounted] ,[Scale Item] ,[Weight Item],[Return No Sale],[Item Corrected Line] ,[Type of Sale] ,[Linked No_ not Orig_] ,[Orig_ of a Linked Item List] ,[POS Terminal No_] ,[Staff ID],[Item Posting Group],[Line Discount] ,[Replicated],[Customer Discount],[Infocode Discount],[Cust_ Invoice Discount] ,Unit of Measure] ,[UOM Quantity],[UOM Price] ,[Total Discount] ,[Total Disc_%],[Tot_ Disc Info Line No_],[Periodic Disc_ Type] ,[Periodic Disc_ Group] ,[Periodic Discount] ,[Discount Amt_ For Printing] ,[Brand],[Gender],[Vendor],[Class (collection)],[Size Code],[TransactionNo],[Cost Total],[Remarks]) GO
لكن تظهر رسالة خطا
Msg 156, Level 15, State 1, Procedure Duplicate, Line 5
Incorrect syntax near the keyword 'of'.
كل اسماء الحقول مظبوطة لكن فى ملاحظة يوجد احد الحقول يختلف نوعه عن نظيرة فى الجدول الاخر ؟ هل هذا يوثر
Adel Khayata كتب:بعد مراجعة التعليمة التي كتبتها , ظهر لي أن الحقل: Unit of Measure ينقصه القوس المتوسط ] على الطرف اليسار في سطر Insert و في سطر Values
بالنسبة لاختلاف أنواع الحقول: ففي بعض الحالات يمكن أن لايؤثر و في الأخرى يؤثر ... ماهو نوع الحقل في الحالتين ؟
Msg 128, Level 15, State 1, Procedure Duplicate, Line 6
The name "inserted.Transaction No_" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
CREATE TRIGGER Duplicate ON [dbo].[AVANTI$Trans_ Sales Entry] AFTER INSERT AS INSERT INTO [dbo].[AVANTI$Trans_ Sales Entry1](inserted.[Transaction No_],[Line No_],[Item Department] ,[Receipt No_],[Barcode No_],[Item No_],[Sales Staff], [Item Group],[Price],[Net Price] ,[Quantity] ,[VAT Code] ,[Transaction Status],[Discount Amount] ,[Cost Amount],[Date],[Time],[Shift No_] ,[Shift Date] ,[Net Amount] ,[VAT Amount] ,[Offer No_] ,[Standard Net Price],[Disc_ Amount From Std_ Price],[Statement No_],[Customer No_] ,[Section] ,[Shelf],[Statement Code],[Item Disc_ Group],[Transaction Code] ,[Store No_],[Item Number Scanned],[Keyboard Item Entry],[Price in Barcode] ,[Price Change] ,[Weight Manually Entered] ,[Line was Discounted] ,[Scale Item] ,[Weight Item],[Return No Sale],[Item Corrected Line] ,[Type of Sale] ,[Linked No_ not Orig_] ,[Orig_ of a Linked Item List] ,[POS Terminal No_] ,[Staff ID],[Item Posting Group],[Line Discount] ,[Replicated],[Customer Discount],[Infocode Discount],[Cust_ Invoice Discount] ,[Unit of Measure] ,[UOM Quantity],[UOM Price] ,[Total Discount] ,[Total Disc_%],[Tot_ Disc Info Line No_],[Periodic Disc_ Type] ,[Periodic Disc_ Group] ,[Periodic Discount] ,[Discount Amt_ For Printing] ,[Brand],[Gender],[Vendor],[Class (collection)],[Size Code],[TransactionNo],[Cost Total],[Remarks]) VALUES(inserted.[Transaction No_],[Line No_],[Item Department] ,[Receipt No_],[Barcode No_],[Item No_],[Sales Staff], [Item Group],[Price],[Net Price] ,[Quantity] ,[VAT Code] ,[Transaction Status],[Discount Amount] ,[Cost Amount],[Date],[Time],[Shift No_] ,[Shift Date] ,[Net Amount] ,[VAT Amount] ,[Offer No_] ,[Standard Net Price],[Disc_ Amount From Std_ Price],[Statement No_],[Customer No_] ,[Section] ,[Shelf],[Statement Code],[Item Disc_ Group],[Transaction Code] ,[Store No_],[Item Number Scanned],[Keyboard Item Entry],[Price in Barcode] ,[Price Change] ,[Weight Manually Entered] ,[Line was Discounted] ,[Scale Item] ,[Weight Item],[Return No Sale],[Item Corrected Line] ,[Type of Sale] ,[Linked No_ not Orig_] ,[Orig_ of a Linked Item List] ,[POS Terminal No_] ,[Staff ID],[Item Posting Group],[Line Discount] ,[Replicated],[Customer Discount],[Infocode Discount],[Cust_ Invoice Discount] ,[Unit of Measure] ,[UOM Quantity],[UOM Price] ,[Total Discount] ,[Total Disc_%],[Tot_ Disc Info Line No_],[Periodic Disc_ Type] ,[Periodic Disc_ Group] ,[Periodic Discount] ,[Discount Amt_ For Printing] ,[Brand],[Gender],[Vendor],[Class (collection)],[Size Code],[TransactionNo],[Cost Total],[Remarks]) GO
USE [nav_report] GO /****** Object: Table [dbo].[AVANTI$Trans_ Sales Entry] Script Date: 04/11/2011 15:17:42 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[AVANTI$Trans_ Sales Entry]( [timestamp] [timestamp] NOT NULL, [Transaction No_] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Line No_] [int] NOT NULL, [Receipt No_] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Barcode No_] [varchar](22) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Item No_] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Sales Staff] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Item Department] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Item Group] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Price] [decimal](38, 20) NOT NULL, [Net Price] [decimal](38, 20) NOT NULL, [Quantity] [decimal](38, 20) NOT NULL, [VAT Code] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Transaction Status] [int] NOT NULL, [Discount Amount] [decimal](38, 20) NOT NULL, [Cost Amount] [decimal](38, 20) NOT NULL, [Date] [datetime] NOT NULL, [Time] [datetime] NOT NULL, [Shift No_] [varchar](1) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Shift Date] [datetime] NOT NULL, [Net Amount] [decimal](38, 20) NOT NULL, [VAT Amount] [decimal](38, 20) NOT NULL, [Offer No_] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Standard Net Price] [decimal](38, 20) NOT NULL, [Disc_ Amount From Std_ Price] [decimal](38, 20) NOT NULL, [Statement No_] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Customer No_] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Section] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Shelf] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Statement Code] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Item Disc_ Group] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Transaction Code] [int] NOT NULL, [Store No_] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Item Number Scanned] [tinyint] NOT NULL, [Keyboard Item Entry] [tinyint] NOT NULL, [Price in Barcode] [tinyint] NOT NULL, [Price Change] [tinyint] NOT NULL, [Weight Manually Entered] [tinyint] NOT NULL, [Line was Discounted] [tinyint] NOT NULL, [Scale Item] [tinyint] NOT NULL, [Weight Item] [tinyint] NOT NULL, [Return No Sale] [tinyint] NOT NULL, [Item Corrected Line] [tinyint] NOT NULL, [Type of Sale] [int] NOT NULL, [Linked No_ not Orig_] [tinyint] NOT NULL, [Orig_ of a Linked Item List] [tinyint] NOT NULL, [POS Terminal No_] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Staff ID] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Item Posting Group] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Total Rounded Amt_] [decimal](38, 20) NOT NULL, [Counter] [decimal](38, 20) NOT NULL, [Variant Code] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Line Discount] [decimal](38, 20) NOT NULL, [Replicated] [tinyint] NOT NULL, [Customer Discount] [decimal](38, 20) NOT NULL, [Infocode Discount] [decimal](38, 20) NOT NULL, [Cust_ Invoice Discount] [decimal](38, 20) NOT NULL, [Unit of Measure] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [UOM Quantity] [decimal](38, 20) NOT NULL, [UOM Price] [decimal](38, 20) NOT NULL, [Total Discount] [decimal](38, 20) NOT NULL, [Total Disc_%] [decimal](38, 20) NOT NULL, [Tot_ Disc Info Line No_] [int] NOT NULL, [Periodic Disc_ Type] [int] NOT NULL, [Periodic Disc_ Group] [varchar](10) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Periodic Discount] [decimal](38, 20) NOT NULL, [Discount Amt_ For Printing] [decimal](38, 20) NOT NULL, [Brand] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Gender] [int] NOT NULL, [Vendor] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Class (collection)] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [Size Code] [varchar](20) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, [TransactionNo] [int] NOT NULL, [Cost Total] [decimal](38, 20) NOT NULL, [Remarks] [varchar](30) COLLATE SQL_Latin1_General_CP1256_CI_AS NOT NULL, CONSTRAINT [AVANTI$Trans_ Sales Entry$0] PRIMARY KEY CLUSTERED ( [Transaction No_] ASC, [Line No_] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [Data Filegroup 1] ) ON [Data Filegroup 1] GO SET ANSI_PADDING OFF
هذا الكود يعمل على جهازي:
CREATE TRIGGER Duplicate
ON [dbo].[AVANTI$Trans_ Sales Entry]
AFTER INSERT
AS
INSERT INTO dbo.[AVANTI$Trans_ Sales Entry1]
( [Transaction No_] ,
[Line No_] ,
[Receipt No_] ,
[Barcode No_] ,
[Item No_] ,
[Sales Staff] ,
[Item Department] ,
[Item Group] ,
Price ,
[Net Price] ,
Quantity ,
[VAT Code] ,
[Transaction Status] ,
[Discount Amount] ,
[Cost Amount] ,
Date ,
Time ,
[Shift No_] ,
[Shift Date] ,
[Net Amount] ,
[VAT Amount] ,
[Offer No_] ,
[Standard Net Price] ,
[Disc_ Amount From Std_ Price] ,
[Statement No_] ,
[Customer No_] ,
Section ,
Shelf ,
[Statement Code] ,
[Item Disc_ Group] ,
[Transaction Code] ,
[Store No_] ,
[Item Number Scanned] ,
[Keyboard Item Entry] ,
[Price in Barcode] ,
[Price Change] ,
[Weight Manually Entered] ,
[Line was Discounted] ,
[Scale Item] ,
[Weight Item] ,
[Return No Sale] ,
[Item Corrected Line] ,
[Type of Sale] ,
[Linked No_ not Orig_] ,
[Orig_ of a Linked Item List] ,
[POS Terminal No_] ,
[Staff ID] ,
[Item Posting Group] ,
[Total Rounded Amt_] ,
Counter ,
[Variant Code] ,
[Line Discount] ,
Replicated ,
[Customer Discount] ,
[Infocode Discount] ,
[Cust_ Invoice Discount] ,
[Unit of Measure] ,
[UOM Quantity] ,
[UOM Price] ,
[Total Discount] ,
[Total Disc_%] ,
[Tot_ Disc Info Line No_] ,
[Periodic Disc_ Type] ,
[Periodic Disc_ Group] ,
[Periodic Discount] ,
[Discount Amt_ For Printing] ,
Brand ,
Gender ,
Vendor ,
[Class (collection)] ,
[Size Code] ,
TransactionNo ,
[Cost Total] ,
Remarks
)
SELECT [Transaction No_] ,
[Line No_] ,
[Receipt No_] ,
[Barcode No_] ,
[Item No_] ,
[Sales Staff] ,
[Item Department] ,
[Item Group] ,
Price ,
[Net Price] ,
Quantity ,
[VAT Code] ,
[Transaction Status] ,
[Discount Amount] ,
[Cost Amount] ,
Date ,
Time ,
[Shift No_] ,
[Shift Date] ,
[Net Amount] ,
[VAT Amount] ,
[Offer No_] ,
[Standard Net Price] ,
[Disc_ Amount From Std_ Price] ,
[Statement No_] ,
[Customer No_] ,
Section ,
Shelf ,
[Statement Code] ,
[Item Disc_ Group] ,
[Transaction Code] ,
[Store No_] ,
[Item Number Scanned] ,
[Keyboard Item Entry] ,
[Price in Barcode] ,
[Price Change] ,
[Weight Manually Entered] ,
[Line was Discounted] ,
[Scale Item] ,
[Weight Item] ,
[Return No Sale] ,
[Item Corrected Line] ,
[Type of Sale] ,
[Linked No_ not Orig_] ,
[Orig_ of a Linked Item List] ,
[POS Terminal No_] ,
[Staff ID] ,
[Item Posting Group] ,
[Total Rounded Amt_] ,
Counter ,
[Variant Code] ,
[Line Discount] ,
Replicated ,
[Customer Discount] ,
[Infocode Discount] ,
[Cust_ Invoice Discount] ,
[Unit of Measure] ,
[UOM Quantity] ,
[UOM Price] ,
[Total Discount] ,
[Total Disc_%] ,
[Tot_ Disc Info Line No_] ,
[Periodic Disc_ Type] ,
[Periodic Disc_ Group] ,
[Periodic Discount] ,
[Discount Amt_ For Printing] ,
Brand ,
Gender ,
Vendor ,
[Class (collection)] ,
[Size Code] ,
TransactionNo ,
[Cost Total] ,
Remarks
FROM INSERTED
GOملاحظة: يتم تنفيذ الكود في ال trigger في حالة After بعد أن يكون قد تم تنفيذ عملية ال Insert على الجدول الأول و بالتالي إذا حدث أي خطأ خلال تنفيذ تعليمة ال Insert الموجودة في ال Trigger فهذا سيؤدي إلى وجود السجل المدخل في الجدول الأول و ليس الثاني و يمكنك استبدال After ب Instead of من أجل معالجة البيانات عند لحظة الادخال.
هذا الحل يشمل فقط عملية الادخال, إذا أردت معالجة عمليات تحديث البيانات أو الحذف فيجب استبدال كلمة Insert ب Update أو Delete و أنصحك بالرجوع إلى الرابط التالي من أجل تفاصيل أكثر:
اخى العزيز انا اشكرك جدا واقدر مجهودك وتعبك معايا وجزاك الله كل خير ..
الفايدة من الجدول الاخر نانا بعمل دمج بين جدولين وفى قيم مختلفة نوعها فى فى الجدول الثانى غيرت النوع علشان تنفع وكان لابد انها تاخذ نفس بيانات الجدول الاول
انا نفذت الكود وقام بانشاء التايجر لكن لايوجد اى بيانات ... انا عايز لما يدخل اى بيانات فى الجدول الاول تتحدث فى الجدول الثانى
Adel Khayata كتب:بعد إنشاء ال Trigger, هل قمت بإدخال بيانات إلى الجدول الأول ؟ و هل ظهرت في الجدول الأول ؟ و هل ظهرت في الجدول الثاني؟
هل من الممكن أن تضع تعليمة Insert التي استخدمتها عند إدخال البيانات إلى الجدول الأول؟
الجدول الاول بالفعل يوجد فيه بيانات وتظهر فية كافة البيانات
تم تعديل هذه المشاركة بواسطة elbry1907 في 11 أبريل 2011 في 16:33
هذه التعليمة لن تقوم بأثر رجعي بحيث تنسخ البيانات التي كانت موجودة مسبقاً في الجدول الأول.
إذا أردت عمل ذلك استخدم التعليمة التالية مرة واحدة لجعل سجلات الجدولين متطابقة.
INSERT INTO dbo.[AVANTI$Trans_ Sales Entry1]
( [Transaction No_] ,
[Line No_] ,
[Receipt No_] ,
[Barcode No_] ,
[Item No_] ,
[Sales Staff] ,
[Item Department] ,
[Item Group] ,
Price ,
[Net Price] ,
Quantity ,
[VAT Code] ,
[Transaction Status] ,
[Discount Amount] ,
[Cost Amount] ,
Date ,
Time ,
[Shift No_] ,
[Shift Date] ,
[Net Amount] ,
[VAT Amount] ,
[Offer No_] ,
[Standard Net Price] ,
[Disc_ Amount From Std_ Price] ,
[Statement No_] ,
[Customer No_] ,
Section ,
Shelf ,
[Statement Code] ,
[Item Disc_ Group] ,
[Transaction Code] ,
[Store No_] ,
[Item Number Scanned] ,
[Keyboard Item Entry] ,
[Price in Barcode] ,
[Price Change] ,
[Weight Manually Entered] ,
[Line was Discounted] ,
[Scale Item] ,
[Weight Item] ,
[Return No Sale] ,
[Item Corrected Line] ,
[Type of Sale] ,
[Linked No_ not Orig_] ,
[Orig_ of a Linked Item List] ,
[POS Terminal No_] ,
[Staff ID] ,
[Item Posting Group] ,
[Total Rounded Amt_] ,
Counter ,
[Variant Code] ,
[Line Discount] ,
Replicated ,
[Customer Discount] ,
[Infocode Discount] ,
[Cust_ Invoice Discount] ,
[Unit of Measure] ,
[UOM Quantity] ,
[UOM Price] ,
[Total Discount] ,
[Total Disc_%] ,
[Tot_ Disc Info Line No_] ,
[Periodic Disc_ Type] ,
[Periodic Disc_ Group] ,
[Periodic Discount] ,
[Discount Amt_ For Printing] ,
Brand ,
Gender ,
Vendor ,
[Class (collection)] ,
[Size Code] ,
TransactionNo ,
[Cost Total] ,
Remarks
)
SELECT [Transaction No_] ,
[Line No_] ,
[Receipt No_] ,
[Barcode No_] ,
[Item No_] ,
[Sales Staff] ,
[Item Department] ,
[Item Group] ,
Price ,
[Net Price] ,
Quantity ,
[VAT Code] ,
[Transaction Status] ,
[Discount Amount] ,
[Cost Amount] ,
Date ,
Time ,
[Shift No_] ,
[Shift Date] ,
[Net Amount] ,
[VAT Amount] ,
[Offer No_] ,
[Standard Net Price] ,
[Disc_ Amount From Std_ Price] ,
[Statement No_] ,
[Customer No_] ,
Section ,
Shelf ,
[Statement Code] ,
[Item Disc_ Group] ,
[Transaction Code] ,
[Store No_] ,
[Item Number Scanned] ,
[Keyboard Item Entry] ,
[Price in Barcode] ,
[Price Change] ,
[Weight Manually Entered] ,
[Line was Discounted] ,
[Scale Item] ,
[Weight Item] ,
[Return No Sale] ,
[Item Corrected Line] ,
[Type of Sale] ,
[Linked No_ not Orig_] ,
[Orig_ of a Linked Item List] ,
[POS Terminal No_] ,
[Staff ID] ,
[Item Posting Group] ,
[Total Rounded Amt_] ,
Counter ,
[Variant Code] ,
[Line Discount] ,
Replicated ,
[Customer Discount] ,
[Infocode Discount] ,
[Cust_ Invoice Discount] ,
[Unit of Measure] ,
[UOM Quantity] ,
[UOM Price] ,
[Total Discount] ,
[Total Disc_%] ,
[Tot_ Disc Info Line No_] ,
[Periodic Disc_ Type] ,
[Periodic Disc_ Group] ,
[Periodic Discount] ,
[Discount Amt_ For Printing] ,
Brand ,
Gender ,
Vendor ,
[Class (collection)] ,
[Size Code] ,
TransactionNo ,
[Cost Total] ,
Remarks
FROM dbo.[AVANTI$Trans_ Sales Entry]تمت التجربة شكرا جزيلا لك ياخى العزيز