الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ما هو الخطا

Featured Replies

بتاريخ:

الرجاء ايضاح لماذا لايضيف البيانات الى الجدول
وشكرا


CREATE PROCEDURE [dbo].[sP_GM_GeographyByZone] AS

declare @sqlstr as varchar(8000)
DECLARE @RB AS VARCHAR(8000)
DECLARE @RB1 AS VARCHAR(8000)
DECLARE @Year AS INT
if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'[dbo].[GM_GeographyByZone]') and type = 'U')
BEGIN transaction
TRUNCATE TABLE dbo.GM_GeographyByZone
DROP TABLE dbo.GM_GeographyByZone
commit

if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'[dbo].[GM_GeographyByZone]') and type = 'U')

BEGIN
-- DECLARE @Year AS INT
SET @Year=year(getdate())
DECLARE @tbl varchar(8000)
SET @tbl = 'CREATE TABLE [dbo].[GM_GeographyByZone] (
[gmcustomeManufacturername_vc] [varchar] (50) NULL,
[makedescription_vc] [varchar] (50) NULL,
[' + convert(varchar(4),@year-6) + '][varchar] (4) NULL,
[' + convert(varchar(4),@year-5) + '][varchar] (4) NULL,
[' + convert(varchar(4),@year-4) + '][varchar] (4) NULL,
[' + convert(varchar(4),@year-3) + '][varchar] (4) NULL,
[' + convert(varchar(4),@year-2) + '][varchar] (4) NULL,
[' + convert(varchar(4),@year-1) + '][varchar] (4) NULL
) ON [PRIMARY]'
exec(@tbl)
END
DECLARE @year int
SET @Year=year(getdate())
declare @RB varchar(8000)
SET @RB = 'INSERT INTO [dbo].[GM_GeographyByZone](
[gmcustomeManufacturername_vc] ,
[makedescription_vc] ,
[' + convert(varchar(4),@year-6) + '],
[' + convert(varchar(4),@year-5) + '],
[' + convert(varchar(4),@year-4) + '],
[' + convert(varchar(4),@year-3) + '],
[' + convert(varchar(4),@year-2) + '],
[' + convert(varchar(4),@year-1) + ']
)'
exec(@RB)

-- DECLARE @YEAR as INT
SET @Year=year(getdate())
declare @sqlstr varchar(8000)

SET @sqlstr = 'SELECT distinct C.makedescription_vc,C.gmcustomemanufacturername_vc, (select isnull(sum(vehicleCount_in),0)
gmcustomtypecode_vc from dbo.GM_TEMP_VehicleCountByDA b
inner join dbo.GMSQLDBDomesticGeographyData a
on a.PK_DA_vc=b.PK_DA_vc
where reportyear_in=' + convert(varchar(4),@year-6 ) + '
and ZoneName_vc=''ONTARIO''
and b.makedescription_vc=C.makedescription_vc
and gmprimarycode_vc=''R''
and gmcustomtypecode_vc = ''C'')
,(select isnull(sum(vehicleCount_in),0)
gmcustomtypecode_vc from dbo.GM_TEMP_VehicleCountByDA b
inner join dbo.GMSQLDBDomesticGeographyData a
on a.PK_DA_vc=b.PK_DA_vc
where reportyear_in=' + convert(varchar(4),@year-5 ) + '
and ZoneName_vc=''ONTARIO''
and b.makedescription_vc=C.makedescription_vc
and gmprimarycode_vc=''R''
and gmcustomtypecode_vc = ''C'')
,(select isnull(sum(vehicleCount_in),0)
gmcustomtypecode_vc from dbo.GM_TEMP_VehicleCountByDA b
inner join dbo.GMSQLDBDomesticGeographyData a
on a.PK_DA_vc=b.PK_DA_vc
where reportyear_in=' + convert(varchar(4),@year-4 ) + '
and ZoneName_vc=''ONTARIO''
and b.makedescription_vc=C.makedescription_vc
and gmprimarycode_vc=''R''
and gmcustomtypecode_vc = ''C'')
,(select isnull(sum(vehicleCount_in),0)
gmcustomtypecode_vc from dbo.GM_TEMP_VehicleCountByDA b
inner join dbo.GMSQLDBDomesticGeographyData a
on a.PK_DA_vc=b.PK_DA_vc
where reportyear_in=' + convert(varchar(4),@year-3 ) + '
and ZoneName_vc=''ONTARIO''
and b.makedescription_vc=C.makedescription_vc
and gmprimarycode_vc=''R''
and gmcustomtypecode_vc = ''C'')
,(select isnull(sum(vehicleCount_in),0)
gmcustomtypecode_vc from dbo.GM_TEMP_VehicleCountByDA b
inner join dbo.GMSQLDBDomesticGeographyData a
on a.PK_DA_vc=b.PK_DA_vc
where reportyear_in=' + convert(varchar(4),@year-2 ) + '
and ZoneName_vc=''ONTARIO''
and b.makedescription_vc=C.makedescription_vc
and gmprimarycode_vc=''R''
and gmcustomtypecode_vc = ''C'')
,(select isnull(sum(vehicleCount_in),0)
gmcustomtypecode_vc from dbo.GM_TEMP_VehicleCountByDA b
inner join dbo.GMSQLDBDomesticGeographyData a
on a.PK_DA_vc=b.PK_DA_vc
where reportyear_in=' + convert(varchar(4),@year-1 ) + '
and ZoneName_vc=''ONTARIO''
and b.makedescription_vc=C.makedescription_vc
and gmprimarycode_vc=''R''
and gmcustomtypecode_vc = ''C'')
from dbo.GM_TEMP_VehicleCountByDA C
order by C.makedescription_vc,C.gmcustomemanufacturername_vc'

exec(@sqlstr)

go

  • بعد 2 أسابيع...
بتاريخ:

?from what source you come by that

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.