How to use several Jserv-Processes to improve performance
Hi,
we are developing our new website with portal and the performance is not very high. In some papers I have read about using several JServ's on different servers to improve speed.
Has anyone tried this?
If someone has a documentation to setup several processes, let me know please.
Thanks.
Oliver
Hi,
I am also interested in setting up several JServ processes for
portal (if possible). Can you pleas add me to the notification list if there
is already a procedure out there? Thanks. To open this out slightly (sorry to the original posters) I understand that release 2 uses OC4J instead of Jserv. As jserv only supported single thread and OC4J supports multiple threads, I wondered if anyone (from Oracle) had indicative figures for performance improvements (though I guess this is only realised for OC4J components).
John Skelton ([email protected] - the default email is wrong; thinks... must change my profile)
Similar Messages
-
How to use 'several screen function' used to be in os x 10.6
hi ! ^^
how r u ? good !
how to use 'several screen function' used to be in os x 10.6 ??
it was possible to change whole screen with 'command + arrow keys' (option + arrow keys maybe ??)
but, in os x 10.7, it seems it is not possible. and instread of it 'mission controls' that is not uesful ..
no windows drive direct access. no several screen function. crash when control panel ask me administration right.
os x 10.5 or 10.4 was much easy to control.
plz fix and add good functions of 10.6 , remove good functions is not called 'upgrade'.You can still do it with CONTROL + Arrow keys, the same as 10.6
Regards,
Captfred -
How to use pre-mapping process operator
Hi,
I am using OWB version 10.1.0.4.0.
There are two source tables namely src1_tb(id1,field1,field2), src2_tb(id2,field3,field4) and a target table namely target_tb(id1,id2,field1,field2,field3,field4).
It's a simple mapping with a join operator. Here, when I try to use a pre-mapping process operator 'LENGTH', with input from outgroup of join operator (field1) and output linked to an added field( VALUE_LENGTH) in Traget Table, it gives error "VLD-2451: Connection to premapping is invalid" and a warning "VLD-1008 :Referenced mapping column VALUE_LENGTH" does not exist"
Can anyone please let me know how to use pre-mapping process operator.
Any help will be greatly appreciated.
Regards,
Pawanyes, a pre-mapping procedure is not what you want here.
Pre-mapping procedures run once when the mapping initializes and before the actual ETL is run. IT is a place where you could do some custom data cleansing / validation, populate your own audit loggin tables if you wish, or whatever other things you might like to do.
For what you are describing, you want to pass the field through an expression object. Drop the Expression on the canvas and drag a link from the field in your OUTGRP to the INGRP on the expression This will auto-create the corresponding ingrp attribute in the expression for that field. Then double-click the expression object to bring up it's properties sheet. You will then want to create an OUTGRP attribute called length_value of type number, and set it's Expression property to length(ingrp1.your_Field_name_here). You can then connect from this outgrp field to your field in the target table.
Cheers,
Mike -
How to tune this query for the improve performance ?
Hi All,
How to tune this query for the improve performance ?
select a.claim_number,a.pay_cd,a.claim_occurrence_number,
case
when sum(case
when a.payment_status_cd ='0'
then a.payment_est_amt
else 0
end
)=0
then 0
else (sum(case
when a.payment_status_cd='0'and a.payment_est_amt > 0
then a.payment_est_amt
else 0
end)
- sum(case
when a.payment_status_cd<>'0'
then a.payment_amt
else 0
end))
end as estimate
from ins_claim_payment a
where a.as_of_date between '31-jan-03' and '30-aug-06'
and ( a.data_source = '25' or (a.data_source between '27' and '29'))
and substr(a.pay_cd,1,1) IN ('2','3','4','8','9')
group by a.claim_number, a.pay_cd, a.claim_occurrence_number
Thank you,
MckaMcka
As well as EXPLAIN PLAN, let us know what proportion of rows are visited by this query. It may be that it is not using a full table scan when it should (or vice versa).
And of course we'd need to know what indexes are available, and how selective they are for the predicated you have in this query ...
Regards Nigel -
Can anyone tell me the how to use the "ducking" process in Logic Pro 8?
Howdy,
I've tried following the directions in the manual but I just can figure out the steps necessary to use the ducking process in Logic 8. For those who aren't sure what ducking is it's for instance, when you want a guitar track's volume to be reduced when a vocal track is active. As an example, there is a way to trigger the volume reduction in the guitar track(s) using a compressor in the vocal track. Whenever the singer is singing it automatically reduces the volume in the guitar track. I'm just not sure how to do this. Any help with the steps involved would be greatly appreciated.
Thanks,
MarkWell, the theory is you run say, the mix , through the 'ducker' or as I like to call it, the 'motherducker', then you simply sidechain say, a kick drum. That is to say, you route your kick to a bus or aux channel, preferably routed to a different output, then assign that bus or aux as your sidechain input in the ducker. The theory is that the through signal will duck on receipt of the sidechained kick.
Frustratingly, this ducker is the buggiest thing since a bug landed on a buggy while loading it into the back of a VW bug. It just doesn't work. well it works for a bit and then stops working. Or the kick comes through the ducker as well. Or some other manifestation of complete crapness. Come on Apple, sort it out - it's the sound that everybody wants!
Sorry Mark L1 -
How to use XOR in process chain
Hi,
Can you please let me know how to use XOR in a process chain..and what is the use of this..
Thanks in advance
harihi krishna..
here are some links which has scenarios..
XOR Process
The application process starts when the first event in one of the predecessor processes has been successfully triggered
Hope the following links will give u a clear idea about process chains and clear ur doubts.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/sap-teched-03/using%20process%20chains%20in%20sap%20business%20information%20warehouse
Business Intelligence Old Forum (Read Only Archive)
http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/c08b3baaa59649e10000000a11402f/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8da0cd90-0201-0010-2d9a-abab69f10045
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/19683495-0501-0010-4381-b31db6ece1e9
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36693695-0501-0010-698a-a015c6aac9e1
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9936e790-0201-0010-f185-89d0377639db
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/263de690-0201-0010-bc9f-b65b3e7ba11c
/people/siegfried.szameitat/blog/2006/02/26/restarting-processchains
hope it helps,
all the best.... -
How to use several physical disk ??
Hi,
I'll use BerkleyDB to store millions and millions of records.
These records will need at least XXX Go on physical hard drive.
Currently, 300 millions of records = 60 Go.
But the number of records will grow exponentially
Is it a way to use several physical disk to store BerkleyDB environement and associated DBs ?
If is not possible, what is the best practice ?
Using several environment on different disk ?
Tks for your answers !!
RegardsIs it a way to use several physical disk to store BerkleyDB environement and associated DBs ?You can to spread a BDB deployment across multiple disks by using multiple environments in your application. Each environment would specify a distinct environment home. Preferably this would be configured to share a common cache, in order to have the most effective use of memory. See EnvironmentConfig.setSharedCache in JE 3.3
Note that transactions are per-environment; you can't include operations from different environments in a single transaction.
Regards,
Linda -
How to run query in parallel to improve performance
I am using ALDSP2.5, My data tables are split to 12 ways, based on hash of a particular column name. I have a query to get a piece of data I am looking for. However, this data is split across the 12 tables. So, even though my query is the same, I need to run it on 12 tables instead of 1. I want to run all 12 queries in parallel instead of one by one, collapse the datasets returned and return it back to the caller. How can I do this in ALDSP ?
To be specific, I will call below operation to get data:
declare function ds:SOA_1MIN_POOL_METRIC() as element(tgt:SOA_1MIN_POOL_METRIC_00)*
src0:SOA_1MIN_POOL_METRIC(),
src1:SOA_1MIN_POOL_METRIC(),
src2:SOA_1MIN_POOL_METRIC(),
src3:SOA_1MIN_POOL_METRIC(),
src4:SOA_1MIN_POOL_METRIC(),
src5:SOA_1MIN_POOL_METRIC(),
src6:SOA_1MIN_POOL_METRIC(),
src7:SOA_1MIN_POOL_METRIC(),
src8:SOA_1MIN_POOL_METRIC(),
src9:SOA_1MIN_POOL_METRIC(),
src10:SOA_1MIN_POOL_METRIC(),
src11:SOA_1MIN_POOL_METRIC()
This method acts as a proxy, it aggregates data from 12 data tables
src0:SOA_1MIN_POOL_METRIC() get data from SOA_1MIN_POOL_METRIC_00 table
src1:SOA_1MIN_POOL_METRIC() get data from SOA_1MIN_POOL_METRIC_01 table and so on.
The data source of each table is different (src0, src1 etc), how can I run these queries in parallel to improve performance?Thanks Mike.
The async function works, from the log, I could see the queries are executed in parallel.
but the behavior is confused, with same input, sometimes it gives me right result, some times(especially when there are few other applications running in the machine) it throws below exception:
java.lang.IllegalStateException
at weblogic.xml.query.iterators.BasicMaterializedTokenStream.deRegister(BasicMaterializedTokenStream.java:256)
at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.close(BasicMaterializedTokenStream.java:436)
at weblogic.xml.query.runtime.core.RTVariable.close(RTVariable.java:54)
at weblogic.xml.query.runtime.core.RTVariableSync.close(RTVariableSync.java:74)
at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
at weblogic.xml.query.runtime.core.IfThenElse.close(IfThenElse.java:99)
at weblogic.xml.query.runtime.core.CountMapIterator.close(CountMapIterator.java:222)
at weblogic.xml.query.runtime.core.LetIterator.close(LetIterator.java:140)
at weblogic.xml.query.runtime.constructor.SuperElementConstructor.prepClose(SuperElementConstructor.java:183)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.close(PartMatElemConstructor.java:251)
at weblogic.xml.query.runtime.querycide.QueryAssassin.close(QueryAssassin.java:65)
at weblogic.xml.query.iterators.FirstOrderIterator.close(FirstOrderIterator.java:173)
at weblogic.xml.query.runtime.core.QueryIterator.close(QueryIterator.java:146)
at com.bea.ld.server.QueryInvocation.getResult(QueryInvocation.java:462)
at com.bea.ld.EJBRequestHandler.executeFunction(EJBRequestHandler.java:346)
at com.bea.ld.ServerBean.executeFunction(ServerBean.java:108)
at com.bea.ld.Server_ydm4ie_EOImpl.executeFunction(Server_ydm4ie_EOImpl.java:262)
at com.bea.dsp.dsmediator.client.XmlDataServiceBase.invokeFunction(XmlDataServiceBase.java:312)
at com.bea.dsp.dsmediator.client.XmlDataServiceBase.invoke(XmlDataServiceBase.java:231)
at com.ebay.rds.dao.SOAMetricDAO.getMetricAggNumber(SOAMetricDAO.java:502)
at com.ebay.rds.impl.NexusImpl.getMetricAggNumber(NexusImpl.java:199)
at com.ebay.rds.impl.NexusImpl.getMetricAggNumber(NexusImpl.java:174)
at RDSWS.getMetricAggNumber(RDSWS.jws:240)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:371)
below is my code example, first I get data from all the 12 queries, each query is enclosed with fn-bea:async function, finally, I do a group by aggregation based on the whole data set, is it possible that the exception is due to some threads are not returned data yet, but the aggregation has started?
the metircName, serviceName, opname, and $soaDbRequest are simply passed from operation parameters.
let $METRIC_RESULT :=
fn-bea:async(
for $SOA_METRIC in ns20:getMetrics($metricName,$serviceName,$opName,"")
for $SOA_POOL_METRIC in src0:SOA_1MIN_POOL_METRIC()
where
$SOA_POOL_METRIC/SOA_METRIC_ID eq fn-bea:fence($SOA_METRIC/SOA_METRIC_ID)
and $SOA_POOL_METRIC/CAL_CUBE_ID ge fn-bea:fence($soaDbRequest/ns16:StartTime)
and $SOA_POOL_METRIC/CAL_CUBE_ID lt fn-bea:fence($soaDbRequest/ns16:EndTime )
and ( $SOA_POOL_METRIC/SOA_SERVICE_ID eq fn-bea:fence($soaDbRequest/ns16:ServiceID)
or (0 eq fn-bea:fence($soaDbRequest/ns16:ServiceID)))
and ( $SOA_POOL_METRIC/POOL_ID eq fn-bea:fence($soaDbRequest/ns16:PoolID)
or (0 eq fn-bea:fence($soaDbRequest/ns16:PoolID)))
and ( $SOA_POOL_METRIC/SOA_USE_CASE_ID eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)
or (0 eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)))
and ( $SOA_POOL_METRIC/ROLE_TYPE eq fn-bea:fence($soaDbRequest/ns16:RoleID)
or (-1 eq fn-bea:fence($soaDbRequest/ns16:RoleID)))
return
$SOA_POOL_METRIC
fn-bea:async(for $SOA_METRIC in ns20:getMetrics($metricName,$serviceName,$opName,"")
for $SOA_POOL_METRIC in src1:SOA_1MIN_POOL_METRIC()
where
$SOA_POOL_METRIC/SOA_METRIC_ID eq fn-bea:fence($SOA_METRIC/SOA_METRIC_ID)
and $SOA_POOL_METRIC/CAL_CUBE_ID ge fn-bea:fence($soaDbRequest/ns16:StartTime)
and $SOA_POOL_METRIC/CAL_CUBE_ID lt fn-bea:fence($soaDbRequest/ns16:EndTime )
and ( $SOA_POOL_METRIC/SOA_SERVICE_ID eq fn-bea:fence($soaDbRequest/ns16:ServiceID)
or (0 eq fn-bea:fence($soaDbRequest/ns16:ServiceID)))
and ( $SOA_POOL_METRIC/POOL_ID eq fn-bea:fence($soaDbRequest/ns16:PoolID)
or (0 eq fn-bea:fence($soaDbRequest/ns16:PoolID)))
and ( $SOA_POOL_METRIC/SOA_USE_CASE_ID eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)
or (0 eq fn-bea:fence($soaDbRequest/ns16:UseCaseID)))
and ( $SOA_POOL_METRIC/ROLE_TYPE eq fn-bea:fence($soaDbRequest/ns16:RoleID)
or (-1 eq fn-bea:fence($soaDbRequest/ns16:RoleID)))
return
$SOA_POOL_METRIC
... //12 similar queries
for $Metric_data in $METRIC_RESULT
group $Metric_data as $Metric_data_Group
by $Metric_data/ROLE_TYPE as $role_type_id
return
<ns0:RawMetric>
<ns0:endTime?></ns0:endTime>
<ns0:target?>{$role_type_id}</ns0:target>
<ns0:value0>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE0)}</ns0:value0>
<ns0:value1>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE1)}</ns0:value1>
<ns0:value2>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE2)}</ns0:value2>
<ns0:value3>{fn:sum($Metric_data_Group/METRIC_COMPONENT_VALUE3)}</ns0:value3>
</ns0:RawMetric>
could you tell me why the result is unstable? thanks! -
How to preload sound into memory to improve performance?
Hello all
I have an application where it needs to play 4 different short wave files on some events. The wave files are small (less then 1 sec each) so they can be preloaded into memory. But I don't really know how to do that.. This is my current code... Performance is really important here, so the faster users can hear the sounds, the better...
import java.io.*;
import javax.sound.sampled.*;
import javax.swing.*;
import java.awt.event.*;
public class PlaySound implements ActionListener
private Clip clip = null;
public void play(String name)
if (clip != null)
clip.stop();
clip = null;
loadClip(name);
clip.start();
private void loadClip(String fnm)
try
AudioInputStream stream = AudioSystem.getAudioInputStream(new File(fnm + ".wav"));
AudioFormat format = stream.getFormat();
DataLine.Info info = new DataLine.Info(Clip.class, format);
if (!AudioSystem.isLineSupported(info))
JOptionPane.showMessageDialog(null, "Unsupported sound line", "Warning!", JOptionPane.WARNING_MESSAGE);
else
clip = (Clip) AudioSystem.getLine(info);
clip.open(stream);
stream.close();
catch (Exception e)
JOptionPane.showMessageDialog(null, "loadClip E: " + e.toString(), "Warning!", JOptionPane.WARNING_MESSAGE);
public static void main(String[] args)
play("a wav file name");
} I would appreciate it if someone can point out how I can preload them to improve performance... Thanks in advance!The message above should be:
OMG, me dumb you smart Florian...
Thank you for your suggestion... It's not the best OR anything close to what I thought it would be, it's certainly one way to do it and better then what I've got now...
Thanks again Florian, I really appreciate it!!
BTW, is there anything that would produce the sound faster then this?
Message was edited by:
BuggyVB -
How to use DTP in process chin(Master data)
Hi,
for Master data loding process chain Iam using dtp s like s below
Delete psa
Load onfo pak
Dtp
is this correct process or not
Delete Psa (master data) is correct or not ?
wht is the correct way ?Hi........
For this the steps what evertone have alrady said is perfectly ok...........
But if you use delta DTP.............it will also solve your problem...............
ie............
Load data till PSA throug Infopackage >> Then use delta DTP to load it to onfoobject ...........then it will aways bring the latest request >> Then attribute change run...........
Regards,
Debjani...........
Edited by: Debjani Mukherjee on Sep 10, 2008 1:44 PM -
How to use hints in Obiee to increase performance
Anybody please tell me how can we use hints to increase performance of ad hoc and dashboard reports in obiee
Hi,
Check this,
http://www.howtoexam.com/index.php?option=com_content&view=article&id=75%3Ausing-hints-in-obiee-rpd-and-answers&catid=790%3Acomputers-and-software&Itemid=166
Rgds,
Dpka -
How to Download external MIDI Library to improve performance in Logic Pro 7
MIDI files are on desktop. For test run, used Logic Pro 7 File>Import>Open file type MIDI files. Found song.mid in Applications file, downloaded to song#.Iso Arrange Score, no sound, though meters activated.
What is #.Iso Or is it #.1so?
Extensive trying to make it work and reading of manuals, and online manuals were of no help so I'm here for help.
Most Sincerely,
lakesidetrombone, a dinosaur
Mac Book Pro
Logic Pro 7.2.3
Finale 3.0 to 2007
Korg Trinity Pro
Yamaha SY77
Mackie CR1604-VLCHi,
Hit the Caps Lock key.
J. -
Hi Experts,
How can we improve the performance of the select with out creating an secondary index?
In my select query am not using primary fields in where condation.
so i want to know that how can we improve the performance .
one more thing is that if we r creating secondary index what are the disadvantages of that?
Thanks & Regards,
Amit.If you select from a table without using an appropriate index or key, then the database will perform a table scan to get the required data. If you accept that this will be slow but must be used, then the key to improving performance of the program is to minimise the number of times it does the scan of the table.
Often the way to do this is not what would normally be counted as good programming.
For example, if you SELECT inside a loop or SELECT using FOR ALL ENTRIES, the system can end up doing the table scan a lot of times because the SQL is broken up into lots of individual/small selects passed to the database one after the other. So it may be quicker to SELECT from the table into an internal table without specifying any WHERE conditions, and then delete the rows from the internal table that are not wanted. This way you do only a single table scan on the database to get all records. Of course, this uses a lot of memory - which is often the trade off. If you have a partial key and are then selecting based on non idexed fields, you can get all records matching the partial key and then throw away those where the remaining fields dont meet requirements.
Andrew -
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 KumarThank 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 -
I have used several apple app and itunes gift cards to purchase apps and music with no problem. Codes were entered as required. Is it possible to get a printout of the card amount and codes to check against purchases. My total is not jiving.
No, you can't see a list of card redemptions, nor how items were billed - all you can do is view your account's purchase history via your computer's iTunes : log into your account on your computer's iTunes via the Store > View Account menu option, you should then see a Purchase History section with a 'see all' link to the right of it. Click on that and you should then see a list of your purchases.
Maybe you are looking for
-
Document prints in reverse, what setting can I change to correct this?
Document prints in reverse, what setting can I change to correct this? Not a printer problem - documents print in correct order when using other programs. Using Acrobat X Pro on a Mac.
-
Office 2007 Inbox repair tool for Outlook
Running Office 2007 Windows 7 64bit received this error but program wont open for me to follow its suggestion. "Can not open errors have been detected close and then use the inbox repair tool scanpst.exe"Warrior57
-
ITunes 10.7.0.21 not working
1. Says registry keys missing 2. can't see iphone 3. Can't save library. Have done all of below repeatedly over the last week: General installation troubleshooting 1. Empty your Temp directory and restart 2. Completely remove iTunes and related compo
-
Shorcut key to print current page
hi everyone,when viewing a page,is there any shortcut key that i can press to print the current page automatically without going through print(in the taskbar) - current page - ok.
-
Yellowish filter when opening iMovie projects created by the iMovie 4 or 5
I open the old iMovie project created by version 4 (maybe 5), in iMovieHD. There is a warning telling me that "The project was saved with an older version of iMovie. Opening it in this version will cause it to be upgraded, which will make it unreadab