Challenging Lexical Reference and SQL Problem
Hi,
I am trying to build a product hierarchy master report but I have a challenging problem at hand. To generate the report I need an SQL statement with lexical references and before parameter form. Basically, my SQL statement looks something like this:
Select &Columns
From &Tables
Where &Criteria
Before Parameter:
In If X='1',
&Columns := A.NAME, B.NAME, C.NAME
&Tables:=A,B,C
&Criteria:= A.CODE=B.CODE, B.CODE=C.CODE
In If X='2',
&Columns := A.NAME, B.NAME, C.NAME, D.NAME
&Tables:=A,B,C,D
&Criteria:= A.CODE=B.CODE, B.CODE=C.CODE,C.CODE=D.CODE
In If X='3',
&Columns := A.NAME, B.NAME, C.NAME, D.NAME, E.NAME
&Tables:=A,B,C,D,E
&Criteria:= A.CODE=B.CODE, B.CODE=C.CODE,C.CODE=D.CODE, C.CODE=E.CODE
I need to build a group left report and group by A,B and up to E if X='3'.
Any idea how can I accomplish this? Any kind of help or advice is urgently needed. Thank you in advance.
Siak,
build a kind of maximum modell. Set the initial values of your Parameters to the maximum (like for columns:
a.name as aname, b.name as bname, ...., e.name as ename)
and build a layout for this. Then in a before report trigger set the paramters you want and fill the not needed with dummy values. For example if X=1 then
:columns := 'a.name as aname, b.name as bname, c.name as cname, ''x'' as dname, ''x'' as ename'
In the layout supress the output of non used fields with a format trigger or use dependent from your X three different layouts. I've not tested it, but it's a chance ...
regards
Rainer
Similar Messages
-
Open VI reference and paths problem
Hi,
in my project I need to have a VI running independently from the calling VI so I use VI Server and "Open VI reference" to run the VI. However this is not without problems. The VI that I run is not in the same folder, as the caller VI and also not on a fixed location on disk, so I use relative paths (something like "..\subfolder\myVi.vi"). This works in the project and .exe but not e.g. in a .llb file where there seems to be no folder structure anymore.
Actually I'd prefer if this would not use paths on disk at all but if I could somehow create a reference to another VI in my project and it would even work if the VI's location on disk changed (and is updated in the project). I think it is quite confusing that I have to care about physical location of the VI here when I use the project browser for everything else. Is there a way to accomplish this? Or is there even a better way to start a VI that keeps running even after the caller stopped?
Thanks,
TobiasAs far as I've seen, every VI has the path ../Application.exe/currentvi.vi when you are running in a build. Therefore, to open another VI you have to strip the current vi's path once, and add the other vi.
I have written a VI that determines whether or not I'm running from a build, it is attached. It returns true if you're in a build, and also the current vi's path stripped once giving you ../Application.exe.
The way I use the VI is pictured below. I send the stripped path Is Executable returns and the relative path (minus the vi name) into a Select icon which is wired to the boolean Is Executable returns. Then I add the other VI name to the path.
Message Edited by elset191 on 04-21-2009 10:43 AM
Tim Elsey
LabVIEW 2010, 2012
Certified LabVIEW Architect
Attachments:
Is executable.vi 8 KB
untitled.JPG 7 KB -
URGENT: Problem with lexical reference in query statement!
I am modifying the seeded Receipt Traveler report.
The query I need to modify is the receipts query (Q_RECEIPTS). The entire query statement for this is a lexical reference - &P_SELECT_RECEIPTS. The actual query is being set in the After Parameter Form trigger. I need to add a few columns to the select clause and tables to the from clause. Modifying the query in the trigger alone did not help. I got the error - REP 0498 "selected columns differ from report definition"
=> How do I add these new columns to the report now? Do I need to put them in the initial value of the parameter &P_SELECT_RECEIPTS?
=> I tried modifying P_SELECT_RECEIPTS, but I get a REP 1070 error saying the file cannot be saved.
=> In addition, P_SELECT_RECEIPTS does not have a from clause, which causes a problem for me, but I am wondering how the report was originally saved
Any help with this rather lengthy question will be greatly appreciated.
Thanks,
P.S.
The initial value of &P_SELECT_RECEIPTS is set to:
SELECT rrp.item_id,rrp.organization_id rrp_organization_id,MSI.SEGMENT1||''||MSI.SEGMENT2||''||MSI.SEGMENT3||''||MSI.SEGMENT19||''||MSI.SEGMENT20 C_FLEX_ITEM,MCA.SEGMENT1||''||MCA.SEGMENT2||''||MCA.SEGMENT3||''||MCA.SEGMENT19||''||MCA.SEGMENT20 C_FLEX_CAT,rrp.revision_num,rrp.category_id,rrp.item_description,rrp.un_num,rrp.un_description,rrp.hazard_class,rrp.routing_name,rrp.document_type_code,rrp.document_number,rrp.release_num,rrp.line_num,rrp.buyer_preparer_name,rrp.source_type,rrp.source,rrp.source_unit_of_measure,rrp.vendor_product_num,fnd_date.date_to_canonical(rrp.due_date) due_date,round(rrp.quantity_ordered,:P_qty_precision) quantity_ordered,rrp.note_to_receiver,rrp.pll_note_to_receiver,decode(psp.manual_receipt_num_type,'ALPHANUMERIC',rrp.receipt_num,decode(rtrim(rrp.receipt_num,'0123456789'),NULL,to_number(rrp.receipt_num),rrp.receipt_num)) RECEIPT_NUM,rrp.receipt_unit_of_measure,fnd_date.date_to_canonical(rrp.receipt_date) receipt_date,rrp.receipt_location,rrp.receiver_first_name,rrp.receiver_last_name,rrp.freight_carrier,round(rrp.quantity_received,:P_qty_precision) quantity_received,rrp.primary_quantity parent_primary_quantity,round(rrp.quantity_remaining,:P_qty_precision) quantity_remaining,rrp.shipment_num,rrp.bill_of_lading,rrp.vendor_lot_num,rrp.packing_slip_num,rrp.containers,rrp.receiver_comment,rrp.transaction_type rrp_transaction_type,rrp.transaction_id rrp_transaction_id,rrp.shipment_line_id rrp_shipment_line_id,rrp.shipment_header_id rrp_shipment_header_id,rrp.distribution_id rrp_distribution_id,rrp.po_header_id,rrp.po_line_id,rrp.po_line_location_id,rrp.requisition_header_id,rrp.requisition_line_id,rrp.from_interface rrp_from_interface,rrp.deliver_to_location,rrp.license_plate_numberYou can see the query being bulit within the BUILD_QRECIEPTS Program Unit
-
Japanese Data Set and Get Problem with SQL
Hi,
I am not able to retrieve or set data contain Japanese characters.
Formerly our set up was running just fine. But on doing installation on a new machine, things have gone all haywire.
I installed Win NT 4.0 Japnese version and SQL 7.0 and later Win 2000 Server Japanese version with same SQL 7.0, but on both get and set I get SQL Exceptions:
Query 1:
SELECT DISTINCT MAKER_CD FROM T_MAKER WHERE MAKER_NAME = '�a�l�v�A���s�i' Exception:
[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the character string '�a�l�v�A��'.
Query 2:
Insert into Car (intCarID, nvchCustomerID, nvchCarMaker, nvchCarModel,nvchCarDescription, nvchCarCode, nvchCarColor, tintRegistrationCalendar,tintRegistrationMonth, intRegistrationYear,nvchAnnualMileage, nvchPurpose, intNoOfKms,intAirBag, btEcologicalCar, btAntilockBreakSystem,btAntiskid, btSafetyBody, btAntitheft, btFourWheelDrive,btCarModification, nvchLicensePlateArea, intLicensePlateType,nvchLicensePlateHiragana, tintLicensePlateNumber,nvchCarManufacturingNumber, nvchCarOwner, btCurrentlyInsured)Values( 1, 'NI200205040001','','', '', 'HA11S', '���I����������',2,1, 11 ,'5000', '�����E���W���[',0,2,0,0,0,0,0,0,0,'',0,'null', '0' ,'', '�_�������{�l' , 0)
Exception:
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'null'.
I do not wish to Prepared Statements. I will need to update all my JDBC calls this way.
Would be grateful if any solutions to this problem could be provided.
Tahanks and RegardsIf you are using the JDBC-ODBC bridge, then add the 'charset' property (with the name of the japanese charset as value, or whichever you are using) to the Properties instance you pass on to getConnection().
Alin. -
SQL Developer and GeoRaptor problem
Hi All,
I have installed sql developer version 1.5.0.52, And in one schema i have spatial data, but as geo raptor in not installed in sql developer so i am unable to see the Spatial data.
So in order to see the spatial data i installed Geo Raptor as below:
Click menu item "Help" and "Check for update"
2. Dialog "Check for Updates - Welcome"
Click on button "Next".
3. Dialog "Check for Updates - Step 1 of 3: Source"
Add new Update center. Click on button "Add" and insert values:
Name: GeoRaptor
Location: http://georaptor.sourceforge.net/install.xml
And sql developer update sucessfully , but after installation of Geo Raptor as well i am unable to find the Geo Raptor tool in SQL Developer.
Could any one please help me that why Geo Raptor tool is not dispaying in SQL Developer.
Thanks in Advance
VipinVipin,
I am one of the developers for GeoRaptor.
I note that you are using version 1.5.0.52 of SQL Developer.
The current version of SQL Developer works with version 2.1 and above.
Download the latest version of SQL Developer (I run version 2.1.1.64) and reinstall GeoRaptor.
If the install is correct you should see a GeoRaptor menu entry under the View menu pillar. Also, you
should see GeoRaptor commands against the right mouse click menus on tables/sdo_geometry columns.
Let me know if you still have problems.
regards
Simon -
Lexical References for reports 9i (graph and colors)
hi,
1) i want to use lexical parameters for graph and colors
like font,background,foreground,text and so on....
for graph :
width,height,x-axis,y-axis and so on....
my reports are saved in .jsp .
it is possible or not .if possible please help me.
it's very urgent.
2) I have created a report with graph at the beginning of the first page
I got result with graph and corresponding data in tabular format and saved in .jsp file.
Graph is shown at the beginning of the report as I desired followed by
data.(i.e. First Page).
From next page I am not able to get the data
from the top of the page instead a gap with the size of the graph is available
which is blank.
I need to produce graph only on the first page and the other pages with just the
data without a gap reserved for graph.
with regard's
vijay1) Yes, you can use lexical references in the generated graph XML (I presume that you're talking about 9i). However, this functionality is only available in patch 1 and above (patch 2 is now available, and can be downloaded from Metalink).
2) Create a frame around the graph (and make sure that the graph is contained by the frame, i.e., move it forwards). Make the frame vertically variable.
Hope this helps,
Danny -
Northwind sample and SQL Compact 3.5 (PROBLEMS)
using vb express
I'm totaly new to the VB and SQL
Using the Learn VB and getting to the part about "Displaying Related Data"
When I try to add a connection
Using SQL Server Compact 3.5 as a Data Source
Using (C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf) as Database
no password
hit ok
and I get the error access to the database is not allowed. [file name = C:\Program files\microsoft SQL Server Compact
Edition \v3.5\Samples\Northwind.sdf]
What Am I doing wrong. It can't be that hard, IS IT?For diagnostic purposes, try the following.
Create a new project; a VB Windows Forms project.
In the Data Sources view, create a data source for:
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf
If you do not understand that, then ask for clarification. If the wizard says that the database is not part of the project, then answer the question by saying no, that you do not want a copy made. However note that that (let the wizard make a copy) is probably what you actually want to do for development purposes, but for now, we want to test the situation where you read from the original copy.
In the "Choose Your Database Objects" page, choose (put a check in a checkbox) a table and only one table; any table. The important thing is to select at least one table; it will likely work if you select all tables.
Now, be sure that the form is being viewed in design view. If you have just now created the project, then the form is being viewed in design view. In the Data Sources view, click on the table (a table) and there will be a drop-down box; select DataGridView. Then drag the table and drop onto the form. Adjust the size and position to your preferences. Compile and test that. Note that you do not need to add or modify any code yourself, but you can put the following in the
Form1_Load event to verify that the datasource is what you think it is:
Code SnippetMessageBox.Show(Me.CategoriesTableAdapter.Connection.ConnectionString)
Note that this program is only reading; it is not updating but I think that the connection is capable of updates. The important thing is to determine if you can do this much; I can and I do not remember if I made any modifications to allow it to happen. I might have modified the security on the file to allow update access; I am not sure. -
hi,
I'm trying to use a lexical reference in my SELECT statement as follows:
select department_name, department_id, &myParameter from departments
and I'm always getting an error (ORA-00923: FROM keyword not found where expected).
I've already worked with lexical references, but only when constructing the where clause of an SQL statement.
Has anyone of you tried to use it in the SELECT part?
Thanks a lotHi Ratnesh,
thanks for your reply ... I tried your solution, but I'm getting the error message (ORA-00923: FROM keyword not found where expected) again.
In the documentation of BI Publisher 10.1.3.2.1 I could read that lexicals are supported for queries against the Oracle E-Business Suite only. Maybe that's the problem? We are NOT using the EBS here.
Here's my data template:
<dataTemplate name="myDataTemplate" defaultPackage="PKG_VC_SECURITY" description="Data Template">
<lexicals>
<lexical type="oracle.apps.fnd.flex.kff.select" name="LADEDATUM" comment="Comment" application_short_name="INV" id_flex_code="MSTK" multiple_id_flex_num="Y" code_combination_table_alias="msi" segments="ALL" show_parent_segments="Y" output_type="VALUE"/>
</lexicals>
<dataQuery>
<sqlStatement name="ROW" dataSourceRef="">
<![CDATA[
select sysdate as Date, &LADEDATUMas Ladedatum FROM dual
]]>
</sqlStatement>
</dataQuery>
<dataTrigger name="beforeReport" source="PKG_VC_SECURITY.fun_context_setzen(:pUSERID, :pUSERGROUP, :pSID)"/>
</dataTemplate>
Any further ideas? ;-) -
Having read what I could from the related questions, the answers still elude me. This issue apparently is specific to Windows 8.1.
First, a little background.
1: The server is not on a domain, The system runs Server 2008-R2 standard with all folders shared across a standard "Workgroup" type network. They would prefer to
leave this layout intact.
2: The shared folders are nothing but Data files. There are no active system folders or anything used in an "active" environment. They are mostly Word doc, excel
files, pdf, txt, etc. However, due to the requirements of the software that needs to access these files, they Must
reside on a mapped network drive letter. Nothing else works due to the way the SQL database program stores the reference points back to the data.
I have had some success using what amounts to a “simulated” mapping using WebDAV to access the server. But access speed is a lot slower ad file size is limited.
3: The system has been configured as-is for the past 3 years with Users all on Windows 7 x64 (mixed OS, some Home Premium, some Professional) and the only problems that come up are when
access is through an ISP that blocks port 445. This was the original reason for finding a WebDAV/Cloud method just for those Users since they were unable to Map drives to anything on the Office Servers from their Home Internet even when using a VPN.
When Windows 8.0 became the only version available, I added a few users whose new laptops came with 8.0 from the vendors. While there were a very few minor problems, for all practical
purposes, I was still able to provide access to the mapped folders.
As the Windows 8.1 roll-out progressed, some users were successfully upgraded while others are still stuck in Windows 8.0. The issues with this seem to be hardware related and vary
depending on the Make and model of the laptop. I have been assured that eventually all of these will be able to advance to 8.1. But this delay has given me an excellent mixed OS environment for testing.
On the users who have not yet purchased new equipment and who are still using Windows 7. There has been no change. Their drive mapping is stable and they can always connect as usual.
Those blocked from lack of port 445 or still blocked. Systems inside the Office and those with ISP's who allow port 445 can use all mapped drives as normal.
Users who had Windows 8.0 and who have not yet been able to upgrade to 8.1 also have been unaffected. Same results as Windows 7.
Users who got the Windows 8.1 upgrade as well as those that came factory loaded with Windows 8.1 seem to be a never-ending list of problems. The ones that came native with 8.1 are worst
of all. The list of error codes runs through everything that has to do with “communication with the server”. As far as I have seen, this appears to be the issue.
Whether they are in the office on a wired network connection or at home on a Wi-Fi connection, the issues have the same results but the actual error codes may vary slightly. All of
them refer back to an inability to communicate with the server.
Nothing on the server has changed in any way. Users with Windows 7 continue to have zero problems, Users with Windows 8.0 seem to be doing fine as well. Only those with Windows
8.1 are affected and their problems are dramatic with everything from a total loss of drive mapping to misdirected data when the maps are active.
I have tried to make the drives automatically remap on reboot. I have tried registry modifications. I have done everything I can think of to make a difference but the results are the same
for every system using 8.1. The mapped drive letters invariably disappear. Sometimes while the system is in use ( I think I have been able to trace this to times when the system enters Sleep or Hibernate) but always when the system reboots.
One detail that might point to somewhere is that the "time to connect" when mapping the drive is so long that I believe some of the original failures were due to not waiting for a
minimum of 3 or 4 minutes to give time for the Shares to show-up in order to map them. Once the mapping is successful, the file access speed seems normal. But invariably, the drive becomes "unmapped" repeatedly each day.
I know this was a long question but I have tried to provide every possible detail for anyone who has experienced events like this who may already have a solution. I would even be glad
to purchase a 3rd party application if that is what it takes to get this to work. My next planned effort is to try using Server 2013 but I am afraid that might open another can of worms for those who still use Windows 7.
I have also been told that this is in some way related to the push to "Cloud" support in Windows 8.1 OS but I do not see where this would come in. I can say that this was the
one place where things continued to work as before. People who had Windows 8.1 and who had to use the CLOUD copies of our data are still able to connect to it with no problems.
Any suggestions appreciated. Preferably those that would not need extensive changes to the basic network structure. This "workgroup" consists of less than 25 users and any
extreme measures would be hard to justifyHi,
I sugget you try to ping server so that we can verify the connectivity.
Can windows 8.1 access Windows Server 2008R2?
Also,please check the event viewer to see if some error log appeared when the issue occurred.
Regards,
Kelvin Xu
TechNet Community Support -
PL/SQL :: Problem With Large Number Computation.
Greetings Experts,
I am relatively new to Oracle-DB. And I have a question regarding PL/SQL. I was trying to find the factorial of a number 100 as this is the most common programming problem for the beginners. But when I tried to execute the same, I was getting weird result(~) instead of actual value, i. e. 100!. I would highly appreciate if you experts can guide me in this regard. I have posted the program herewith for your reference.
SQL> DECLARE
2 X NUMBER := 100;
3 INDX NUMBER := 1;
4 BEGIN
5 INDX := X;
6 WHILE X > 1
7 LOOP
8 X := X - 1;
9 INDX := INDX * X;
10 END LOOP;
11 DBMS_OUTPUT.PUT_LINE('The Factorial of 100 is : '
12 || INDX || '.');
13 EXCEPTION
14 WHEN OTHERS THEN
15 RAISE_APPLICATION_ERROR(-20156,SUBSTR(SQLERRM,1,500));
16 END;
17 /
The Factorial of 100 is : ~.
PL/SQL procedure successfully completed.
TIA.
Hex.This is PL/SQL and works up to 1463:
SQL> CREATE OR REPLACE FUNCTION factorial(
2 pNumber IN NUMBER)
3 RETURN VARCHAR2
4 IS
5 f VARCHAR2(32767);
6
7 FUNCTION multiply(
8 pX IN VARCHAR2,
9 pY IN VARCHAR2)
10 RETURN VARCHAR2
11 IS
12 xManLength PLS_INTEGER;
13 yManLength PLS_INTEGER;
14 BEGIN
15 xManLength := LENGTH(RTRIM(pX, '0'));
16 yManLength := LENGTH(RTRIM(pY, '0'));
17 RETURN TO_CHAR(TO_NUMBER(SUBSTR(pX, 1, xManLength)) * TO_NUMBER(SUBSTR(pY, 1, yManLength)))
18 || RPAD('0', LENGTH(pX) - xManLength + LENGTH(pY) - yManLength, '0');
19 END multiply;
20 BEGIN
21 f := 1;
22
23 FOR n IN 1 .. pNumber LOOP
24 f := multiply(f, n);
25 END LOOP;
26
27 RETURN f;
28 END factorial;
29 /
Funktion wurde erstellt.
SQL>
SQL> SELECT 1463, factorial(1463) AS fact
2 FROM DUAL;
1463
FACT
1463
229804713272032214845417447319796313384000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000 -
Report Builder: Lexical References
I need to use a lexical reference for the whole sql statement in one of the quries of my report since I have multiple clauses. For example I'm using
select &depttable
where depttable is a user parameter. According the the help of the Report Builer this is possible but it is reporting an error of missing expressing when closing the query boc. I'm really confused now and this is the only way possible. Can anyone help please?It is easy. You can declare a lexical parameter for the whole query, but you have to enter an initial value for the parameter
which restricts the number and datatypes of output columns.
Declare the parameter (1 parameter for the whole Select) before you open the query editor.
You have to decide on the number and datatypes of the columns in the select clauses of the statements
you are going to use with this report.
Assuming the Statements will use one number and one character column in their select clauses:
Declare the parameter for the whole query as follows:
datatype character
width 500 (depending on how long your queries can get)
initial value: write any select that contains a select and a from clause (must be a parsable statement)
The select clause must (to fit this example) contain a number and a character column in the correct order.
Write for example: SELECT EMPNO,ENAME FROM EMP. (assuming you have EMP table in your schema)
Then open the query editor and write the parameter name with a leading&. (f.e.: &p_1)
When you close it , Reports parses the query with the initial value for the parameter and saves information on the output columns.
Design a layout. You will then be able to run the report with any SELECT that outputs a number and char column (in the correct order)
For example: select deptno,dname from dept where deptno< 40 order by deptno desc. -
Advanced Queueing and SQL in same transaction?
Can Advanced Queueing operations and SQL operations be combined in one atomic transaction? I can't find any reference to this in the Oracle AQ documentation and none of the examples show this. In my application I'm having problems that seem like deadlock when I do combine AQ and SQL in the same transaction. However, when I place them in seperate transactions it works.
nullI am also looking for some examples of using SQL/PLSQL w/Advanced Queueing. We currently have the following scenario: One server has non-relational tables; another server has relational tables which house the same data in a relational format. We are looking for a way to migrate the non-relational data to the relational tables and keep the data updated when it changes in the non-relational tables.
We had considered using materialized views, but, this was ruled out because the non-relational tables are created and dropped on a daily basis.
My email: [email protected]
Thanks for any input you may have! -
Help with Flex - PHP - and SQL Server
Good afternoon,
I have been working on this problem for over a week and am at
my wit's end. I am trying to create an application that will allow
me and my fellow statisticians to share code easily. The
technologies at my disposal are Flex, PHP and SQL Server 2005. The
web server is IIS. I have downloaded and installed the PHP driver
for SQL Server 2005 and am able to query the database and generate
XML. The problem I'm having is that I can't return the XML from PHP
to Flex.
If I execute the php code in a web browser and view the
source, it looks like XML. I can then cut and paste the exact same
code into an xml file and read it in from the harddisk and the tree
will populate. Can anyone please help me? I don't have flex builder
so I it's hard for me to use trace and view what is going on.
Thanks in advance,
Eric GravesThanks for the suggestion. I have tried every permutation of
e4x path notation I can think of. You're right, you're not supposed
to need the root level as that's supposed to be returned in the
result. So you should only need to reference first level after the
root. When I do this and launch the .SWF I get a completely empty
tree.
I think the problem lies somewhere in my understanding of
what format Flex needs returned from a HTTPRequest. It's my
understanding that it just needs to be XML. As far as I can tell,
that's what I'm sending it. On the PHP side, does it have to be
cast a special way? Everything I've seen just shows people using
ECHO to output the XML data. -
Lexical reference issue in EBS
Hi All,
I have an XML file with the lexical reference. When I run the report in EBS it gives me Invaild Identifier error.
Following is the the .xml
<?xml version="1.0" ?>
<dataTemplate name="Programs" description="Report" defaultPackage="part_date_range" version="1.0">
<parameters>
<parameter name="p_part_from" dataType="character"/>
</parameters>
<lexicals/>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[
SELECT
msi.concatenated_segments,
SUBSTR (msi.description,1,70) dana_part_desc
FROM
apps.mtl_system_items_kfv msi
WHERE
&lpdpartnum 'FBPTP30036'
]]>
</sqlStatement>
</dataQuery>
<dataTrigger name="afterParameterForm" source="part_date_range.part_range"/>
</dataTemplate>
Package:
CREATE OR REPLACE PACKAGE part_date_range AS
FUNCTION part_range --(p_part_from in Varchar2)
RETURN BOOLEAN;
lpdpartnum varchar2(1000);
p_part_from varchar2(40);
END part_date_range;
CREATE OR REPLACE PACKAGE BODY APPS.part_date_range AS
function part_range return BOOLEAN is
begin
Fnd_File.Put_Line(Fnd_File.LOG,'***********This is the error1***'||p_part_from||'######');
if
p_part_from is not null then
Fnd_File.Put_Line(Fnd_File.LOG,'***********This is the error2***');
lpdpartnum :=' msi.concatenated_segments BETWEEN p_part_from AND';
Elsif
p_part_from is null then
lpdpartnum :=' msi.concatenated_segments <=';
End if;
Fnd_File.Put_Line(Fnd_File.LOG,'***********This is the error3***');
return (TRUE);
end part_range;
END part_date_range;
Parameter value
p_part_from: FBPTP30018
Following is the Error message:
Debug Flag: N
{p_part_from=FBPTP30018}
Calling XDO Data Engine...
java.sql.SQLException: ORA-00904: "P_PART_FROM": invalid identifier
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2599)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2963)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:584)
at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:382)
at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:279)
at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:266)
at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:205)
at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:237)
at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:364)
at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
Start of log messages from FND_FILE
***********This is the error1***FBPTP30018######
***********This is the error2***
***********This is the error3***
End of log messages from FND_FILE
I dont know what I am doing worng.. Any pointers will be greatly appriciated.
Thanks in Advance....Instead of this:
lpdpartnum :=' msi.concatenated_segments BETWEEN p_part_from AND';try this:
lpdpartnum :=' msi.concatenated_segments BETWEEN '''||p_part_from||''' AND'; -
Size Constraints of Lexical Reference Types/Dynamic Queries
Can any Oracle guru's tell me what the maximum length is for a Lexical Reference.
Our project here reads a dynamic sql statement from a table that has been parsed into four seperate columns. We load this into four User Parameters p_select1, p_select2, p_select3, and p_select_4. All are defined as varchar2(2000).
The query in the data model looks like this.
&p_select1
&p_select2
&p_select3
&p_select4
These queries can get quite large. Sometime if it is too large and you run the report it dies a horrible death.
I have read somewhere that the select statement cannot exceed 64k but, I don't know how this relates to how much you can fit into each line of the query.
Hopefully, that makes sense.
Thanks,
BobI should add that we are on Reports6 and Oracle 8. Thanks
Maybe you are looking for
-
Server start or server stop sometimes hands
If I try to delete the server because its not responding to a stop then that does not work too. I deleted the server entry in the server.xml, and this removed the server however I may have screwed something up by doing that! Why do I do when the serv
-
It all started when I somehow got Dosearches.com stuck on my computer.
-
Portal integration with campus management..
Hey there.. I'm totally new to campus management and I want to know how to integrate campus management with EP 7.. is there any business package or how does it work? I will really appreciate any comment.. thanx in advance.. JV
-
Photoshop document changes to 72 dpi from 300 dpi when receiver opens it.
I created an ad for the newspaper at 300 dpi. I emailed it and received a call it was at a low res of 72. I know I created it and saved it properly. I researched and found I should uncheck the resampling box when saving the document. I did that and r
-
"Nike + running" app will not sync with iPhone 5s
Since I got an iPhone 5s last week, my Nike + running app will not sync. Does anyone have experience with this?