How to use direct select and insert or load to speedup the process instead of cursur

Hi friends,
I have stored procedure .In SP i am using cursur to load data from Parent to several child table.
I have attached the script with this message.
And my problem is how to use direct select and insert or load to speedup the process instead of cursur.
Can any one please suggest me how to change this scripts pls.
USE [IconicMarketing]
GO
/****** Object: StoredProcedure [dbo].[SP_DMS_INVENTORY] Script Date: 3/6/2015 3:34:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <ARUN,NAGARAJ>
-- Create date: <11/21/2014>
-- Description: <STORED PROCEDURE FOR DMS_INVENTORY>
-- =============================================
ALTER PROCEDURE [dbo].[SP_DMS_INVENTORY]
@Specific_Date varchar(20) ,
@DealerNum Varchar(6),
@Date_Daily varchar(50)
AS
BEGIN
SET NOCOUNT ON;
--==========================================================================
-- INVENTORY_CURSUR
--==========================================================================
DECLARE
@FileType varchar(50),
@ACDealerID varchar(50),
@ClientDealerID varchar(50),
@DMSType varchar(50),
@StockNumber varchar(50),
@InventoryDate datetime ,
@StockType varchar(100),
@DMSStatus varchar(50),
@InvoicePrice numeric(18, 2),
@CostPack varchar(50),
@SalesCost numeric(18, 2),
@HoldbackAmount numeric(18, 2),
@ListPrice numeric(18, 2),
@MSRP varchar(max),
@LotLocation varchar(50),
@TagLine varchar(max),
@Certification varchar(max),
@CertificationNumber varchar(max),
@VehicleVIN varchar(50),
@VehicleYear bigint ,
@VehicleMake varchar(50),
@VehicleModel varchar(50),
@VehicleModelCode varchar(50),
@VehicleTrim varchar(50),
@VehicleSubTrimLevel varchar(max),
@Classification varchar(max),
@TypeCode varchar(100),
@VehicleMileage bigint ,
@EngineCylinderCount varchar(10) ,
@TransmissionType varchar(50),
@VehicleExteriorColor varchar(50),
@VehicleInteriorColor varchar(50),
@CreatedDate datetime ,
@LastModifiedDate datetime ,
@ModifiedFlag varchar(max),
@InteriorColorCode varchar(50),
@ExteriorColorCode varchar(50),
@PackageCode varchar(50),
@CodedCost varchar(50),
@Air varchar(100),
@OrderType varchar(max),
@AgeDays bigint ,
@OutstandingRO varchar(50),
@DlrAccessoryRetail varchar(50),
@DlrAccessoryCost varchar(max),
@DlrAccessoryDesc varchar(max),
@ModelDesc varchar(50),
@Memo1 varchar(1000),
@Memo2 varchar(max),
@Weight varchar(max),
@FloorPlan numeric(18, 2),
@Purchaser varchar(max),
@PurchasedFrom varchar(max),
@InternetPrice varchar(50),
@InventoryAcctDollar numeric(18, 2),
@VehicleType varchar(50),
@DealerAccessoryCode varchar(50),
@AllInventoryAcctDollar numeric(18, 2),
@BestPrice varchar(50),
@InStock bigint ,
@AccountingMake varchar(50),
@GasDiesel varchar(max),
@BookValue varchar(10),
@FactoryAccessoryDescription varchar(max),
@TotalReturn varchar(10),
@TotalCost varchar(10),
@SS varchar(max),
@VehicleBody varchar(max),
@StandardEquipment varchar(max),
@Account varchar(max),
@CalculatedPrice varchar(10),
@OriginalCost varchar(10),
@AccessoryCore varchar(10),
@OtherDollar varchar(10),
@PrimaryBookValue varchar(10),
@AmountDue varchar(10),
@LicenseFee varchar(10),
@ICompany varchar(max),
@InvenAcct varchar(max),
@Field23 varchar(max),
@Field24 varchar(max),
@SalesCode bigint,
@BaseRetail varchar(10),
@BaseInvAmt varchar(10),
@CommPrice varchar(10),
@Price1 varchar(10),
@Price2 varchar(10),
@StickerPrice varchar(10),
@TotInvAmt varchar(10),
@OptRetail varchar(max),
@OptInvAmt varchar(10),
@OptCost varchar(10),
@Options1 varchar(max),
@Category varchar(max),
@Description varchar(max),
@Engine varchar(max),
@ModelType varchar(max),
@FTCode varchar(max),
@Wholesale varchar(max),
@Retail varchar(max),
@Draft varchar(max),
@myerror varchar(500),
@Inventoryid int,
@errornumber int,
@errorseverity varchar(500),
@errortable varchar(50),
@errorstate int,
@errorprocedure varchar(500),
@errorline varchar(50),
@errormessage varchar(1000),
@Invt_Id int,
@flatfile_createddate datetime,
@FtpDate date,
@Inv_cur varchar(1000),
@S_Year varchar(4),
@S_Month varchar(2),
@S_Date varchar(2),
@Date_Specfic varchar(50),
@Param_list nvarchar(max),
@Daily_Date Varchar(50);
--====================================================================================
--DECLARE CURSUR FOR SPECIFIC DATE (OR) DEALER-ID WITH SPECIFIC DATE (OR) CURRENT DATE
--====================================================================================
set @Date_Specfic = Substring(@Specific_Date,1,4) +'-'+Substring(@Specific_Date,5,2)+'-'+Substring(@Specific_Date,7,2);
set @Daily_Date = SUBSTRING(@Date_Daily,14,4) + '-' + SUBSTRING(@Date_Daily,18,2)+ '-' + SUBSTRING(@date_Daily,20,2)
IF @Daily_Date IS NOT NULL
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where
CONVERT (date,flatfile_createddate) = CONVERT (date,GETDATE()) order by flatfile_createddate;
END
Else
BEGIN
if (@Date_Specfic IS NOT NULL AND @DealerNum != '?????')
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where FtpDate=@Date_Specfic AND ACDealerID='ACTEST' + @DealerNum;
END
ELSE
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where FtpDate=@Date_Specfic;
END
END
OPEN Inventory_Cursor
FETCH NEXT FROM Inventory_Cursor
INTO
@FileType ,
@ACDealerID ,
@ClientDealerID ,
@DMSType ,
@StockNumber ,
@InventoryDate ,
@StockType ,
@DMSStatus ,
@InvoicePrice ,
@CostPack ,
@SalesCost ,
@HoldbackAmount ,
@ListPrice ,
@MSRP ,
@LotLocation ,
@TagLine ,
@Certification ,
@CertificationNumber ,
@VehicleVIN ,
@VehicleYear ,
@VehicleMake ,
@VehicleModel ,
@VehicleModelCode ,
@VehicleTrim ,
@VehicleSubTrimLevel ,
@Classification ,
@TypeCode ,
@VehicleMileage ,
@EngineCylinderCount ,
@TransmissionType ,
@VehicleExteriorColor ,
@VehicleInteriorColor ,
@CreatedDate ,
@LastModifiedDate ,
@ModifiedFlag ,
@InteriorColorCode ,
@ExteriorColorCode ,
@PackageCode ,
@CodedCost ,
@Air ,
@OrderType ,
@AgeDays ,
@OutstandingRO ,
@DlrAccessoryRetail ,
@DlrAccessoryCost ,
@DlrAccessoryDesc ,
@ModelDesc ,
@Memo1 ,
@Memo2 ,
@Weight ,
@FloorPlan ,
@Purchaser ,
@PurchasedFrom ,
@InternetPrice ,
@InventoryAcctDollar ,
@VehicleType ,
@DealerAccessoryCode ,
@AllInventoryAcctDollar ,
@BestPrice ,
@InStock ,
@AccountingMake ,
@GasDiesel ,
@BookValue ,
@FactoryAccessoryDescription ,
@TotalReturn ,
@TotalCost ,
@SS ,
@VehicleBody ,
@StandardEquipment ,
@Account ,
@CalculatedPrice ,
@OriginalCost ,
@AccessoryCore ,
@OtherDollar ,
@PrimaryBookValue ,
@AmountDue ,
@LicenseFee ,
@ICompany ,
@InvenAcct ,
@Field23 ,
@Field24 ,
@SalesCode ,
@BaseRetail ,
@BaseInvAmt ,
@CommPrice ,
@Price1 ,
@Price2 ,
@StickerPrice ,
@TotInvAmt ,
@OptRetail ,
@OptInvAmt ,
@OptCost ,
@Options1 ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ,
@flatfile_createddate,
@FtpDate;
WHILE @@FETCH_STATUS = 0
BEGIN
--==========================================================================
-- INSERT INTO INVENTORY (PARENT TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY]
DMSDealerID,
StockNumber,
DMSType,
InventoryDate,
FtpDate
VALUES (@ClientDealerID,@StockNumber,@DMSType,@InventoryDate,@FtpDate);
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
-- PRINT @errornumber;
-- PRINT @errorseverity;
-- PRINT @errortable;
-- PRINT @errorprocedure;
-- PRINT @errorline;
-- PRINT @errormessage;
-- PRINT @errorstate;
set @myerror = @@ERROR;
-- This -- PRINT statement -- PRINTs 'Error = 0' because
-- @@ERROR is reset in the IF statement above.
-- PRINT N'Error = ' + @myerror;
set @Inventoryid = scope_identity();
-- PRINT @Inventoryid;
--==========================================================================
-- INSERT INTO DMS_INVENTORY_DETAILS (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_DETAILS]
DMSInventoryID,
StockType,
DMSStatus,
LotLocation,
TagLine,
Certification,
CertificationNumber,
CreatedDate,
LastModifiedDate,
ModifiedFlag,
PackageCode,
OrderType,
AgeDays,
OutstandingRO,
Memo1,
Memo2,
Purchaser,
PurchasedFrom,
DealerAccessoryCode,
InStock,
AccountingMake,
SS,
Account,
AccessoryCore,
ICompany,
InvenAcct,
Field23,
Field24,
SalesCode,
Draft,
FTCode,
FtpDate
VALUES (
@InventoryID,
@StockType,
@DMSStatus,
@LotLocation,
@TagLine,
@Certification,
@CertificationNumber,
@CreatedDate,
@LastModifiedDate,
@ModifiedFlag,
@PackageCode,
@OrderType,
@AgeDays,
@OutstandingRO,
@Memo1,
@Memo2,
@Purchaser,
@PurchasedFrom,
@DealerAccessoryCode,
@InStock,
@AccountingMake,
@SS,
@Account,
@AccessoryCore,
@ICompany,
@InvenAcct,
@Field23,
@Field24,
@SalesCode,
@Draft,
@FTCode,
@FtpDate
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errorstate = ERROR_STATE(),
@errortable = 'DMS_INVENTORY_DETAILS',
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXECUTE [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- INSERT INTO DMS_INVENTORY_AMOUNT (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_AMOUNT]
DMSInventoryID,
AllInventoryAcctDollar,
OtherDollar,
PrimaryBookValue,
AmountDue,
LicenseFee,
CalculatedPrice,
OriginalCost,
BookValue,
TotalReturn,
TotalCost,
DlrAccessoryRetail,
DlrAccessoryCost,
DlrAccessoryDesc,
InternetPrice,
InventoryAcctDollar,
BestPrice,
Weight,
FloorPlan,
CodedCost,
InvoicePrice,
CostPack,
SalesCost,
HoldbackAmount,
ListPrice,
MSRP,
BaseRetail,
BaseInvAmt,
CommPrice,
Price1,
Price2,
StickerPrice,
TotInvAmt,
OptRetail,
OptInvAmt,
OptCost,
Wholesale,
Retail,
FtpDate
VALUES (
@InventoryID,
@AllInventoryAcctDollar,
@OtherDollar,
@PrimaryBookValue,
@AmountDue,
@LicenseFee,
@CalculatedPrice,
@OriginalCost,
@BookValue,
@TotalReturn,
@TotalCost,
@DlrAccessoryRetail,
@DlrAccessoryCost,
@DlrAccessoryDesc,
@InternetPrice,
@InventoryAcctDollar,
@BestPrice,
@Weight,
@FloorPlan,
@CodedCost,
@InvoicePrice,
@CostPack,
@SalesCost,
@HoldbackAmount,
@ListPrice,
@MSRP,
@BaseRetail,
@BaseInvAmt,
@CommPrice,
@Price1,
@Price2,
@StickerPrice,
@TotInvAmt,
@OptRetail,
@OptInvAmt,
@OptCost,
@Wholesale,
@Retail,
@FtpDate
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY_AMOUNT',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- INSERT INTO DMS_INVENTORY_VEHICLE (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_VEHICLE]
DMSInventoryID,
InteriorColorCode,
ExteriorColorCode,
Air,
ModelDesc,
VehicleType,
VehicleVIN,
VehicleYear,
VehicleMake,
VehicleModel,
VehicleModelCode,
VehicleTrim,
VehicleSubTrimLevel,
Classification,
TypeCode,
VehicleMileage,
FtpDate,
EngineCylinderCount
VALUES (
@InventoryID,
@InteriorColorCode,
@ExteriorColorCode,
@Air,
@ModelDesc,
@VehicleType,
@VehicleVIN,
@VehicleYear,
@VehicleMake,
@VehicleModel,
@VehicleModelCode,
@VehicleTrim,
@VehicleSubTrimLevel,
@Classification,
@TypeCode,
@VehicleMileage,
@FtpDate,
@EngineCylinderCount
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY_VEHICLE',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- MOVE CURSUR TO NEXT RECORD
--==========================================================================
FETCH NEXT FROM Inventory_Cursor
INTO @FileType ,
@ACDealerID ,
@ClientDealerID ,
@DMSType ,
@StockNumber ,
@InventoryDate ,
@StockType ,
@DMSStatus ,
@InvoicePrice ,
@CostPack ,
@SalesCost ,
@HoldbackAmount ,
@ListPrice ,
@MSRP ,
@LotLocation ,
@TagLine ,
@Certification ,
@CertificationNumber ,
@VehicleVIN ,
@VehicleYear ,
@VehicleMake ,
@VehicleModel ,
@VehicleModelCode ,
@VehicleTrim ,
@VehicleSubTrimLevel ,
@Classification ,
@TypeCode ,
@VehicleMileage ,
@EngineCylinderCount ,
@TransmissionType ,
@VehicleExteriorColor ,
@VehicleInteriorColor ,
@CreatedDate ,
@LastModifiedDate ,
@ModifiedFlag ,
@InteriorColorCode ,
@ExteriorColorCode ,
@PackageCode ,
@CodedCost ,
@Air ,
@OrderType ,
@AgeDays ,
@OutstandingRO ,
@DlrAccessoryRetail ,
@DlrAccessoryCost ,
@DlrAccessoryDesc ,
@ModelDesc ,
@Memo1 ,
@Memo2 ,
@Weight ,
@FloorPlan ,
@Purchaser ,
@PurchasedFrom ,
@InternetPrice ,
@InventoryAcctDollar ,
@VehicleType ,
@DealerAccessoryCode ,
@AllInventoryAcctDollar ,
@BestPrice ,
@InStock ,
@AccountingMake ,
@GasDiesel ,
@BookValue ,
@FactoryAccessoryDescription ,
@TotalReturn ,
@TotalCost ,
@SS ,
@VehicleBody ,
@StandardEquipment ,
@Account ,
@CalculatedPrice ,
@OriginalCost ,
@AccessoryCore ,
@OtherDollar ,
@PrimaryBookValue ,
@AmountDue ,
@LicenseFee ,
@ICompany ,
@InvenAcct ,
@Field23 ,
@Field24 ,
@SalesCode ,
@BaseRetail ,
@BaseInvAmt ,
@CommPrice ,
@Price1 ,
@Price2 ,
@StickerPrice ,
@TotInvAmt ,
@OptRetail ,
@OptInvAmt ,
@OptCost ,
@Options1 ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ,
@flatfile_createddate,
@FtpDate;
END
CLOSE Inventory_Cursor;
DEALLOCATE Inventory_Cursor;
SET ANSI_PADDING OFF
END
Arunraj Kumar

Thank you.
And another question if the data is already there in the child table if i try to load alone it must delete the old data in the child tablee and need to get load the new data and 
How to do this ?
Arunraj Kumar
You can do that with an IF EXISTS condition
IF EXISTS (SELECT 1
FROM YourChildTable c
INNER JOIn @temptable t
ON c.Bkey1 = t.Bkey1
AND c.Bkey2 = t.Bkey2
DELETE t
FROM YourChildTable c
INNER JOIn @temptable t
ON c.Bkey1 = t.Bkey1
AND c.Bkey2 = t.Bkey2
INSERT INTO YourChildTable
where Bkey1,Bkey2 etc forms the business key of the table
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • How to use dynamically column_name and column_name value in plsql procedure

    hi,
    how to use dynamically column_name and column_name value in plsql procedure.
    for example, i have one table with column col1.i want write plsql code with dynamically execute the insert one schema to another schema.
    by
    siva

    DECLARE
    CURSOR C
    IS
    SELECT cc_cd
    FROM TEMP1 WHERE s_flg ='A' AND b_num IN('826114');--,'709537','715484');
    CURSOR D
    IS
    SELECT * FROM cONSTRAINTS_test ORDER BY SRL_NUM;
    STMT VARCHAR2(4000);
    p_target_schema VARCHAR2(30):='schema1';
    p_source_schema VARCHAR2(30):='schema2';
    BEGIN
    FOR REC IN C
    LOOP
    FOR REC1 IN D
    LOOP
    STMT := 'INSERT INTO '||p_target_schema||''||'.'||''||REC1.CHILD_TABLE||' SELECT * FROM '||p_source_schema||''||'.'||''||REC1.CHILD_TABLE||' where '||REC1.COLUMN_NAME||'='||REC.cntrct_cd||'';
    Dbms_Output.Put_Line('THE VALUE STMT:'||STMT);
    END LOOP;
    END LOOP;
    END;
    cc_cd='434se22442ss3433';
    cc_t_ms is parent table-----------------------pk_cc_cd is primary key
    cc_cd is column name
    CONSTRAINTS_test table
    CHILD_TABLE NOT NULL VARCHAR2(30)
    CONSTRAINT_NAME NOT NULL VARCHAR2(30)
    COLUMN_NAME NOT NULL VARCHAR2(400)
    R_CONSTRAINT_NAME VARCHAR2(30)
    CONSTRAINT_TYPE VARCHAR2(1)
    PARENT_TABLE NOT NULL VARCHAR2(30)
    SRL_NUM NUMBER(4)
    CHILD_TABLE     CONSTRAINT_NAME     COLUMN_NAME     R_CONSTRAINT_NAME     CONSTRAINT_TYPE     PARENT_TABLE     SRL_NUM
    a aaa cc_CD     pk_cc_CD     R     cc_t_MS     1
    bb     bbb      Cc_CD     PK_CC_CD     R     cc_t_MS     2
    bb_v     bb_vsr     S_NUM     PK_S_NUM      R     bb_v      3
    cC_HS_MS     cc_hs_CD     cc_CD     PK_CC_CD     R     cc_t_MS     4
    cC_HS_LNK cc_HIS_LNK_CD     H_CD     PK_HS_HCD     R     cC_hs_ms 5
    cC_D_EMP     cc_d_EMP     Cc_CD     PK_CC_CD      R     cc_t_MS     6
    i want insert schema1 to schema2 with run time of column_name and column value.the column_name and values should dynamically generated
    with refential integrity.is it possible?
    can any please quick solution.its urgent
    by
    siva

  • How to use multiple selection parameters in the data model

    Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
    I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
    Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
    My data template is the following (it's very simple...I am just testing how the parameters work):
    <dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
    <parameters>
    <parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
    <parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
    </parameters>
    <dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    select deptno, dname,loc
    from dept
    &p_where_clause
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q2">
    <element name="deptno" value="deptno"/>
    <element name="dname" value="dname"/>
    <element name="loc" value="loc"/>
    </group>
    </dataStructure>
    </dataTemplate>
    The 2 parameters are based on these LOV:
    1) select distinct dname from dept (p_dep_2_param)
    2) select distinct loc from dept (p_loc_1_param)
    and both of them have checked the "Multiple selection" and "Can select all" boxes
    The package I created, in order to use the lexical refence is:
    CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
    as
    p_dep_2_param varchar2(14);
    p_loc_1_param varchar2(20);
    p_where_clause varchar2(100);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
    then
    p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
    else
    p_where_clause := 'where 1=1';
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
    Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
    it works perfectly....
    Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
    So my questions are these:
    1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
    2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
    Thanks in advance for any suggestion
    Alex

    Alex,
    the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
    So change your package to (you need to expand your variables)
    create or replace package bip_departments_2_parameters
    as
    p_dep_2_param varchar2(1000);
    p_loc_1_param varchar2(1000);
    p_where_clause varchar2(1000);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    create or replace package body bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    p_where_clause := ' ';
    if p_dep_2_param is not null then
    if instr(p_dep_2_param,',')>0 then
    p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
    else
    p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
    end if;
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    else
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
    Regards
    Rainer

  • I used to drag and drop newly loaded CD's from Recently Added to one of my iPod Classic playlists. I have no idea how to do this with the new version of iTunes. I thought perhaps checking Sync might give me a clue but it warned me Syncing would wipe conte

    I used to drag and drop music loaded from CD's from the Recently Added folder to a Playlist on my iPods Classic. Can't see how to do this with new iTunes version. Probably need to sync somehow but when I checked on Sync it warned me it would wipe out my iPod contents. Don 't know why Apple makes something that used to be simple so difficult. Can't even figure out how to display both my library and iPod contents on same screen.

    Hey joshuafromisr,
    If you resintall iTunes, it should fix the issue. The following document will go over how to remove iTunes fully and then reinstall. Depending on what version of Windows you're running you'll either follow the directions here:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    or here:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    Best,
    David

  • ESB performance issue: takes too long to select and insert records in DBs

    Hi,
    I have an ESB service which has to select data from seven different tables(using join operations) of one database and insert it into a single table of another database.
    It takes unduly long time to do this operation.
    For ex: it takes over 2 hours to select and insert 3000 records.
    When ran the same query to select the records from the tables using SQL developer, it took only 23 seconds.
    Do I need to change any configuration settings in the enterprise manager or someother place to increase the performance. Someone please advice.
    I am using Oracle SOA Suite 10.1.3.4
    Thanks,
    RV

    Hi,
    I have an ESB service which has to select data from seven different tables(using join operations) of one database and insert it into a single table of another database.
    It takes unduly long time to do this operation.
    For ex: it takes over 2 hours to select and insert 3000 records.
    When ran the same query to select the records from the tables using SQL developer, it took only 23 seconds.
    Do I need to change any configuration settings in the enterprise manager or someother place to increase the performance. Someone please advice.
    I am using Oracle SOA Suite 10.1.3.4
    Thanks,
    RV

  • Can I use a select and update statement in a single jsp file?

    I want to update the BUY table everytime I would add a SELL transaction.....I want to minus the stocks that I sold to those that Ive bought before.....
    note: I used a seperate table in BUY and SELL transaction
    After I Have added a transaction, I want to update the buy table. This is my problem, can I used both SELECT and UPDATE statement at the same time in a single jsp file for example like this:
    select * from test, test1;
    update test
    set total_shares=total_shares-Stotal;
    where stock_code=Scode AND name_broker=Sbroker;
    Can i have both of these statements in the same jsp file in oder to update the buy table?
    Or can anyone suggest how can process that update?THANKS!
    --------------------

    Can i have both of these statements in the same jsp file in oder to update the buy table?Yes. But wouldn't it have been easier just to try it?

  • Difficulty using Direct Selection tool to select a single vertex

    I'm using Illustrator (CS2) and am having some trouble with the Direct Section tool.
    Is there a way to select a single vertex of an object, if all the vertices of that object are selected?
    For example, let's say I want to distort a rectangle by stretching one corner. if I select a rectangle by clicking on it, all four corners are selected. If I move the cursor (the Direct Selection white arrow) over one vertex, a small square appears immediately below the white arrow, suggesting that only the one corner will be selected. However, when I click, nothing happens - all four corners remain selected, and if I drag, the rectangle moves rather than distorts.
    I can select a single corner if I click onto blank space on my drawing (thereby deselecting the rectangle) and then use the Direct Selection tool to click directly on the one corner in question. Alternatively, I can coose Object>Selection Handles from the Select Menu, or use Shift+Click to deselect the other three corners (leaving only the corner I want to move selected). However, those are awkward solutions.
    Is there any better way to select a single vertex of an object that is already selected?

    Joe & Jacob,
    Thanks for your responses.
    I thought, based on what I read in the Illustrator help files, that the technique Joe describes would work. However, it doesn't seem to. If I have the object selected and then use the Direct Selection Tool (either by holding down CTRL or by selecting the white pointer tool from the palette) to click on a single vertex, all the vertices remain selected. I tried both click-and-release and click-and-hold but the behavior is the same either way.
    But clicking on the path with the Direct Selection tool does seem to work (provided that the object hasn't already been selected). In this case all the vertices appear but are hollow (unselected) and I can then select one of them.
    Thanks again for the information, and if you or anyone else has any additional hints about the first technique, I would be interested to learn them!
    - Eric

  • How to use internet sharing and airtunes?

    Question? how to use internet sharing and airtunes?
    OK I have following working separate situations.
    1. I can share my internet connection : is a router to ethernet cable into mac. Then over airport built in to my iMac ....... to other wireless computers, iphone etc...works fine.
    2. the I have a air port express that is only used for air tunes. I guess i had create a separate network for that. can select that in iTunes. Works.
    problem is can not use both at the same time!
    OK so Now I would like to combine the two; share the ethernet over airport on mac and send music to air port express....
    the main reason for this is cause I now have an iPhone and want to use the internet and the remote app to control iTunes from all over the house.
    I have not the first idea where to start.
    Any hints or tips will be greatly appreciated.

    The airport express is a router. And, only one router can be used to obtain an IP address. So in your airport express configuration set it so it does not obtain an IP address.

  • I am using imovie 09 and when I try to play the scenes from my hd camcorder video freezes then voice freezes and bar keeps running to the end.  Does anyone know how to fix this? PLEASE!

    I am using imovie 09 and when I try to play the scenes from my hd camcorder the video freezes then audio freezes and the play bar keeps going with no video or audio.  How Can I fix this???  PLEASE HELP!

    Up front I would say the short answer is "no"... but the long answer is "sort of".
    Replicators are part of the Fractal "arsenal" and Motion definitely has those, but I think you would be very hard pressed to come anywhere near the type of fractal imaging as in the Electric Sheep example.
    I was able to squeeze the following out of Motion (the base element is a simple square), but by the time it got this far, Motion wouldn't play faster than about 1 frame every 5 or so seconds. At a certain point, you end up having to render movie files in order to see it in action (and that took Motion about 8 minutes for a 12 second project [09 iMac i7].) [If you're interested, I posted a short video of these here: http://www.youtube.com/watch?v=l6Fe_ydfAss. The segments are longer than 12 seconds each because these are designed to loop @12 seconds and each one was looped more than once.]
    [You asked the question on the 4th - I "finished" this on the 7th... (I admit to several "false starts")]
    If you have a faster mac than mine, you might be able to do more than this... and you really don't have access to the Maths that fractal apps have, so depending on your creativity for devising the "root" motif element you may (or may not) be disappointed in what Motion has to offer (it *will* try your patience!) If you would like to experiment anyway, I will explain some of the techniques I used for the above (which are, at best, rudimentary!) Once you get the basics down, you should be able to take off in your own directions.
    HTH

  • How i use start with and rollup both in one query

    hi master
    sir i use rollup function for subtotal but rollup not give tree
    for tree i want to use start with and connect by function
    but that query give error
    sir how i use both rollup and start with connect by in one query
    for tree wise subtotal
    please give me idea
    thanking you

    hi master
    thank for your reply
    sir i get accid and title from master table and balance from detial table then system give me error
    sir i send me all table and data with query and error
    Sir this is my master table
    SQL> desc chartofacc;
    Name Null? Type
    PARENT NUMBER
    CHILD NUMBER
    ACCID NOT NULL VARCHAR2(15)
    TITLE VARCHAR2(99)
    CAMPID VARCHAR2(2)
    ACTIVE NUMBER
    FSTATUS NUMBER
    Data
    Parent child accid
         1     K1
    1     11     K11
    11     1101     K1101
    11     1102     K1102
    11     1103     K1103
    11     1104     K1104
    11     1105     K1105
    11     1106     K1106
    11     1107     K1107
    11     1108     K1108
    11     1109     K1109
    11     1110     K1110
    11     1111     K1111
    11     1112     K1112
    11     1113     K1113
    11     1114     K1114
    1     12     K12
    12     1201     K1201
    12     1202     K1202
    12     1203     K1203
    1     13     K13
    13     1301     K1301
    1301     130101     K130101
    1301     130102     K130102
    1301     130103     K130103
    1301     130104     K130104
    1301     130105     K130105
    1301     130106     K130106
    1301     130107     K130107
    1301     130108     K130108
    1301     130109     K130109
    1301     130110     K130110
    1301     130111     K130111
    1301     130112     K130112
    1301     130113     K130113
    1301     130114     K130114
    1301     130115     K130115
    13     1302     K1302
    1302     130201     K130201
    1302     130202     K130202
    1302     130203     K130203
    1302     130204     K130204
    1302     130205     K130205
    13     1303     K1303
    1303     130301     K130301
    1303     130302     K130302
    1303     130303     K130303
    13     1304     K1304
    1304     130401     K130401
    1304     130402     K130402
    1304     130403     K130403
    1304     130404     K130404
    1304     130405     K130405
    1304     130406     K130406
    1304     130407     K130407
    1304     130408     K130408
    13     1305     K1305
    1305     130501     K130501
    1305     130502     K130502
    13     1306     K1306
    1306     130601     K130601
    13     1307     K1307
    1307     130701     K130701
    1307     130702     K130702
    1307     130703     K130703
    1307     130704     K130704
    13     1308     K1308
    1308     130801     K130801
    1308     130802     K130802
    1308     130803     K130803
    1308     130804     K130804
    1308     130805     K130805
    1308     130806     K130806
    1308     130807     K130807
    1308     130808     K130808
    1308     130809     K130809
    1308     130810     K130810
    1308     130811     K130811
    1308     130812     K130812
    1308     130813     K130813
    13     1309     K1309
    13     1310     K1310
    13     1311     K1311
    1311     131101     K131101
         2     K2
    2     21     K21
    21     2101     K2101
    2101     210101     K210101
    2101     210102     K210102
    2101     210103     K210103
    2101     210104     K210104
    21     2102     K2102
    2102     210201     K210201
    2102     210202     K210202
    2102     210203     K210203
    2102     210204     K210204
    21     2103     K2103
    2103     210301     K210301
    2103     210302     K210302
    2103     210303     K210303
    2103     210304     K210304
    21     2104     K2104
    2104     210401     K210401
    2104     210402     K210402
    2104     210403     K210403
    2104     210404     K210404
    2     22     K22
    22     2201     K2201
    2201     220101     K220101
    2201     220102     K220102
    2201     220103     K220103
    2201     220104     K220104
    2201     220105     K220105
    22     2202     K2202
    2202     220201     K220201
    2202     220202     K220202
    2202     220203     K220203
    2202     220204     K220204
    22     2203     K2203
    2203     220301     K220301
    2203     220302     K220302
    2203     220303     K220303
    2203     220304     K220304
    22     2204     K2204
    2204     220401     K220401
    2204     220402     K220402
    2204     220403     K220403
    22     2205     K2205
    2205     220501     K220501
    2205     220502     K220502
    220502     22050201     K22050201
    220502     22050202     K22050202
    220502     22050203     K22050203
    220502     22050204     K22050204
    22     2206     K2206
    2206     220601     K220601
    2206     220602     K220602
    2206     220603     K220603
    2206     220604     K220604
    2     23     K23
    23     2301     K2301
    2301     230101     K230101
    2301     230102     K230102
    2301     230103     K230103
    2301     230104     K230104
    2301     230105     K230105
    2301     230106     K230106
    2301     230107     K230107
    2301     230108     K230108
    23     2302     K2302
    2302     230201     K230201
    2302     230202     K230202
    2302     230203     K230203
    2302     230204     K230204
    23     2303     K2303
    2303     230301     K230301
    2303     230302     K230302
    23     2304     K2304
    2304     230401     K230401
    2304     230402     K230402
    2304     230403     K230403
    23     2305     K2305
    2305     230501     K230501
    23     2306     K2306
    2306     230601     K230601
    2306     230602     K230602
    2306     230603     K230603
    2306     230604     K230604
    23     2307     K2307
    23     2308     K2308
    2308     230801     K230801
    2308     230802     K230802
    2308     230803     K230803
    23     2309     K2309
    2309     230901     K230901
    2309     230902     K230902
    2309     230903     K230903
    2309     230904     K230904
    23     2310     K2310
    2310     231001     K231001
    2310     231002     K231002
    2310     231003     K231003
    23     2311     K2311
    2311     231101     K231101
    2311     231102     K231102
    2311     231103     K231103
    23     2312     K2312
    2312     231201     K231201
    2312     231202     K231202
    2312     231203     K231203
    2312     231204     K231204
    23     2313     K2313
    2313     231301     K231301
    2313     231302     K231302
    2313     231303     K231303
    2313     231304     K231304
    2313     231305     K231305
    2313     231306     K231306
    2313     231307     K231307
    2313     231308     K231308
    2313     231309     K231309
    2313     231310     K231310
    2313     231311     K231311
    2313     231312     K231312
    2313     231313     K231313
    2313     231314     K231314
    2313     231315     K231315
    23     2314     K2314
    2314     231401     K231401
    2314     231402     K231402
    2314     231403     K231403
    2314     231404     K231404
    2314     231405     K231405
    2314     231406     K231406
    2314     231407     K231407
    23     2315     K2315
    23     2316     K2316
    2316     231601     K231601
    2316     231602     K231602
    23     2317     K2317
    23     2318     K2318
    23     2319     K2319
    2319     231901     K231901
    2319     231902     K231902
    2319     231903     K231903
    2319     231904     K231904
    2319     231905     K231905
    2319     231906     K231906
    23     2320     K2320
    2320     232001     K232001
         3     K3
    3     31     K31
    31     3101     K3101
    31     3102     K3102
    31     3103     K3103
    31     3104     K3104
    31     3105     K3105
    3     32     K32
    32     3201     K3201
    32     3202     K3202
    32     3203     K3203
    32     3204     K3204
    32     3205     K3205
    32     3206     K3206
    32     3207     K3207
         4     K4
    4     41     K41
    41     4101     K4101
    4101     410101     K410101
    4101     410102     K410102
    4101     410103     K410103
    4101     410104     K410104
    4101     410105     K410105
    4101     410106     K410106
    4101     410107     K410107
    4101     410108     K410108
    4101     410109     K410109
    4101     410110     K410110
    4101     410111     K410111
    4101     410112     K410112
    4101     410113     K410113
    4101     410114     K410114
    4101     410115     K410115
    4101     410116     K410116
    4101     410117     K410117
    4101     410118     K410118
    4101     410119     K410119
    4101     410120     K410120
    4101     410121     K410121
    4101     410122     K410122
    4101     410123     K410123
    4101     410124     K410124
    4101     410125     K410125
    4101     410126     K410126
    4101     410127     K410127
    4101     410128     K410128
    4101     410129     K410129
    4101     410130     K410130
    4101     410131     K410131
    4101     410132     K410132
    41     4102     K4102
    41     4103     K4103
    41     4104     K4104
    4104     410401     K410401
    4104     410402     K410402
    4104     410403     K410403
    4104     410404     K410404
    41     4105     K4105
    41     4106     K4106
    41     4107     K4107
    41     4108     K4108
    4108     410801     K410801
    4108     410802     K410802
    4108     410803     K410803
    41     4109     K4109
    4109     410901     K410901
    4109     410902     K410902
    4109     410903     K410903
    41     4110     K4110
    41     4111     K4111
    4111     411101     K411101
    4111     411102     K411102
    4111     411103     K411103
    41     4112     K4112
    4112     411201     K411201
    41     4113     K4113
    4113     411301     K411301
    41     4114     K4114
    4114     411401     K411401
    4114     411402     K411402
         5     K5
    5     51     K51
    51     5101     K5101
    51     5102     K5102
    51     5103     K5103
    51     5104     K5104
    51     5105     K5105
    51     5106     K5106
    51     5107     K5107
    51     5108     K5108
    51     5109     K5109
    51     5110     K5110
    51     5111     K5111
    51     5112     K5112
    51     5113     K5113
    51     5114     K5114
         6     K6
    6     61     K61
         7     K7
    7     71     K71
    7     72     K72
    7     73     K73
    7     74     K74
    7     75     K75
    7     76     K76
    This is my detil table
    SQL> desc accbal;
    Name Null? Type
    ACCID VARCHAR2(15)
    YEARID NUMBER
    CRBAL NUMBER
    DRBAL NUMBER
    ENTDATE DATE
    BALID NUMBER
    Data in detail
    K1101     46291132     
    K1102     13182173     
    K1103     23784045     
    K1107     10001795     
    K1108     9083529     
    K1110     4224350     
    K1112     6696832     
    K1113     7963381     
    K1114     742766     
    K1201     1486082     
    K130104     1977616     
    K130106     736266     
    K130107     396673     
    K130108     42751     
    K130109     298362     
    K130110     187696     
    K130111     537     
    K130112     942     
    K130113     987     
    K130114     1272     
    K130115     40000     
    K130205     259941     
    K130303     177716     
    K130406     809719     
    K130408     1786091     
    K130701     301000     
    K130702     151200     
    K130703     7570     
    K130704     34400     
    K1308          
    K130801     5400     
    K130802     45000     
    K130803     10856     
    K130807     24300     
    K130808     16500     
    K130810     104500     
    K130811     60000     
    K130812     181000     
    K130813     1750000     
    K1309     1225565     
    K1310     2176259     
    K1311          
    K131101     788780     
    K410101          24926
    K410102          9545
    K410103          28500
    K410104          8192
    K410105          847
    K410106          37100
    K410107          2332
    K410108          9844
    K410109          7843
    K410110          9313
    K410111          1425
    K410112          6089
    K410113          15497
    K410114          5790
    K410115          4251
    K410116          22293
    K410117          855
    K410118          6497
    K410119          14996
    K410120          124214
    K410121          6713
    K410122          1567
    K410123          75821
    K410124          5085
    K410125          7125
    K410126          4342
    K410127          21485
    K410128          641111
    K410129          589
    K410130          50
    K410131          163900
    K410132          3849
    K4105          3946489
    K4107          100000
    K410801          972011
    K410802          1707806
    K410803          116450
    K4110          13113874
    K411101          98335
    K411102          32454
    K411103          53569
    K411201          25327406
    K411301          7143103
    K411401          4500000
    K411402          12754
    K5102          2120031
    K5103          13543810
    K5107          4596103
    K5108          5604493
    K5110          2008401
    K5112          2182778
    K5113          4748537
    K5114          556914
    K61          43297680
    Sir I use this query
    select lpad(' ',2*(level-1)) || to_char(child),title,sum(drbal),sum(crbal),
    from chartofacc, accbal
    where chartofacc.accid=accbal.accid(+)
    start with parent is null
    connect by prior child = parent
    group by rollup(substr(mas.accid,2,1),substr(mas.accid,3,1),substr(mas.accid,4,2),substr(mas.accid,6,2) ,chartofacc.accid,title,fstatus);
    sir this query not give me result and give me error this
    SQL> /
    from chartofacc, accbal
    ERROR at line 2:
    ORA-00936: missing expression
    Please give me idea how I get tree type subtotal tribalance
    Thanking you
    Aamir

  • How to use open cursor and iner join in one statement

    Hello All,
    Could any one post the code for the below question?
    How to use open cursor and iner join in one statement
    Regards,
    Lisa

    OPEN CURSOR c FOR SELECT     carrid connid fldate bookid smoker
                        FROM     sbook innerjoin shook
                        ORDER BY carrid connid fldate smoker bookid.
    Pls reward if helpful.

  • How do I transfer my checked songs from one computer to another - tried exporting library playlist etc but no luck! Please help! I have 26,000 songs - 17,000 are selected and I can't run down the list on my new computer and re-check 17,000 songs! Thanks!

    How do I transfer my checked songs from one computer to another - tried exporting library playlist etc but no luck! Please help! I have 26,000 songs - 17,000 are selected and I can't run down the list on my new computer and re-check 17,000 songs! Thanks!

    Make a smart playlist of your whole library but only checked songs - #4 on  http://support.apple.com/kb/ht1801
    Highlight all files in that playlist, then drag to the other drive.  This isn't preserving any playlists or whatever, just copying files from one drive to another.
    You might want to delete the smart playlist this once you are done because it will probably gobble up resources with that many files.

  • How to use radioButton(s) and image controls on windows phone 8.1

    how to use radioButton(s) and image controls on windows phone 8.1

    Hi aspirantme,
    >>how to use radioButton(s) and image controls on windows phone 8.1
    Which version of your app is? Runtime or Silverlight?
    For Runtime version, please see the following articles:
    #RadioButton class
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.radiobutton(v=win.10).aspx
    #How to add radio buttons (XAML)
    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868200.aspx
    #Image class
    https://msdn.microsoft.com/library/windows/apps/br242752.aspx
    For Silverlight version, please refer to the following documents and guidelines:
    #RadioButton Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.radiobutton(v=vs.105).aspx
    #RadioButton control design guidelines for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/hh202881(v=vs.105).aspx
    #Image Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.image(v=vs.105).aspx
    #Quickstart: Images for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/jj206957(v=vs.105).aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Question when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    Question
    when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    See this. <br />
    https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit

  • When I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    Question
    When I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    See this. <br />
    https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit

Maybe you are looking for

  • Anyone ever try recording from PS3  to Mac using EyeTVHD  ?

    Hello, I am connecting my PS3 with a multi AV cable to the back of my PS3 and connecting the blue green red cables to the EyeTVHD but I always get a NO SIGNAL message on the Mac. Has anyone tried this and got it to work? Is it possible to record game

  • HP LaserJet Pro MFP m125nw Scan Software for Windows XP

    Hello, May I kindly ask if there is a download location for the HP Scan Software for the HP LaserJet Pro MFP m125nw as the unit didn't come with a CD. On the product page there is a driver listed for Windows XP, but the actual Software is not availab

  • Itunes Error 42404- corepf.pkg install fail

    The Corepf.pkg in the itunes installer is failing to install, causing me to not be able to authorize my itunes account and preventing me from installing apps on my iphone and playing downloaded music. The pkg gets about 80% of the way through the ins

  • On Demand Selection

    When I select the On Demand Feature in the Menu screen, my TV screen becomes snowy but I am still able to hear the sound.  While watching TV,  typically during certain comercials, my screen will go snowy at times while I can still hear the sound of t

  • Web service connector trouble

    I have created web service connector in portal, specified wsdl url. How i can use it in my java programm, like a integrating 3rd-Party search engines into KM index management or other? The likn(http://help.sap.com/saphelp_nw04/helpdata/en/e1/d0d240ca