Master-detail UI on single table
Hi,
Iam trying to build a master-detail UI for a denormalized flat interface table. the primary key is a combination of 2 attributes - external reference and reference id that are to be displayed in the master and 1 that is to be displayed in detail - line number. I've ruled out the option of using 2 EOs and 2 VOs because the PK cant be split across 2 tables. i am now considering a solution using a single EO and 2 VOs. Each VO can contain all attributes in the PK apart from those that are displayed in the master/detail table. Furthur a view link on external reference and reference id will acheive the master detail on the UI. However if in the physical table there are 2 records having different line numbers for a system reference and reference id pair then there is the problem of seeing duplicates in the master table of the UI. both the tables on the UI must be editable. Is there a way we could have a master detail UI on a flat table as in this case?
Thanks,
Sushmitha
Edited by: 903697 on Mar 1, 2012 11:32 PM
Edited by: 903697 on Mar 2, 2012 12:46 AM
ADF Tree with Self Join
http://mohammadjbyaseen.wordpress.com/2012/01/12/implement-herarichy-of-multiple-level-using-one-veiw-object/#comment-13
Similar Messages
-
How to create a master detail form using single table
Hi,
how to create a master detail form using single table.
Regards,
M. SatishHi
how to create a master detail form using single table.Make the Master ur pks the details the rest of ur data base field in the detail it's a mater of organizing fields on a form M-Detail...
Now What ?
Regards,
Amatu Allah -
How to implement Master - Detail relation between two table views in OBI11g
Hi Gurus,
I was able to create master- detail between table and graph.
But between two tables not.
I put the listening column on the table prompt and specified channel for the Listen to Master-Detail Events in the table properties.
But did not work.
Where is the mistake?
I"d appreciate any ideas, help!
Thanks
LaszloThanks for the link!
My question is :
Are the same thinga the page edge and table prompt for the tables?
If not how to add a column to the page edge (not to the table prompt)?
Thanks
Laszlo -
Hi friends,
We are in to new development in Oracle ADF and newbie to this technology.
Created .jsf page and in corresponding pagedef, has "ControllerClass" with refering "DummyPagePhaseListener" and we have master-detail relationship using Viewlink(created using a SQL Query and entity based view).
Below exception raised when navigating from one to another record in Master af:table. Any help will be appreciated. Thanks in Advance......
java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController
at oracle.adf.model.binding.DCBindingContainer.getRegionController(DCBindingContainer.java:5197)
at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4247)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:300)
at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:70)
at oracle.adf.controller.v2.lifecycle.Lifecycle$6.execute(Lifecycle.java:202)
at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$600(ADFPhaseListener.java:23)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$3.after(ADFPhaseListener.java:323)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:447)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)Hi timo,
Thanks for ur reply...
we are using unbounded taskflow.
In Controller class(page def file), we refered the class that implements PagePhaseListener
The following override methods has created
public void afterPhase(PagePhaseEvent pagePhaseEvent) {
//In this area we used to read the session object file which is written and sent by another application(application to application navigate).
If session object file exists,will allow the user to navigate into the requested page else will navigate in to login(security aspect).
public void beforePhase(PagePhaseEvent pagePhaseEvent) {
Is we used Controller class wrongly ???
Is there any relationship with region controller???
Mani
[email protected] -
Create Master Detail on a single page
I have a create page with both the master(header) as well as (lines) on the same page.
Here is the page flow:
User navigates to the search screen on which the create button is displayed along with Search/Results regions.
User clicks on create button which takes them to Create Order Page.
The Create Order Page is a master-detail page. I have the create part for the header (which was tested independently before
the details table region is added) working fine which fetches and assigns the headerId from a sequence.
However, when I add the details table region and include the create Row method for the details Row as well , without explicitly
setting the headerId myself and render the page, I get the following exception. This exception is raised as soon as the control reaches the createRow
method of the detail.
This is probably due to the HeaderId being not yet available. How do I get around this issue.
I was initially thinking of setting the attribute myself but the documentation says that when an Composition association
exists between the Entity Objects, OA automatically does it for you.
I included the detailVO in the AM via the view link.
Exception
oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:692)
at nih.oracle.apps.po.webui.NihPoStOrdCreateCO.processRequest(NihPoStOrdCreateCO.java:65)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)After creating your master entity row, use setCurrentRow(<newly created row obj.>)
-
Master Detail between two updatable tables ( advance tables)
Hi,
I have two advanced table regions, and both are updatable. They have Master detail relationship , and on clicking on the select button in the Master region, the updatable child region ( with generally more than one records), is displayed.
The problem is, if I enter the details in the child region for one of the master records, and then without saving , move to the second master record, then the data is lost for the child records for the first master record.
How do I retain that, without explicitly saving?
I am having a handleSelection PPR event on the select radio button, and in that, I am executing the query for the child VO.
Any help is appreciated !
Thanks,
AJHi!
I don't understand that question.
A Master Table could have a lot of Detail Tables.
You can see that with SQL Workshop.
Can you give me more details of that problem?
Gerhard -
Spry Master Detail from two HTML tables?
I'm trying to use two spry tables generated from html on the same page.I would like to set up an advaned master detail region where the "tbl_adrs" (contains Multiple addresses) references the "tbl_provider" (contains a provider name and the unique identifier 'ProNo'). Is this possible with spry data set from html tables? All examples reference spry tables from XML. If it is possible, here is the HTML to look at.
Thanks in advance.
John
</style>
<script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var ds_provider = new Spry.Data.HTMLDataSet(null, "tbl_provider");
ds_provider.setColumnType("ProNo", "number");
var ds_adrs = new Spry.Data.HTMLDataSet(null, "tbl_adrs");
ds_adrs.setColumnType("ProNo", "number");
ds_adrs.setColumnType("ID", "number");
//-->
</script>
<table width="300" border="0" id="tbl_provider">
<tr>
<th scope="col">Provider</th>
<th scope="col">ProNo</th>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_rs_provider['BigName']; ?></td>
<td><?php echo $row_rs_provider['ProNo']; ?></td>
</tr>
<?php } while ($row_rs_provider = mysql_fetch_assoc($rs_provider)); ?>
</table>
<p> </p>
<div spry:region="ds_provider ds_adrs">
<table>
<tr>
<th spry:sort="Provider">Provider</th>
<th spry:sort="ProNo">ProNo</th>
</tr>
<tr spry:repeat="ds_provider" spry:odd="odd" spry:even="even" spry:hover="hover" spry:select="selected">
<td>{Provider}</td>
<td>{ProNo}</td>
</tr>
</table>
<p>{ds_adrs::ProNo}{ds_adrs::ID}</p>
<p>{ds_adrs::Group}</p>
<p>{ds_adrs::Complex}</p>
<p>{ds_adrs::Institution}</p>
<p>{ds_adrs::Street}</p>
<p>{ds_adrs::City}</p>
<p>{ds_adrs::Phone}</p>
<p>{ds_adrs::Fax}</p>
</div>
<p> </p>
<p> </p>
<table width="300" border="0" id="tbl_adrs">
<tr>
<th scope="col">ProNo</th>
<th scope="col">ID</th>
<th scope="col">Group</th>
<th scope="col">Complex</th>
<th scope="col">Institution</th>
<th scope="col">Street</th>
<th scope="col">City</th>
<th scope="col">Phone</th>
<th scope="col">Fax</th>
<th scope="col">County</th>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_rs_adrs['ProNo']; ?></td>
<td><?php echo $row_rs_adrs['ID']; ?></td>
<td><?php echo $row_rs_adrs['Group']; ?></td>
<td><?php echo $row_rs_adrs['Complex']; ?></td>
<td><?php echo $row_rs_adrs['Institution']; ?></td>
<td><?php echo $row_rs_adrs['Street']; ?></td>
<td><?php echo $row_rs_adrs['Adrs_Comp']; ?></td>
<td><?php echo $row_rs_adrs['Phone']; ?></td>
<td><?php echo $row_rs_adrs['Fax']; ?></td>
<td><?php echo $row_rs_adrs['County']; ?></td>
</tr>
<?php } while ($row_rs_adrs = mysql_fetch_assoc($rs_adrs)); ?>
</table>Moved to the Spry forum.
-
About master detail relation ship between tables
Hi
I am using jdev 11.1.1.5.0
Use case:
I have 2 table having master-detail relationship
master table - req_hdr
detail table - req_file
req_hdr is drop as adf table (t1) on a fragment page and req_file is drop on popup as adf table (t2).
user can add any no of row in req_file with respect to each row of req_hdr.
to open popup for req_file, a command image link is provided in one column of req_hdr.
On popup, there is two button provided for save and close.
On save button,commit operation is performed and on close button,rollback operation and popup.hide() is performed.
Now the problem what I am facing is
1. If with respect to any row of req_hdr there is one row already exist in req_file and user click on add button to add new row in req_file and randomly user decide to to close the popup rollback operation is performed and again when user click on same row to open popup.
Popup contains no row while in database there is one row exist for that.
2. if user add a new row in req_file and perform save( commit ) and again for next row of req_hdr user open a popup to add new row in req_file and click on add button ,values of preceding row is already populated in new row while is should be empty because req_hdr and req_file have master detail relation and for next id of req_hdr, req_file should display new row.
Anyone have the solution regarding this....?
Thanks..the contentDelivery for the popup is already set to lazyUncached
and on add button i use following code to add new row:--
<code>
Row r_file=null;
CollectionModel tableModel = (CollectionModel)getT2().getValue();
JUCtrlHierBinding adfModel = (JUCtrlHierBinding)tableModel.getWrappedData();
DCIteratorBinding dciter = adfModel.getDCIteratorBinding();
NavigatableRowIterator nav=dciter.getNavigatableRowIterator();
r_file=nav.createRow();
r_file.setNewRowState(Row.STATUS_INITIALIZED);
Row lastRow=nav.last();
int r_index=nav.getRangeIndexOf(lastRow);
nav.insertRowAtRangeIndex(r_index+1, r_file);
dciter.setCurrentRowWithKey(r_file.getKey().toStringFormat(true));
r_file.setAttribute("Sno", vo_file.getEstimatedRowCount());
r_file.setAttribute("Filetype", null);
r_file.setAttribute("Filename", null);
r_file.setAttribute("Remark", null);
</code>
There is any help regarding this....? -
How to Insert 3 Column details in a single table from the parent table.
From the Parent Table i need to insert rows which are all under this column {(TradeIn_1_VIN),(TradeIn_2_VIN),(TradeIn_3_VIN) } into SALES_TRADEIN Table .
I have used the below Query,
But it reads only (TradeIn _1_Vin) Column in the SALES_TRADEIN table rest 2 records got skipped..
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 null then @TradeIn_2_VIN else @TradeIn_1_VIN end,
case when @TradeIn_1_Make is null then @TradeIn_2_Make else @TradeIn_1_Make end,
case when @TradeIn_1_Model is null then @TradeIn_2_Model else @TradeIn_1_Model end,
case when @TradeIn_1_ExteriorColor is null then @TradeIn_2_ExteriorColor else @TradeIn_1_ExteriorColor end,
case when @TradeIn_1_Year is null then @TradeIn_2_Year else @TradeIn_1_Year end,
case when @TradeIn_1_Mileage is null then @TradeIn_2_Mileage else @TradeIn_1_Mileage end,
case when @TradeIn_1_Gross is null then @TradeIn_2_Gross else @TradeIn_1_Gross end,
case when @TradeIn_1_Payoff is null then @TradeIn_2_Payoff else @TradeIn_1_Payoff end,
case when @TradeIn_1_ACV is null then @TradeIn_2_ACV else @TradeIn_1_ACV end,
case when @TradeIn_1_InteriorColor is null then @TradeIn_2_InteriorColor else @TradeIn_1_InteriorColor end
END TRY
Actually my problem is
If [(TradeIn_1_VIN),(TradeIn_2_VIN),(TradeIn_3_VIN)] these 3 columns have details i need all the 3 columns details need to be read to SALES_TRADEIN table.
Suppose if we have data only in [(TradeIn_1_VIN),(TradeIn_2_VIN)] then these column details need to loaded in the SALES_TRADEIN table.
If any columns are blank no problem it can move next process.
Please help me change those particular lines to insert all the 3 records (TradeIn_1_VIN) (TradeIn_2_VIN) (TradeIn_3_VIN) in to the table.you've not given us the full info about the tables. The posted code also makes not much sense to me as all I can see are values getting inserted from some variables which is not required here as your values come from a table and variables can handle only
one set of values a time which would require unnecessary iteration logic.
I think what you need is something like below
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
SELECT t.TradeIn_VIN,
t.TradeIn_Make,
t.TradeIn_Model,
t.TradeIn_ExteriorColor,
t.TradeIn_Year,
t.TradeIn_Mileage,
t.TradeIn_Gross,
t.TradeIn_Payoff,
t.TradeIn_ACV,
t.TradeIn_InteriorColor
FROM Parent p
CROSS APPLY (VALUES
(TradeIn_1_VIN,
TradeIn_1_Make,
TradeIn_1_Model,
TradeIn_1_ExteriorColor,
TradeIn_1_Year,
TradeIn_1_Mileage,
TradeIn_1_Gross,
TradeIn_1_Payoff,
TradeIn_1_ACV,
TradeIn_1_InteriorColor),
(TradeIn_2_VIN,
TradeIn_2_Make,
TradeIn_2_Model,
TradeIn_2_ExteriorColor,
TradeIn_2_Year,
TradeIn_2_Mileage,
TradeIn_2_Gross,
TradeIn_2_Payoff,
TradeIn_2_ACV,
TradeIn_2_InteriorColor),
(TradeIn_3_VIN,
TradeIn_3_Make,
TradeIn_3_Model,
TradeIn_3_ExteriorColor,
TradeIn_3_Year,
TradeIn_3_Mileage,
TradeIn_3_Gross,
TradeIn_3_Payoff,
TradeIn_3_ACV,
TradeIn_3_InteriorColor)
)t(TradeIn_VIN,
TradeIn_Make,
TradeIn_Model,
TradeIn_ExteriorColor,
TradeIn_Year,
TradeIn_Mileage,
TradeIn_Gross,
TradeIn_Payoff,
TradeIn_ACV,
TradeIn_InteriorColor)
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
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 -
From the Parent Table i need to insert rows which are all under this column {(TradeIn_1_VIN),(TradeIn_2_VIN),(TradeIn_3_VIN) } into SALES_TRADEIN Table .
I have used the below Query,
But it reads only (TradeIn _1_Vin) Column in the SALES_TRADEIN table rest 2 records got skipped..
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 null then @TradeIn_2_VIN else @TradeIn_1_VIN end,
case when @TradeIn_1_Make is null then @TradeIn_2_Make else @TradeIn_1_Make end,
case when @TradeIn_1_Model is null then @TradeIn_2_Model else @TradeIn_1_Model end,
case when @TradeIn_1_ExteriorColor is null then @TradeIn_2_ExteriorColor else @TradeIn_1_ExteriorColor end,
case when @TradeIn_1_Year is null then @TradeIn_2_Year else @TradeIn_1_Year end,
case when @TradeIn_1_Mileage is null then @TradeIn_2_Mileage else @TradeIn_1_Mileage end,
case when @TradeIn_1_Gross is null then @TradeIn_2_Gross else @TradeIn_1_Gross end,
case when @TradeIn_1_Payoff is null then @TradeIn_2_Payoff else @TradeIn_1_Payoff end,
case when @TradeIn_1_ACV is null then @TradeIn_2_ACV else @TradeIn_1_ACV end,
case when @TradeIn_1_InteriorColor is null then @TradeIn_2_InteriorColor else @TradeIn_1_InteriorColor end
END TRY
Actually my problem is
If [(TradeIn_1_VIN),(TradeIn_2_VIN),(TradeIn_3_VIN)] these 3 columns have details i need all the 3 columns details need to be read to SALES_TRADEIN table.
Suppose if we have data only in [(TradeIn_1_VIN),(TradeIn_2_VIN)] then these column details need to loaded in the SALES_TRADEIN table.
If any columns are blank no problem it can move next process.
Please help me change those particular lines to insert all the 3 records (TradeIn_1_VIN) (TradeIn_2_VIN) (TradeIn_3_VIN) in to the table.From SQL2008 on, besides INSERT-SELECT, and INSERT-EXEC, the INSERT-VALUES form of the insert command is improved. It can insert multiple rows like this:
INSERT INTO my_table(MyColA, MyColB)
VALUES
(1, 1),
(2, 2),
(3, 3)
You could also use that in SELECTs, like this:
SELECT *
FROM
( VALUES (1,2), (3,4)
) t(a, b) -
Displaying master/details in a single line by SELECT.
Hello,
In Oracle's typical Order/LineItem example tables, I would like to output the fields of an order followed by fields of all the items for that order in one line in a SELECT statement, without going for PL/SQL coding. All the fields in the output line are comma separated. I guess it can't be done in a SELECT statement. Am I right?
Thanks in advance.Hi,
There might be some mistake in your layout. the print direction should be down.
Look at the below link for more information:
http://oracleapps4u.blogspot.com/2011/03/layout-mode-print-direction.html
Some guide lines in developing the report layout:
http://oracleapps4u.blogspot.com/2011/03/layout-guidelines-to-increase-report.html
If this didnt help you. detail more about your problem -
Reg : "Flattened" Master/Detail in a Single Row
Hi All,
I have a requirement as below :
Structure Table. EO1
Attirubtes Table. EO2
The relation ship between two tables is one to one.
My requirement is i need to show the data in Flattened Format in a table region.
For display purpose i was able to display data.
For performing DML operations : Like : Insert, Update , Delete. I have take a VO1 based on two EO's : EO1 and EO2' , AO for EO1 && EO2. and written query in Expert Mode.
Here i struck, i could not understand how to proceed further. While performing update : only data in : EO1 is getting updated. EO2 data is getting committed.
One more issue is : i could not understand how to perform insertRow() for above ?
Please provide your suggestions.
Regards
SridharHi All,
I solved the above requirement by following the below link.
HOWTO: Implementing a ViewObject with Multiple Updateable Dependent Entity Objects
Thanks to AJ
Regards
Sridhar -
Create a Master-Detail Records in target table
hi,
I have a source in a table that contains the infos of customers and for each customer record, we have three fields representing the customer ID
(Identity card, SIN, passport ID) and I want to create 3 record in the target table for each customer, each record contains information for each ID
How can we do with OWB?
thanks.hello
i belive you need to use pivot operator
check out this blog
https://blogs.oracle.com/warehousebuilder/entry/pivoting_data_in_owb
rgds -
Can I set up a Master-Detail Page with report regions for 2 Detail Tables?
Hi there,
I am just starting to use Application Express.
I have a Table (A) with Master-Detail relationships to two Tables B & C.
I can set up a Master-Detail Page between Table A and Table B, where the records displayed in Table B change when switching between records in Table A. I would like to add Table C to the page and for this to work in the same way.
Is this possible in APEX? (I've tried adding a report region for Table C and making the Region Source dependent on the same ID field as is used by the report region for Table B but I keep getting "No Data Found" for Table C).
Many thanks.Thanks, but the text needs to be on a single master page which every page is assigned to. This is so the text alternates correctly regardless of whether new pages are inserted or moved. If I assigned separate master pages to individual pages and then moved the pages to a different location, the alternating footer text would then fall out of sync. I hope that made sense!
Maybe you are looking for
-
Logic not opening 64-bit 48khz audio files.
I recently tracked drums at a studio thatuses Cakewalk Sonar 6. The audio files are consolidated (into 16 54 minute strips) and on my hard drive now, but Logic will not open them for some reason. I have my Mac and Logic in 64-bit mode. When I try to
-
Dear All, I have a PO of Year 2010. Its Dlvry date was in March 2010. But in current year If I am changing dlvry date to Jul 2011, it gives me error for the item as BP714: Item &&& Commitment budget exceeded The amount by which it exceeds is the am
-
[SOLVED] Input/Output error, read and writing ..
This is my brand new Seagate 500GB disk making troubles, it is formatted with NTFS for easier accessing trough Windows because it is sometimes plugged into an external case. [dezza@dezza ~]$ sudo rm -rf store/BADDIR/ rm: cannot remove `store/BADDIR/t
-
LabView Developer needed in Kyle (far South), Austin
Xtreme Power Solutions www.xtremepowersolutions.com delivers integrated smart power management solutions from 500kW to 100MW. Proprietary solid-state power management and integrated storage enables efficient and available power for an environmentall
-
Error occurs when i use the Tcode "S_ALR_87012276", it shows "Variant SAP&MIN of program RFSSLD00 is not current version". How can I slove it? Thanks!