How to use auto-increment and search option for MS Access DB

Dear All,
           I have configured our invoice in Adobe Livecycle and connected it to MS Acess 2007 as per http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/.
All is working fine, I can insert, retrieve data from DB to invoice and vice versa.
Now I want few things to be implemented on our invoice.
When ever I open our invoice, it populate the first entry from DB, Is it possible to populate the last entry ?
Auto increment invoice number from MS Access DB every time we open our invoice after save.
How to implement search option from DB for invoice number ?
Please let me know if someone can provide me help on my scenario, so that I can share more stuff related to invoice and DB.
Look forward to hearing soon from experts and other team members.
Thanks & Regards
Riyad...

As far as I know there is not any auto increment data type in Oracle. Instead of this you should create a sequence and get the next value of the sequence while creating a row in your table.
CREATE SEQUENCE Test_Sequence ;
CREATE TABLE Test_Table ( Id NUMBER , Foo VARCHAR2(4) ) ;
ALTER TABLE Test_Table ADD CONSTRAINT Test_Table_PK_Id PRIMARY KEY ( Id ) ;
INSERT INTO Test_Table ( Id , Information ) VALUES ( Test_Sequence.NEXTVAL , 'FOO' ) ;

Similar Messages

  • How to set the Mail and Fax options  for the Smartforms ???

    How to set the Mail and Fax options  for the Smartforms ??? Please reply me very soon. Its a life deciding question now for me. Please .

    >
    veera Karthik wrote:
    > How to set the Mail and Fax options  for the Smartforms ??? Please reply me very soon. Its a life deciding question now for me. Please .
    Hi
    Check this Link:
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm
    P.S: Never say reply me soon....people answer you here voluntarily and as everyone has their own desk to manage...sp replies may late or early..depending upon the availabality of the members.
    Vishwa.

  • How to use "Auto increment" in temp table Oracle

    Pleas tell me yaar,
    In MS Sql for Auto increment i am using like this "seqid int identity" for temp table
    t_seq_tbl table(seqid int identity,EVENT_SEQ_NO varchar(30))
    In oracle how to use....

    As far as I know there is not any auto increment data type in Oracle. Instead of this you should create a sequence and get the next value of the sequence while creating a row in your table.
    CREATE SEQUENCE Test_Sequence ;
    CREATE TABLE Test_Table ( Id NUMBER , Foo VARCHAR2(4) ) ;
    ALTER TABLE Test_Table ADD CONSTRAINT Test_Table_PK_Id PRIMARY KEY ( Id ) ;
    INSERT INTO Test_Table ( Id , Information ) VALUES ( Test_Sequence.NEXTVAL , 'FOO' ) ;

  • How to use auto incremented tabe to create a CMP Entity Bean

    hi,
    I want create a CMP entitybean with an auto incremented table in
    Oracel. So I need to know
    - how to create a table with an auto-incremented field in oracel and
    - how to change the create() method according to that.
    I am using Sun studio enterprise for EJB developing.
    kaushalya

    For auto increment in Oracle you should use Sequence/Trigger combination.
    And useful thread from EJB forum:
    http://forum.java.sun.com/thread.jspa?forumID=13&threadID=478783

  • How do I specify folder and file options for memory cards in LR4?

    Hello!
    I have read the sections Set import and file-handling preferences and Specify Auto Import settings in the manual. But they don't seem to answer my question. The other stuff that's written about importing files in Lightroom seem to only cover the import of photos to the Lightroom catalog, which is not my primary concern, although I do want them imported to the catalog as well. But before the photos can go to the Lightroom catalog they need to be improted, in other words copied over from the memory card to the local disk drive. Simply put, all I want is for Lightroom to take over the responsibility from Canon EOS Utility and behave the same way when importing/copying files to the local disk drive. How do I set up Lightroom to do just that?
    I just want this type of folder and file structure:
    J:\2010_08_02\IMG_0037.JPG
    J:\2010_08_02\IMG_0039.JPG
    J:\2010_08_22\IMG_0372.CR2
    J:\2010_08_22\IMG_0372.JPG
    J:\2010_11_29\IMG_1405.CR2
    J:\2010_11_29\IMG_1405.JPG
    J:\2011_06_17\IMG_2887.CR2
    J:\2011_06_17\IMG_2887.JPG
    ... etc!
    1. First things first, where the heck do I specify the destination folder for new photos?
    There is an option titled Show import dialog when a memory card is detected under the General tab in Preferences, but there is no folder destination option associated with this.
    2. How do I tell Lightroom to leave original file names as they are (i.e. IMG_2887.CR2) and place them in a new sub-folder (i.e. 2011_06_17) of the destination folder (J:\) named after the capture date of the photo (July 17, 2011)?
    There are a few options under the File Handling tab in the Preferences, but they don't seem to concern the importation of files to the local disk drive.
    3. This maybe should have been the first question really; is Lightroom capable of importing files from the camera or a card reader to the local disk drive at all?
    I sure would expect it to be able to do that, but from the looks of it I am not too confident about that.
    For starters I would like it to just copy my photo files, either directly from camera or from a card reader to a destination folder of my choice, in the same fashion that Canon EOS Utility does it. I don't wat to just import the files to the Lightroom catalog and start working with the files directly from camera or memory card. Hell no! It's not an external disk drive for God's sake!
    Please advise!

    I'm not sure how it is now, but there used to be a dedicated "photo downloader" in Adobe Photoshop Elements at least up to version 6. Is this still part of Photoshop Elements? Or is it just available in Adobe Bridge? I don't remember though if it only imported files to the local disk drive or if it also added them to the library/catalog.
    I've tested Downloader Pro and Lightroom 4 now for importing the photos to local disk drive. I also tested one application called Cam2PC Image Downloader.
    The latter is actually called Cam2PC Image Browser and as its name suggests it's a software for browsing and doing basic changes to the photos, an image organizer. But it has a dedicated downlaoder called Cam2PC Image Downloader that can be very useful for importing photos. It comes either as a payed version or a freeware version.
    I also tested one called Smart Photo Import. This one could be a good alternative to Downloader Pro, but I think it still needs many improvements, and it lacks a lot of the functionality of Downloader Pro. But to be fair, this does cost half as much as Downloader Pro (13 EUR or 17 USD compared to 30 USD).
    I am most impressed by Downloader Pro. It has everything I could ask for really. But I was most impressed by its speed. I've done a simple speed test to see which one is faster and here are the results.
    Downloader Pro
    324 files (162 JPG & 162 CR2)
    Max speed: 21,25 MB/s
    Time: 02:58.6
    Lightroom 4
    Set to render "Standard" previews
    324 files (162 JPG & 162 CR2)
    Max speed: N/A
    Time: 03:41.7
    Compared to Downloader Pro: 78% done at 02:58.6
    Rendering time: 04:35.5
    Total: 08:16.12
    Cam2PC Image Downloader
    324 files (162 JPG & 162 CR2)
    Max speed: N/A
    Time: 03:30.6
    The max speed is the maximum transfer speed that ever occured during the transfer, and this is not something that the application is showing on it's own, it's the highest speed that I have seen with my own eyes. Unfortunately the other applications had no way of showing the speed, only Downloader Pro could show the speed. That's why it says N/A (as in not available).
    As you can see Downloader Pro did the same job in shortest amount of time. Note that I could be transfering 2 or 3 cards worth of photos for the time it takes Lightroom to transfer just one.
    The memory card was full when I started the test. It was a 4 GB Sandisk Ultra 30 MB/s card. The card reader was a Lexar USB 3.0 Professional. Although it was connected to a USB 2.0 port on Intel chipset motherboard (Intel X38, ICH9R). The destination folder was set to Desktop\(name of the application) on a Seagate 500 GB SATA (ST3500320AS) disk. All done on a Windows Vista PC with SP2.
    One way to make Lightroom do this job more quickly is to choose "minimum" as previews rendering option. This way it doesn't spend as much time rendering the photos after being copied to the disk drive. Now, I have not tested this but I believe that Lightroom can start a second import of a second memory card whilst the first one is being copied. I'm not sure how it would affect the speed though, and you would need two card readers for this.
    I wish I could skip rendering previews alltogether. I like to leave adding photos to the catalog and rendering previews for the last step. This is because it takes so long time and I like to use 1:1 previews, so I like leaving Lightroom to do this job in the morning or over the night.
    I have learned to use prests now in the import dialog of Lightroom. So now it should not be a problem if I always want to copy new photos to the same location. If this location is changed I can recall it simply by choosing my preset. This is very handy.
    All in all, Lightroom is very good at importing photos from camera or from a memory card reader to the local disk drive. But it's now my preferred way of importing photos to the computer. Which is why I have decided to purchase Downloader Pro. Thanks all for your help. I appreciate it!

  • How to use auto increment with "nchar" data type

    Hello
    I have a table that I want the value in one column to be generated automatically with "T-XXX" pattern which
    "XXX" is a number. Can Microsoft SQL Server do that?

    Hello,
    Not directly.
    You could use an integer column with "Identity" and then add a calculated column to generate the required pattern, like
    'T' + convert(varchar, YourIntColumn)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Lync 2010 : Using same FQDN and IP address for SIP access Edge, Web Conferencing Edge, A/V Edge

    Hi Friends,
    Please assist on below query.
    Will it possible to use the same FQDN in Lync Edge? Since it has different Port numbers for each service, one public IP  for all FQDN for access will save me purchasing multiple Certificates for SANs
    FQDN
    IP Address
    Port
    Map to
    Sip.domain.com
    12.34.34.34
    5061 (TLS)
     SIP Access Edge
    Sip.domain.com
    12.34.34.34
    444(TLS
    Web Conferencing Edge
    Sip.domain.com
    12.34.34.34
    443(TCP
    A/V Edge
    I have a wildcard SSL purchased already and for this purpose I need to purchase more certificates per SAN if unique FQDN required.
    Thank You.

    Yes, although a wildcard entry only will not work entirely for all Lync clients and versions.
    I would suggest something like this:
    Edge External
    CN: sip.domain.com
    SAN: sip.domain.com, webconf.domain.com
    Reverse Proxy Listener(s)
    CN: lyncwebexternal.domain.com
    SAN: lyncwebexternal.domain.com, *.domain.com
    The wilcard entrty can replace the SimpleURLs (meet, dialin) but some clients (like any Lync Phone Edition devices prior to the June 2012 firmware) do not support wildcard entries so providing the external web services FQDN is required.  also never
    put the wildcard etry in the Common Name as devices/client that do not support wildcard entries may be tripped up there and then never even look at the SAN field.
    A cheaper alternative (although not typically recommended, this does work) would be to use a single certificate for both servers, like this:
    Edge/RP Combo Cert
    CN: sip.domain.com
    SAN: sip.domain.com, webconf.domain.com, lyncwebexternal.domain.com, *.domain.com
    Jeff Schertz | Microsoft Solutions Architect - Polycom | Lync MVP

  • How do I prevent browsing and search data from being forwarded to Google by Mozilla, while still using Mozilla's Firefox as my default browser?

    I do enjoy using Mozilla's Firefox as my default browser, BUT, I don't enjoy the details of my life, to include my Internet activity, to be archived by Google, or anyone else, via Mozilla's/Firefox's sharing of my Internet browsing and/or search engine activity with any aspect or facet of the Google organization. With all of this said, my question is, "How do I prevent browsing and search data from being forwarded to Google by Mozilla, while still using Mozilla's Firefox as my default browser?"

    Firefox's default behavior includes no automatic interaction with Google.
    We do use Google as default search engine and to report web forgery in the 'help' menu, but no data are sent to Google without your knowledge, and you can change your preferred search engine at will.
    However many websites themselves make use of Google Ads which do cause interaction with Google when you load the webpages. This is visible in status bar and happens in any browser. The [https://addons.mozilla.org/en-US/firefox/addon/noscript NoScript] add-on for Firefox can largely save you from this problem.
    If you see things happening otherwise, please reply with details on what you see.

  • Webinar: Understanding TREX Indexing and Search Options

    <b>SAP NetWeaver Know-How Network Webinar: 
    Understanding TREX Indexing and Search Options
    Wednesday 25 August 2004
    11 a.m. EDT</b>
    On Wednesday 25 August, Larry Brambrut, an EP RIG Consultant, hosts the webinar titled  <b>Understanding TREX Indexing and Search Options</b> as part of the ongoing SAP NetWeaver Know-How Network Webinar Series.
    Here’s how Larry describes his webinar presentation:
    “This session will describe the enhancements to "Search and Classification"(TREX) in NetWeaver '04 and EP 6.0 SP2 Patch 6. The session will include a discussion of the CM enhancements such as new crawlers, new search UI options and plug-ins, and TREX enhancements such as the new TREX architecture, delta indexing, and new TREX Admin Tool.”
    SDN invites you to post your questions to the presenter prior to the webinar and continue the online discussion afterward.
    <b>How to Participate</b>
    (Please go to the SDN webinar schedule page to find more information)
    Dial-in Information:
    Date: Wednesday 25 August 2004
    Time: 11 a.m. EDT
    Within the U.S., call: +1.888.428.4473
    Outside the U.S., call: +1.651.291.0618
    Password: NetWeaver04
    WebEx Information:
    Topic: SAP NetWeaver Know-How Network
    Date: Wednesday 25 August 2004
    Time: 11 a.m. EDT
    Meeting Number: 742391500
    Meeting Password: netweaver04 (lowercase)
    WebEx Link: sap.webex.com
    Replay Information:
    A recorded replay of this call will be available for approximately three months after the webinar. Access this recording by dialing the appropriate number and using the replay access code 720155.
    Toll-free: +1.800.475.6701
    International: +1.320.365.3844
    <b>
    About the SAP NetWeaver Know-How Webinar Series</b>
    The SAP NetWeaver Know-How Webinar Series is driven by the SAP NetWeaver Regional Implementation Group (RIG), part of the SAP Development organization. The mission of the SAP NetWeaver RIG is to enable customers, employees, and partners to successfully implement the SAP NetWeaver solution. This SAP RIG has expertise in BI, EP, XI, and WebAS. They contribute their implementation expertise to the SDN implementation forums as well as to the SAP NetWeaver Know-How Webinar Series.
    <b>Disclaimer</b>
    SDN is not responsible for any changes to the webinar schedule. The webinar schedule may be changed or cancelled without prior notice.

    Hi there,
    I just read this thread, and maybe someone here can answer my current trex question:
    I have created an ordinary CM repository, and created an index with this repository as source. Now the problem: I would like to exclude files in the repository with specific mimetypes from the TREX indexing process.
    I have verified that the TrexValidMimetypes.ini does not contain any reference to the Mimetypes I'm creating, but never the less, the document titles are searchable and are returned when searching.
    How do I get around this issue?
    Is it possible in NW04 or EP6.0 SP3 PXXX??
    Regards,
    Hco

  • How to use FlashIsland.EVENT_BEGIN_UPDATE and FlashIsland.EVENT_END_UPDATE

    Hi All,
      I am traying to get value from SAP into Flex component, i am trying to find out where exactly its filling up the array in Flex component and i am unable to figure it out. i am getting values into flex component i can see them but when i am debugging the same i am not able to find where its putting values into array in flex builder debuggin mode.
      if anybody can explain me how to use FlashIsland.EVENT_BEGIN_UPDATE and FlashIsland.EVENT_END_UPDATE . i dont know if there is any documentation on the event available for FlashIsland class.
              public function Search(): void{
                  var Objid:String = OBJID.text as String;
                   FlashIsland.fireEvent(this, "Search",{OBJECT_ID:Objid});
    will appreciate any reply.
    Mani

    I have seen that there is some bug in the early versions of the FlashIsland library where the EVENT_*_UPDATE events don't work.  I saw an internal note the other day that this was fixed in newer (and shipping) versions of the library.
    The code for the registration of the event should be:
    FlashIsland.addEventListener(FlashIsland.EVENT_END_UPDATE, handleEndUpdate);
    However I find that the better approach is to use public GET/SET functions as the bindings to the Web Dynpro Context.  This way you get Flex code that fires automatically whenever the Web Dynpro Context data changes.  This would be the prefered way of passing "events" from WD to the Flex code.

  • How to create process chains,and how to use process like and or xor

    Hi,
    How to create process chains,and how to use process like and or xor.
    can any one please give me a example in each.
    Thanks,
    cheta.

    Hi Cheta,
    Here is step by step procedure to create process chains
    Process chain is nothing but executing a process ..(or) loading the data any process we can do in background.. that means.. automatically we can execute our process based on Time or any event..
    Creating Process Chains
    Prerequisites
    If you want to include a load process in the process chain, you need to have already created an InfoPackage.
    You cannot load flat file data from a client workstation in the background. For this reason, you have stored your data on an application server.
    Creating Process Chains
    You have the option of creating a process chain in the process chain maintenance screen directly or by using a maintenance dialog for a process:
    Creating a Process Chain Directly in the Process Chain Maintenance Screen
    You are in the BW Administrator Workbench.
    1. Click on the Process Chain Maintenance icon in the AWB toolbar.
    The Process Chain Selection dialog window appears.
    2. Choose Create.
    3. Enter the technical name and a description of the chain, and confirm your entry.
    The Add Start Process dialog window appears.
    4. Create a variant for a start process.
    1. a. On the Maintain Start Process screen, choose whether you want to schedule the chain directly or whether you want to start it using a metachain.
    2. b. If you choose to schedule the chain directly, enter the start date value for the chain under Change Selections and save your entries.
    The Maintain Start Process screen appears again.
    3. c. Save your entries, return to the previous screen and confirm your entries in the Add Start Process dialog window.
    You are taken to the Plan View of the process chain maintenance screen.
    In the left-hand area of the screen, a navigation area is displayed. In the right-hand area of the screen, the process chain is displayed.
    5. Use the drag-and-drop function to add the relevant processes into your process chain.
    You use the Process Types function to select the processes. This sorts the process types according to different categories. You can also call up InfoPackages and processes for the data target from the separate InfoSources and Data Targets navigation trees.
    Hope this helps
    Regards
    Karthik

  • 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

  • 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.

  • How to use SQL OVER and PARTITION BY in OBIEE Expression Builder??

    Hi there,
    I want to create a new logical coulmn with the following SQL query.
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )
    How to use the OVER and PARTITION BY in OBIEE Expression Builder??
    Thanks in Advance

    hi bipin,
    We cant use by in Expression builder(rpd) .But use the same formula like this in Fx of answers
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) >OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )SUM(Inventory Detail.Qty by Detail,ITEM,Mydate)/SUM(qty by detail,item)
    First check the numerator whether it was giving correct results or not then go with denominator
    compare the results with sql that u have
    Let me know if that does work
    thanks,
    saichand.v
    Edited by: Saichand Varanasi on Jul 27, 2010 9:27 PM
    Edited by: Saichand Varanasi on Jul 27, 2010 9:28 PM

  • How to find the size and resolution option in the aspect ratio drop down menu for the crop tool

    while looking through certain tutorials on the new crop system i came across many that referenced the above mentioned size and resolution option in the  access ratio drop down menu.  They all mention a dialog box which then appears which looks really useful, however my version doesnt have this option. any help would be appreciated.

    Trevor.Dennis wrote:
    John, are there already differences?  I thought 13.1 was mainly about retina display support, but I guess there would also be other fixes released while they were at it.
    Yes, definitely already differences. I sympathize with Photoshop instructors (online and offline).
    The headline change was Retina support but that was also made available to non-Cloud versions.
    Other Cloud-only changes in 13.1 are listed here
    http://helpx.adobe.com/photoshop/using/whats-new.html
    http://psd.tutsplus.com/articles/news/cs6_1/
    Non-Cloud CS6 users have been very vocal and disgruntled about some of these changes.

Maybe you are looking for