Rows are not inserted in the order entered - Forms 4.5 to 9i database
hi
we are using forms 4.5 version with 9i oracle database.
when we save a multi-record block (for eg 5 rows)
the records are not inserted in the database in the
order in which they are entered.
for eg if we enter A,B,C,D,E Records and save
on query the records appearing in the order of C,D,E
A,B like that.
Is there any database parameter or setting which
effects the order of inserting rows in the database(when using forms 4.5).
Pls inform if you have any solution.
Thanks in advance
cks
This is a very common misconception.
You should never concern yourself about the order in which rows are stored in the database. Oracle does not guarantee to return rows in any particular order so you must specify an order by clause when you select the rows.
Without an order by clause, there are various reasons why the order of selected rows could change in different circumstances, and the order in which they are stored should be treated as irrelevant.
Similar Messages
-
I'm on a windows laptop using iTunes sharing through the family to connect with Apple TV.
After choosing the folder of photos to be shared and displayed on the appletv and when I choose to show on screen, they are not shown in the order they are in the original folder.
How to pair show in a certain order, for example, sorted by name.
grateful
Julio CesarNot that I'm aware of. You just export JPEG copies to a folder that you can point iTunes to. For instance, I have created a folder in my Pictures folder called Apple TV. And within that folder I have other folders of pictures that I can choose from in iTunes to share with Apple TV. But there doesn't seem to be any way to share a Lightroom slideshow. If you have laid to create a video file that would probably work. Apple TV is a little clunky in my opinion. Some things are a little more difficult to do now than they were a while back. I probably haven't provided you with much help, but just keep experimenting and I think you will figure it out.
-
Rules in Outlook are not processed in the order listed
I have created a new rule today to filter out all email that is not directly sent to me to a folder called "process later" hanging off "Inbox"
Problem is, even thou it is the last rule created, and appears to be at the bottom of the list, this seems to be the first rule that is executed.
In order to fix, I need to go into "process later" folder and run all rules on it.
Is there a way to fix this, w/o trying to re-create all the rules (I have like 40-50).I have same issue where rules are not processed in the order they are written. All rules are "Client Only". I sort email based on the information contained in the subject line. Some should get filed into sub folders, some in the
parent. So, I have a folder called QA and a sub-folder called QA-Project 1.
#1 rule -- processes subject line looking for QA-Project 1 and puts it in QA-Project 1 folder
#2 rule -- processes subject line looking only QA and puts it in QA folder
Problem is when I run both these rules, the email with subject "QA-Project 1" ends up in the QA folder and not the QA-Project 1 Folder. So the rules are not processing sequentially. Please help. -
Created a trigger but new values are not inserting in the backup table
I have created a backup table and writter a trigger on a table such that after update old values and new values are to be inserted into the backup table, but new values are not inserting. I am giving the code please help me
create or replace trigger "SUPPQUOTES_AUDIT"
after update or delete on phsuppquotes for each row
begin
insert into phquotes_audit(cprc_new,suppcode,itemcode,cprc_old,negodt,validdt,userid,TRANDATE) values
(:new.cprc,:old.suppcode,:old.itemcode,:old.cprc,:old.negodt,:old.validdt,:old.userid,SYSDATE);
end;old values and new
values are to be inserted into the backup table, butwell you have only one insert there, inserting old values with a new id (which is ok if you don't update the id column, but I don't think that :new is available for deleting ops); you should have two inserts:
insert into
phquotes_audit(cprc_new,suppcode,itemcode,cprc_old,negodt,validdt,userid,TRANDATE) values (:old.cprc,:old.suppcode,:old.itemcode,:old.cprc,:old.negodt,:old.validdt,:old.userid,SYSDATE);
if (updating) then
insert into phquotes_audit(cprc_new,suppcode,itemcode,cprc_old,negodt,validdt,userid,TRANDATE) values (:new.cprc,:new.suppcode,:new.itemcode,:new.cprc,:new.negodt,:new.validdt,:new.userid,SYSDATE);
end if;
gojko adzic
http://gojko.net -
Record not inserting into the table through Forms 10g
Hi all,
I have created a form in 10g(10.1.2.0.2) based on just one table that has 4 columns(col1, col2, col3, col4).
Here col1, col2 and col3 are VARCHAR2 and col4 is date and all the columns are not null columns(There are no primary and foriegn key constrains, which means duplicates are allowed).
My form contains 2 blocks where block 1 has one text item (col1) and 3 buttons (Delete, Save, Exit).
And block2 is a database block and has col2,col3,col4 which are in tabluar layout frame displaying 10 records.
When the form is opened the cursor has to be in block1.col1 for querrying. Here i enter a value in col1, and then when I click on col2 in the block2, then I put execute_query in new_block_instance of block2, which displays the records.
The block2 properties are not updatable, insertable and query is allowed.
Everything is working good until here. But here in the block2 when I want to insert another record into the table, by navigating all the way down to the last empty record and entering the new values for col2, col3 and col4 And then Ctrl+S will display the message "*FRM-40400: Transaction complete: 1 record applied and saved.*" But actually the record is not inserted into the table.
I also disabled the col4 by setting the Enabled property to No, since while inserting new record the date have to be populated into it and it shouldnt be changed by the user. And im populating the sysdate into the new record by setting Intial Value property to *$$DATE$$*.
And another requirement which I could not work arround here is that, the col3 also should be populated with the username of the user while inserting.
please help me...Hi Sarah,
I do not want to update the existing record. So I kept Udate Allowed to No in property palette for the items in block2.
Do I have to do this property at block level also?
I'm inserting a new record here.
Edited by: Charan on Sep 19, 2011 8:48 AM -
Inserted rows are not sorted in ascending order
Hi,
in my code when i click on a button (UpdateSchedule) certain rows are displayed in the result table. My problem is the displayed data is not in ascending order I know by keeping sort enable on a particular field we can sort the data as req. But the first time the result which is displayed is not an ascending order , i want to tackle this issue.
As whatever rows are displayed are not yet committed in database so modifying the query using order by clause also wont solve the issue . This data gets committed on a click of another button(ok).Can this be tackle programmatically ?
I hope i have given proper elaboration of the issue.
Regards,
Anant.Reading this from Javadoc and understanding your requirement makes me feel that achieving it would not be easy, or may not be possible at all unless FWK provides some override to these rules.
Restrictions & limitations:
Sorting is performed by requerying the database.
May not work well with view objects (VOs) that contain custom 'expert-mode' SQL. Basically the VO.setOrderByClause() is invoked on the VO using the column name associated with this web bean. An alternative for 'expert-mode' SQL may involve overriding the view object setOrderByClause() and performing custom logic. Note: The orderByParameter will be the column name plus either " desc" or " asc".
Will not work with view objects that contain the view attribute expression "See the SQL...". To sort on these view attributes, modify the VO XML directly and change the view atttribute expression to the SQL column name.
Sorting is not allowed for tables that allow inserts.
Sorting is not supported for tables containing updateable columns (unless the updateable columns are mapped to transient VO columns.) No exception is thrown if the table contains updateable columns, since there may be a rare case when it makes sense, for example a table where the contents fit on one page.
Modified transient columns will be reset. This is normal and expected behavior.
Sorting is not supported on the 'Select' column - this is the first column of a table when it contains a checkbox or radio button.
The table bean will invoke the following two methods on the view object to perform sorting. Debugging can be performed by setting a break on these methods on the VO (or a superclass of the VO.)
viewObject.setOrderByClause(orderByClause);
viewObject.executeQuery();
Thanks
Tapash -
NB Type Planned orders are not Displayed in the Order Information System
Dear All
We have one material with Proc. type F.
We have entered a sales order for that item & run MRP ( MRP type PE)
No strategy is assigned to the material.
MRP has created a Plan Order which is of NB type & in MD04 it is showing SDEB against Plan Order.
Now we are not able to see this Plan Order in COOIS.
Although it is visible in MD04,MD16.
Can anyone tell me whether COOIS consider only those plan orders which are of E ( In house Prod ) category ?
How can we display that in COOIS ?
Abhishek GargDear,
COOIS is used for production orders or planned orders olny and it will show u Order information relevent to "E" type procurement.
You can use ME5A -
Urgent:-Values are not inserted into the custom table
Hi, I am inserting the data from the custom OAF form into a custom table. Only the WHO columns are populated into the table but no field value is populated into the custom table. I have written the following code -
In CO
if (pageContext.getParameter("Continue") != null)
OAApplicationModule am = pageContext.getRootApplicationModule();
OAViewObject CwkInfo = (OAViewObject)am.findViewObject("CWKInfoVO1");
am.invokeMethod("initializevo");
in AM
public void initializevo()
CWKInfoVOImpl testVo = (CWKInfoVOImpl) this.getCWKInfoVO1();
testVo.insertRow(testVo.createRow());
getTransaction().commit();
Urgent Help is required.
Regards,
AshishHi Ashish,
Double check whether you have attached the correct EO based VO attribute to the columns.
In the Controller
Process Request use the following code:-
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (!pageContext.isFormSubmission())
am.invokeMethod("initQuery", null);
ProcessForm Request
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
System.out.println("Inside Process Form Request");
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("submitButton")!=null)
am.invokeMethod("submit")
AM Code
public void initQuery()
OAViewObject vvo = (OAViewObject)getEmployeeEOVO1();//Give you EO based VO Name
if (!vvo.isPreparedForExecution())
vvo.executeQuery();
Row row = vvo.createRow();
vvo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
public void submit()
getTransaction().commit();
Import necessage classes.
Thanks
--Anil -
Rows are not inserting from Loop
Dear Friend,
This is nice to see the discussion forum from Oracle,
I have a problem with loop that after fetching columns into variables the only one row is inserting in the form not more than one.
For example: I select code 1 from LOV for insert its all record in the form but only one row is inserting.
Any comment will be appreciated.
Regards,
Zohaib.Hi,
Pls explain....
Jeneesh -
Maintenance Plan - Tasks are not executing in the order they were created
I've created a new maintenance plan to perform differential backups but the tasks I created don't necessarily seem to execute in order all the time. These are the tasks and order assigned when I created the plan using the Maintenance Plan Wizard:
Back Up Database (Differential)
Clean Up History
Maintenance Clean Up Task
Here's the deal...When it executes in the order they were created (above), all my old backups are deleted successfully. However, there have been instances where, for example, the Maintenance Clean Up task executes before the
Clean up History task. When this happens, only one of my backup files is deleted successfully but not the second (I have two .bak files needing to be removed). Furthermore, I noticed that the backup that wasn't deleted when it should
have gets deleted at the next increment when new backups are created.
Again, this does not happen when the tasks run in the sequence shown above. Only one old backup gets deleted (instead of two) when one of the above item is out of sequence. Strange behavior to say the least.
Any feedback on this will be appreciated!If you do not set up precedence constraints it runs all tasks at the same time.
Please see "8. To define a workflow between tasks:"
http://msdn.microsoft.com/en-us/library/hh710041.aspx -
Record is not inserting into the Table thourgh forms 10g
Hi All,
I have the form built in 10g(10.1.2.0.2).
Basically the form has 2 blocks.
Block 1 with only one item, where we enter some value and hit enter(this will navigate to block2 and execute the query).
Block 2(tabular) will fetch the records. Now this block2 have 3 columns(caseid, userid, date).
Now when I insert a new record, I just need to enter the caseid only. And userid and date have to be automatically populated.
I can populate the USERID and DATE fields.
And when I enter some value in caseid item of block 2, and then do Control+S(to insert the record and Save the transaction),
i get the message saying FRM-40400: Transaction complete: 1 records applied and saved.
But when I query again for the same, I dont se the record inserted into the table.
Why is this happening?
Help please...@ Inol
There is no promary or foriegn key relation ship. The form is fetching records from just one table. As I said block1 has col1. and Block2 has col2,3,4.
@Andreas
Yes I did select * from table, select count(*) from table in SQL*Plus. Nothing is inserted.
And one thing I have to tall here is, I have a ON-INSERT trigger in block2.
The code in ON-INSERT trigger is
-- :BLOCK2.DATE := TO_DATE(:DATE,'DD-MON-YYYY') ;
/* commented since I was populating date by assigning $$DATETIME$$ to the Initial value property of the data item. */
:BLOCK2.SOURCE_CASE := :BLOCK1.SOURCE_CASEID;Forgot to tell you,
Since I was inserting the record from block2(3 columns), to the table which has 4 columns, there is another item in block 2 which has the visible property No.
So the block 2 has 4 columns. And the hidden column will hold the value that is in the item of block1. This is what i'm pushing in the ON-INSERT trigger.
Edited by: Charan on Sep 20, 2011 1:51 PM -
Rows are not updating in the table..
I have a 2 EO objects and VO query which gets the data from 2 tables, now when i try to save a new row only primary key gets saved, can any one give me the solution for this
Also just check if you query contains external join of EOs, in that case you may get into issues!
--Mukul -
The row was not found at the Subscriber error keeps popup and stopped synchronization even after inserting missing record at subscriber - transcational replication.
first error throws: Grab exact sequence number, find row and inserted at subscriber...
Start synchronizing, ran fine for a while, stopped again with error with different exact sequence number, repeat again same as step 1.......
how can we stop this and make it run without this error?
Please advise!!!Hi,
This means that your database is out of sync. You can use the continue on data consistency error profile to skip errors. However, Microsoft recommends that you use -SkipErrors parameter cautiously and only when you have a good understanding of the following:
What the error indicates.
Why the error occurs.
Why it is better to skip the error instead of solving it.
If you do not know the answers to these items, inappropriate use of the
-SkipErrors parameter may cause data inconsistency between the Publisher and Subscriber. This article describes some problems that can occur when you incorrectly use the
-SkipErrors parameter.
Use the "-SkipErrors" parameter in Distribution Agent cautiously
http://support.microsoft.com/kb/327817/en-us
Here are two similar threads you may refer to:
http://social.technet.microsoft.com/Forums/en-US/af531f69-6caf-4dd7-af74-fd6ebe7418da/sqlserver-replication-error-the-row-was-not-found-at-the-subscriber-when-applying-the-replicated
http://social.technet.microsoft.com/Forums/en-US/f48c2592-bad7-44ea-bc6d-7eb99b2348a1/the-row-was-not-found-at-the-subscriber-when-applying-the-replicated-command
Thanks.
Tracy Cai
TechNet Community Support -
Line 390 Under the (Insert into SALES_TRADEIN Table)
I need to insert (TradeIn_1_VIN) Values If there is no values in (TradeIn_1_VIN) then i have to insert (TradeIn_2_VIN) values to the (SALES_TRADEIN) Table.
After i run then below script only (TradeIn_2_VIN) values are get inserted in the table. (TradeIn_1_VIN) are not getting loaded in to the table.
I think there is the problem from Line No (404 to 414) Please help me change those particular lines to insert (TradeIn_1_VIN) Values also.If there is no details then (TradeIn_2_VIN) need to be inserted.
-- =============================================
-- Stored Procedure for Flatfile_Sales
-- =============================================
USE [IconicMarketing]
---==========Sales_Cursor
--USE [IconicMarketing]
--GO
DECLARE
@FileType
varchar(50),
@ACDealerID
varchar(50),
@ClientDealerID
varchar(50),
@DMSType
varchar(50),
@DealNumber
varchar(50),
@CustomerNumber
varchar(50),
@CustomerName
varchar(50),
@CustomerFirstName
varchar(50),
@CustomerLastName
varchar(50),
@CustomerAddress
varchar(50),
@CustomerCity
varchar(50),
@CustomerState
varchar(50),
@CustomerZip
varchar(50),
@CustomerCounty
varchar(50),
@CustomerHomePhone
varchar(50),
@CustomerWorkPhone
varchar(50),
@CustomerCellPhone
varchar(50),
@CustomerPagerPhone
varchar(50),
@CustomerEmail
varchar(50),
@CustomerBirthDate
varchar(50),
@MailBlock
varchar(50),
@CoBuyerName
varchar(50),
@CoBuyerFirstName
varchar(50),
@CoBuyerLastName
varchar(50),
@CoBuyerAddress
varchar(50),
@CoBuyerCity
varchar(50),
@CoBuyerState
varchar(50),
@CoBuyerZip
varchar(50),
@CoBuyerCounty
varchar(50),
@CoBuyerHomePhone
varchar(50),
@CoBuyerWorkPhone
varchar(50),
@CoBuyerBirthDate
varchar(50),
@Salesman_1_Number
varchar(50),
@Salesman_1_Name
varchar(50),
@Salesman_2_Number
varchar(50),
@Salesman_2_Name
varchar(50),
@ClosingManagerName
varchar(50),
@ClosingManagerNumber
varchar(50),
@F_AND_I_ManagerNumber
varchar(50),
@F_AND_I_ManagerName
varchar(50),
@SalesManagerNumber
varchar(50),
@SalesManagerName
varchar(50),
@EntryDate
varchar(50),
@DealBookDate
varchar(50),
@VehicleYear
varchar(50),
@VehicleMake
varchar(50),
@VehicleModel
varchar(50),
@VehicleStockNumber
varchar(50),
@VehicleVIN
varchar(50),
@VehicleExteriorColor
varchar(50),
@VehicleInteriorColor
varchar(50),
@VehicleMileage
varchar(50),
@VehicleType
varchar(50),
@InServiceDate
varchar(50),
@HoldBackAmount
varchar(50),
@DealType
varchar(50),
@SaleType
varchar(50),
@BankCode
varchar(50),
@BankName
varchar(50),
@SalesmanCommission
varchar(50),
@GrossProfitSale
varchar(50),
@FinanceReserve
varchar(50),
@CreditLifePremium
varchar(50),
@CreditLifeCommision
varchar(50),
@TotalInsuranceReserve
varchar(50),
@BalloonAmount
varchar(50),
@CashPrice
varchar(50),
@AmountFinanced
varchar(50),
@TotalOfPayments
varchar(50),
@MSRP varchar(50),
@DownPayment
varchar(50),
@SecurityDesposit
varchar(50),
@Rebate
varchar(50),
@Term varchar(50),
@RetailPayment
varchar(50),
@PaymentType
varchar(50),
@RetailFirstPayDate
varchar(50),
@LeaseFirstPayDate
varchar(50),
@DayToFirstPayment
varchar(50),
@LeaseAnnualMiles
varchar(50),
@MileageRate
varchar(50),
@APRRate
varchar(50),
@ResidualAmount
varchar(50),
@LicenseFee
varchar(50),
@RegistrationFee
varchar(50),
@TotalTax
varchar(50),
@ExtendedWarrantyName
varchar(50),
@ExtendedWarrantyTerm
varchar(50),
@ExtendedWarrantyLimitMiles
varchar(50),
@ExtendedWarrantyDollar
varchar(50),
@ExtendedWarrantyProfit
varchar(50),
@FrontGross
varchar(50),
@BackGross
varchar(50),
@TradeIn_1_VIN
varchar(50),
@TradeIn_2_VIN
varchar(50),
@TradeIn_1_Make
varchar(50),
@TradeIn_2_Make
varchar(50),
@TradeIn_1_Model
varchar(50),
@TradeIn_2_Model
varchar(50),
@TradeIn_1_ExteriorColor
varchar(50),
@TradeIn_2_ExteriorColor
varchar(50),
@TradeIn_1_Year
varchar(50),
@TradeIn_2_Year
varchar(50),
@TradeIn_1_Mileage
varchar(50),
@TradeIn_2_Mileage
varchar(50),
@TradeIn_1_Gross
varchar(50),
@TradeIn_2_Gross
varchar(50),
@TradeIn_1_Payoff
varchar(50),
@TradeIn_2_Payoff
varchar(50),
@TradeIn_1_ACV
varchar(50),
@TradeIn_2_ACV
varchar(50),
@Fee_1_Name
varchar(50),
@Fee_1_Fee
varchar(50),
@Fee_1_Commission
varchar(50),
@Fee_2_Name
varchar(50),
@Fee_2_Fee
varchar(50),
@Fee_2_Commission
varchar(50),
@Fee_3_Name
varchar(50),
@Fee_3_Fee
varchar(50),
@Fee_3_Commission
varchar(50),
@Fee_4_Name
varchar(50),
@Fee_4_Fee
varchar(50),
@Fee_4_Commission
varchar(50),
@Fee_5_Name
varchar(50),
@Fee_5_Fee
varchar(50),
@Fee_5_Commission
varchar(50),
@Fee_6_Name
varchar(50),
@Fee_6_Fee
varchar(50),
@Fee_6_Commission
varchar(50),
@Fee_7_Name
varchar(50),
@Fee_7_Fee
varchar(50),
@Fee_7_Commission
varchar(50),
@Fee_8_Name
varchar(50),
@Fee_8_Fee
varchar(50),
@Fee_8_Commission
varchar(50),
@Fee_9_Name
varchar(50),
@Fee_9_Fee
varchar(50),
@Fee_9_Commission
varchar(50),
@Fee_10_Name
varchar(50),
@Fee_10_Fee
varchar(50),
@Fee_10_Commission
varchar(50),
@ContractDate
varchar(50),
@InsuranceName
varchar(50),
@InsuranceAgentName
varchar(50),
@InsuranceAddress
varchar(50),
@InsuranceCity
varchar(50),
@InsuranceState
varchar(50),
@InsuranceZip
varchar(50),
@InsurancePhone
varchar(50),
@InsurancePolicyNumber
varchar(50),
@InsuranceEffectiveDate
varchar(50),
@InsuranceExpirationDate
varchar(50),
@InsuranceCompensationDeduction
varchar(50),
@TradeIn_1_InteriorColor
varchar(50),
@TradeIn_2_InteriorColor
varchar(50),
@PhoneBlock
varchar(50),
@LicensePlateNumber
varchar(50),
@Cost varchar(50),
@InvoiceAmount
varchar(50),
@FinanceCharge
varchar(50),
@TotalPickupPayment
varchar(50),
@TotalAccessories
varchar(50),
@TotalDriveOffAmount
varchar(50),
@EmailBlock
varchar(50),
@ModelDescriptionOfCarSold
varchar(50),
@VehicleClassification
varchar(50),
@ModelNumberOfCarSold
varchar(50),
@GAPPremium
varchar(50),
@LastInstallmentDate
varchar(50),
@CashDeposit
varchar(50),
@AHPremium
varchar(50),
@LeaseRate
varchar(50),
@DealerSelect
varchar(50),
@LeasePayment
varchar(50),
@LeaseNetCapCost
varchar(50),
@LeaseTotalCapReduction
varchar(50),
@DealStatus
varchar(50),
@CustomerSuffix
varchar(50),
@CustomerSalutation
varchar(50),
@CustomerAddress2
varchar(50),
@CustomerMiddleName
varchar(50),
@GlobalOptOut
varchar(50),
@LeaseTerm
varchar(50),
@ExtendedWarrantyFlag
varchar(50),
@Salesman_3_Number
varchar(50),
@Salesman_3_Name
varchar(50),
@Salesman_4_Number
varchar(50),
@Salesman_4_Name
varchar(50),
@Salesman_5_Number
varchar(50),
@Salesman_5_Name
varchar(50),
@Salesman_6_Number
varchar(50),
@Salesman_6_Name
varchar(50),
@APRRate2
varchar(50),
@APRRate3
varchar(50),
@APRRate4
varchar(50),
@Term2
varchar(50),
@SecurityDeposit2
varchar(50),
@DownPayment2
varchar(50),
@TotalOfPayments2
varchar(50),
@BasePayment
varchar(50),
@JournalSaleAmount
varchar(50),
@IndividualBusinessFlag
varchar(50),
@InventoryDate
varchar(50),
@StatusDate
varchar(50),
@ListPrice
varchar(50),
@NetTradeAmount
varchar(50),
@TrimLevel
varchar(50),
@SubTrimLevel
varchar(50),
@BodyDescription
varchar(50),
@BodyDoorCount
varchar(50),
@TransmissionDesc
varchar(50),
@EngineDesc
varchar(50),
@TypeCode
varchar(50),
@SLCT2
varchar(50),
@DealDateOffset
varchar(50),
@AccountingDate
varchar(50),
@CoBuyerCustNum
varchar(50),
@CoBuyerCell
varchar(50),
@CoBuyerEmail
varchar(50),
@CoBuyerSalutation
varchar(50),
@CoBuyerPhoneBlock
varchar(50),
@CoBuyerMailBlock
varchar(50),
@CoBuyerEmailBlock
varchar(50),
@RealBookDate
varchar(50),
@CoBuyerMiddleName
varchar(50),
@CoBuyerCountry
varchar(50),
@CoBuyerAddress2
varchar(50),
@CoBuyerOptOut
varchar(50),
@CoBuyerOccupation
varchar(50),
@CoBuyerEmployer
varchar(50),
@Country
varchar(50),
@Occupation
varchar(50),
@Employer
varchar(50),
@Salesman2Commission
varchar(50),
@BankAddress
varchar(50),
@BankCity
varchar(50),
@BankState
varchar(50),
@BankZip
varchar(50),
@LeaseEstimatedMiles
varchar(50),
@AFTReserve
varchar(50),
@CreditLifePrem
varchar(50),
@CreditLifeRes
varchar(50),
@AHRes
varchar(50),
@Language
varchar(50),
@BuyRate
varchar(50),
@DMVAmount
varchar(50),
@Weight
varchar(50),
@StateDMVTotFee
varchar(50),
@ROSNumber
varchar(50),
@Incentives
varchar(50),
@CASS_STD_LINE1
varchar(50),
@CASS_STD_LINE2
varchar(50),
@CASS_STD_CITY
varchar(50),
@CASS_STD_STATE
varchar(50),
@CASS_STD_ZIP
varchar(50),
@CASS_STD_ZIP4
varchar(50),
@CASS_STD_DPBC
varchar(50),
@CASS_STD_CHKDGT
varchar(50),
@CASS_STD_CART
varchar(50),
@CASS_STD_LOT
varchar(50),
@CASS_STD_LOTORD
varchar(50),
@CASS_STD_URB
varchar(50),
@CASS_STD_FIPS
varchar(50),
@CASS_STD_EWS
varchar(50),
@CASS_STD_LACS
varchar(50),
@CASS_STD_ZIPMOV
varchar(50),
@CASS_STD_Z4LOM
varchar(50),
@CASS_STD_NDIAPT
varchar(50),
@CASS_STD_NDIRR
varchar(50),
@CASS_STD_LACSRT
varchar(50),
@CASS_STD_ERROR_CD
varchar(50),
@NCOA_AC_ID
varchar(50),
@NCOA_COA_ADDSRC
varchar(50),
@NCOA_COA_MATCH
varchar(50),
@NCOA_COA_MOVTYP
varchar(50),
@NCOA_COA_DATE
varchar(50),
@NCOA_COA_DELCD
varchar(50),
@NCOA_COA_RTYPE
varchar(50),
@NCOA_COA_RTNCD
varchar(50),
@NCOA_COA_LINE1
varchar(50),
@NCOA_COA_LINE2
varchar(50),
@NCOA_COA_CITY
varchar(50),
@NCOA_COA_STATE
varchar(50),
@NCOA_COA_ZIP
varchar(50),
@NCOA_COA_ZIP4
varchar(50),
@NCOA_COA_DPBC
varchar(50),
@NCOA_COA_CHKDGT
varchar(50),
@NCOA_COA_CART
varchar(50),
@NCOA_COA_LOT
varchar(50),
@NCOA_COA_LOTORD
varchar(50),
@NCOA_COA_URB
varchar(50),
@NCOA_COA_Z4LOM
varchar(50),
@NCOA_COA_ACTION
varchar(50),
@NCOA_COA_QNAME
varchar(50),
@NCOA_DPV_AA
varchar(50),
@NCOA_DPV_A1
varchar(50),
@NCOA_DPV_BB
varchar(50),
@NCOA_DPV_CC
varchar(50),
@NCOA_DPV_M1
varchar(50),
@NCOA_DPV_M3
varchar(50),
@NCOA_DPV_N1
varchar(50),
@NCOA_DPV_P1
varchar(50),
@NCOA_DPV_P3
varchar(50),
@NCOA_DPV_RR
varchar(50),
@NCOA_DPV_R1
varchar(50),
@NCOA_DPV_STATUS
varchar(50),
@NCOA_DPV_F1
varchar(50),
@NCOA_DPV_G1
varchar(50),
@NCOA_DPV_U1
varchar(50),
@myerror
varchar(500),
@SalesID
int,
@errornumber int,
@errorseverity varchar(500),
@errorstate int,
@errorprocedure varchar(500),
@errorline varchar(50),
@errormessage varchar(1000);
DECLARE Sales_Cursor CURSOR FOR
SELECT * from FLATFILE_SALES;
OPEN Sales_Cursor;
:r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @VehicleVIN ;
--===============================================================================
-- ****************** insert into Sales Table ***********
BEGIN TRY
INSERT INTO Sales
IconicDealerID,
DealNumber,
CustomerNumber,
DMSType,
ContractDate
VALUES (@ClientDealerID,@DealNumber,@CustomerNumber,@DMSType,@ContractDate);
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER()
,@errorseverity = ERROR_SEVERITY()
,@errorstate = ERROR_STATE()
,@errorprocedure = ERROR_PROCEDURE()
,@errorline = ERROR_LINE()
,@errormessage = ERROR_MESSAGE();
:r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
@errornumber ,
@errorseverity ,
@errorstate,
@errorprocedure,
@errorline,
@errormessage);
END CATCH
PRINT @errornumber;
PRINT @errorseverity;
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 @SalesID = scope_identity();
PRINT @SalesID;
--================================================================================
--Insert into SALES_TRADEIN Table
BEGIN TRY
INSERT INTO SALES_TRADEIN
SalesID,
TradeIn_VIN,
TradeIn_Make,
TradeIn_Model,
TradeIn_ExteriorColor,
TradeIn_Year,
TradeIn_Mileage,
TradeIn_Gross,
TradeIn_Payoff,
TradeIn_ACV,
TradeIn_InteriorColor
VALUES
@SalesID,
case when @TradeIn_1_VIN is not null then @TradeIn_2_VIN end,
case when @TradeIn_1_Make is not null then @TradeIn_2_Make end,
case when @TradeIn_1_Model is not null then @TradeIn_2_Model end,
case when @TradeIn_1_ExteriorColor is not null then @TradeIn_2_ExteriorColor end,
case when @TradeIn_1_Year is not null then @TradeIn_2_Year end,
case when @TradeIn_1_Mileage is not null then @TradeIn_2_Mileage end,
case when @TradeIn_1_Gross is not null then @TradeIn_2_Gross end,
case when @TradeIn_1_Payoff is not null then @TradeIn_2_Payoff end,
case when @TradeIn_1_ACV is not null then @TradeIn_2_ACV end,
case when @TradeIn_1_InteriorColor is not null then @TradeIn_2_InteriorColor end
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER()
,@errorseverity = ERROR_SEVERITY()
,@errorstate = ERROR_STATE()
,@errorprocedure = ERROR_PROCEDURE()
,@errorline = ERROR_LINE()
,@errormessage = ERROR_MESSAGE();
:r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
END CATCHThis is what I've understood from your question. You want to replace @TradeIn_2_VIN value if @TradeIn_1_VIN
is NULL, else the value of @TradeIn_1_VIN.
If this is the requirement then, your CASE statement is missing ELSE part. You can re-write this as below
case when @TradeIn_1_VIN is null then @TradeIn_2_VIN
ELSE @TradeIn_1_VIN end,
or simply you can replace the CASE statement with the below
COALESCE function,
COALESCE(@TradeIn_1_VIN, @TradeIn_2_VIN),
Krishnakumar S -
In my library, under the Artist column only...items are not listed in alpha order. How can I get that to happen?
Same deal as your other thread but with Artist/Sort Artist:
https://discussions.apple.com/message/25561674#25561674
For more info. on how iTunes organizes things see Grouping tracks into albums.
tt2
Maybe you are looking for
-
How to track the login user session in webdynpro
Hi all, I have a new requirement as Explained below User will login from portal with login username and password. I want to retive that information. How to keep track of that information in webdynpro Thanks & Regards Padma N
-
Why can't I create a document in my Facebook group on my iPad. It won't let me input any text into the text box field after I create a new document. Thanks.
-
Batch conversion of Microsoft word to PDF?
Hi Gang, I'm not sure which forum to put this in, but I've been all over google and can't find a solution. I'm hoping someone here has a suggestion. Does anyone know a way to do a batch conversion of MS word to PDF? I installed adobe acrobat pro, and
-
I have one scenario:- I want to have procurement of one semi FG as X i.e both in house as well as external procurement. If order quantity is less than 100, system should create planned orders to be converted to production orders. If order qty is more
-
Add workflow on List by code (Arabic Portal)
Hello, I have an Arabic portal. I write the following code to add workflow "Publishing approval" on list by code . After code run . I open the list and check the work flow . it is not added properly. kindly check the attached file.