Get a insert session value for SQL query at report
Hi friends
I created a global temp table and procedure to support web search form.
and a search result report. The procudure
gets search result from multip tables and
insert into temp table --recordsearch. I can get value from temp table by call procedure
at SQL*Plus.
However, I can not get this value by web report.
How can I get this insert session value and pass to SQL query for report?
Thanks,
Newweb
CREATE GLOBAL TEMPORARY TABLE recordsearch
(emp_id VARCHAR2(200),
ssn VARCHAR2(9),
fname VARCHAR2(200),
lname VARCHAR2(200),
m_name VARCHAR2(200)
) ON COMMIT PRESERVE ROWS;
it possible that your web form does not have a persistent, dedicated connection. if you have connection pooling for example, multiple sessions will see the same instance of the GTT, so if one deletes it, then nobody sees it (or you can see others data). if the connections are not persistent, then they can disconnect between calls, deleting the GTT table.
Similar Messages
-
Create a validation for SQL Query (updateable report)
Hello
I have a need for creating a validation on a SQL Query (updateable report)- type region
1)
When a row get populated i don't want same values to be populated in the second row.(as shown in first 2 rows)
Also, I don't want to have a value that falls in range in between 100 and 1000 for the period falls in the previous. (as shown in third row)
i.e
Type_id
Lower_Limit Upper_Limit Date_From Date _To
1
100 1000 1/1/2013 12/31/2013
2
100 1000 1/1/2013 12/31/2013
3
101 500 2/1/2013 10/31/2013
appreciate any help
thanks
kpThis example could help:
http://apex.oracle.com/pls/otn/f?p=31517:214
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Hi how will get subquery returns multiple values for main query
Hi all ;
here i given one sql query
1)select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '|| initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
b.name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
from table1 a
join table3 c on c.emptype = a.emptype
left outer join table2 b on a.name = b.name
where a.mgrid = 100;
if i run this above query returning multiple values depend on sa.mgr values.
like output coming like this
yes:2000-anbarasan
yes:2700-anb
yes:2000-rasan
yes:2807-anbarasan
yes:2700-anbanu
yes:2000-null
2) this sub query i am passing with main query
select sa.mgrid,sa.sal,(select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '||
initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
b .name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
from table1 a
join table3 c on c.emptype = a.emptype
left outer join table2 b on a.name = b.name
where a.mgrid = 100)" test " from table4 sa,table5 te ,table6 ft where sa.id(+)=te.id and sa.mgr=ft.mgr;
my final out put required like this:
mgrid sal test
100 20000 yes:2000-anbarasan
yes:2700-anb
yes:2000-rasan
yes:2807-anbarasan
yes:2700-anbanu
yes:2000-null
but i am getting erro:
1)missing paranths
2)single row subquery return more then one row.
hi kindly give me answer to me as soon as possible
Edited by: anbarasan on Sep 29, 2008 9:48 PMI refuse to read all of that code and guess what error message you are getting. Apparently others feel the same way.
Run the final SQL statement and then cut and paste the code and full error statement into a post.
Also include your full version number to three decimal places.
My refusal is not an unwillingness to help you but rather an unwillingness to spend 10 minutes reconstructing what you could have pasted in in a fraction of a second. We are all volunteers here and there are many people that need help. I hope you understand. -
SQL Query Cost Report..
Hi all,
I am novice to OEM. I wanted to do / run sql query cost report.. How can i do it in OEM.?? Is it possible to do in OEM..??? Please guide me to solve this problem.??
Your suggestion will be helpful.
Thanks,
-Mahesh.Hi,
Thanks for your reply, but I want info about Oracle Enterprise Manager 10g.
Actual requirement is like this,
We have script files written in Linux Shell scripts, which are related to DB activities like Startup DB, Shutdown DB, perfstat, checking free space etc etc. These we want to migrate into OEM using OEM built-in features, few of which we've already migrated. We have analyzed scripts. One of the script is for SQL Query Cost Report (Which i didn't get what it does..)
So is there any option/inbuilt feature through which we can do "SQL Cost Report".
Once again thanks for your reply.
-Mahesh. -
SQL Query (updateable report) Region - Conditionally Hide and Set Values
SQL Query (updateable report) Region - Conditionally Hide and Set Values
Outline of requirement :-
Master / Detail page with Detail updated on same page using SQL Query (updateable report).
The detail region has the following source
SELECT item_id,
contract_id,
CASE WHEN hardware_id IS NOT NULL THEN
'HA'
WHEN backup_dev_id IS NOT NULL THEN
'BD'
WHEN hardware_os_id IS NOT NULL THEN
'HS'
END item_type,
hardware_id,
backup_dev_id,
hardware_os_id
FROM "#OWNER#".support_items
WHERE contract_id = :P26_CONTRACT_IDThe table support_items implements arced relationships and has the following columns
CREATE TABLE SUPPORT_ITEMS
ITEM_ID NUMBER NOT NULL,
CONTRACT_ID NUMBER NOT NULL,
HARDWARE_ID NUMBER,
BACKUP_DEV_ID NUMBER,
HARDWARE_OS_ID NUMBER
)A check type constaint on support_items ensures that only one of the fk's is present.
( hardware_id IS NOT NULL
AND backup_dev_id IS NULL
AND hardware_os_id IS NULL
OR ( hardware_id IS NULL
AND backup_dev_id IS NOT NULL
AND hardware_os_id IS NULL
OR ( hardware_id IS NULL
AND backup_dev_id IS NULL
AND hardware_os_id IS NOT NULL
) Hardware_Id is a FK to Hardware_Assets
Backup_dev_id is a FK to Backup_Devices
Hardware_os_id is a FK to Hardware_op_systems
The Tabular Form Element based on item_type column of SQL query is Displayed As Select List (based on LOV) referencing a named list of values which have the following properties
Display Value Return Value
Hardware Asset HA
Backup Device BD
Computer System HSThe Tabular Form Elements for the report attributes for hardware_id, backup_dev_id and hardware_os_id are all Displayed As Select List (Based on LOV).
What I want to do is only display the Select List for the FK depending on the value of the Select List on Item Type, e.g.
Item_Type is 'HA' then display Select List for hardware_id, do not display and set to NULL the Select Lists for backup_dev_id and hardware_os_id.
Item_Type is 'BB' then display Select List for backup_dev_id, do not display and set to NULL the Select Lists for hardware_id and hardware_os_id.
Item_Type is 'HS' then display Select List for hardware_os_id, do not display and set to NULL the Select Lists backup_dev_id and hardware_id.
There are properties on elements to conditionally display it but how do we reference the values of the SQL query Updateable region? they are not given a page item name?
Also on the Tabular For Elements there is an Edit tick against a report item - however when you go to the Column Attributes there is not a property with which you can control the Edit setting.
What's the best way of implementing this requirement in APEX 3.1?
Thanks.>
Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far... -
Update Field On Change For A SQL Query (updateable report)
Hi,
I'd like to request help from anyone with ideas on how to solve this.
We are using APEX 4.2, 10GR2, RedHat5.
I have a report that comes from SQL Query (updateable report).
I'm using the apex_item.text and apex_item.hidden on fields.
I'm using a button to submit and after submit process to add some logic that I need.
There could be 1 - 10 records in the report.
There is only 1 field that is needed to enter a value, but the value of this field determines the value of another field.
I think that I can do this with a submit button and an after submit process where I loop through all the records. I think I have this handled.
This is the question
When the value of that field is changed then the value of another field in the same row changes immediately.
Is this possible?
All the examples I've seen so far are for a single record and that doesn't work for us.
I guess this is a MRU process but I haven't seen an example where a dynamic action is possible on a Multi Row Update.
Could anyone direct me to where I can see an example or help me get directions?
I appreciate all your help an comments and I thank you in advance.Yes why not...what you looking for is a ajax call
See {message:id=10390979}
Please note:-you can also do this as a dynamic action as shown below
Event: Change
Selection type: jQuery Selector
jQuery Selector: input[name="f01"]
True action with Execute JavaScript Code and put all code inside the test funtion, you may need to amend the code to use this.triggeringElemnt in place of this -
Hi ,
Ident_Current('TableName') is not giving last inserted identity Value in SQL Server 2012.
Latest Value of ID and Ident_Current is differing for that particular table.
Why its happening? Ident_Current value is greater than last inserted ID.
Please guide me why its happening?Here is one example:
CREATE DATABASE PMCtest ON (NAME = 'PMCtest', FILENAME = 'B:\ProdDB-Unzipped\PMCtest.mdf', SIZE = 25GB )
LOG ON (NAME = 'PMCtest_log', FILENAME = 'B:\ProdDB-Unzipped\PMCtest.ldf', SIZE = 2GB)
CREATE TABLE identity_crisis (a int IDENTITY NOT NULL PRIMARY KEY,
b sysname NOT NULL CHECK (b <> 'sysschobjs'))
go
INSERT identity_crisis (b) VALUES ('First name')
INSERT identity_crisis SELECT name FROM sys.objects
go
SELECT MAX(a), ident_current('identity_crisis')
FROM identity_crisis
go
DROP TABLE identity_crisis
Because the second INSERT statement fails, the identity values from 2 to 12 are lost. This is a very intentional design to promote high concurrency. If you don't want gaps, you should not use IDENTITY, but roll your own.
Also, beware that ident_current returns database-wide value, so if you insert one row, and another process inserts another row before you interrogate ident_current, you will get the id for the row of the other process.
Erland Sommarskog, SQL Server MVP, [email protected] -
How to insert / Update value for PFAKT in BP Relationship
Hi Friends / Experts,
How to insert the value for PFAKT ( Function value ) in BP Relationship in BP tcode , in SAP CRM.
I have tried it but it BAPI_BUPR_CONTP_CREATE. But I need it with BAPI_BUPR_RELATIONSHIP_CREATE Function Module.
Please help me out.
Any Enhancement points in BAPI_BUPR_RELATIONSHIP_CREATE or any user exists. Please let me know.
Regards,
KMF.you can also acheive this using MERGE( available in sql 2008 and above).
also, you are referring to DTS. DTS is legacy solution now..are you using sql 2000, you can use ssis, if you want and it available in sql 2005. as said, there are multiple ways you can do this.. it find the below one a easy solution, since your are
talking about only one table..
try this example..
create table test1(sno int primary key,sname varchar(20),scity varchar(20))
go
create table test2(sno int primary key,sname varchar(20),scity varchar(20))
go
insert into test1
values(1,'stan','atlanta'),(2,'william','newyork')
go
insert into test2
values(1,'robin','orlando')
go
--set this in you sql job and let it run for every half an hour
MERGE test2 t2
USING test1 t1
ON t2.sno = t1.sno
WHEN MATCHED THEN
UPDATE
SET t2.sname = t1.sname,t2.scity=t1.scity
WHEN NOT MATCHED by target THEN
Insert(sno,sname,scity)
values (sno,sname,scity);
go
--check this table and clean up
select * from test2
go
drop table test1
go
drop table test2
Hope it Helps!! -
How to insert the records using sql query
hi,
i insert the record uisng sql query and DOTNET programme successfully and increase the doc num .ubut when i try to add record using SAP B1 the old Doc no show.It means its not consider the docnums which are not inserted by sql query.
how can i solve this problem?
Regards,
M.Thippa ReddyYou are not support use Insert / Update / Delete on SAP Databases directly.
SAP will not support any database, which is inconsistent, due to SQL-Queries, which modify datasets or the datastructure of the SAP Business One Database. This includes any update-, delete- or drop-statements executed via SQL-Server Tools or via the the query interface of SAP Business One
Check SAP Note: 896891 Support Scope for SAP Business One - DB Integrity
[https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E¬e_numm=896891] -
Error in BP: insert valid value for bp
Hello experts,
we use msa 50sp11 and it works fine, but sometimes
we have problems with creating/changing activitis to a bp:
error in BP: insert valid value for bp - error 2007 mtbfll
This happens after the user have made some changes to the bp and
replicated it. Then sometimes we get this error.
On other client with the same bp, there I do not get this error althoug the changes are there too.
When I then download an extract 'customer hierarchy' to the affected client, then
the user can work with the bp without problems again.
Does anybody know what there the problem could be ?
Thanks
GerdI am so pleased to see this post on the forum.
We have been having exactly the same issue intermittently since upgrading to SP11 but it is incredibly difficult to replicate.
It looks like a short record is missing but when checking the entry in SMOKNA1SHT, it has a full record there.
For us, we have generally seen it when navigating from the calendar, and then clicking the back button and for some reason, it does not seem to call the record from SMOKNA1SHT properly.
Closing MSA and reopening fixes it.
I believe that we raised an OSS but it is so difficult to replicate, it makes it vitually impossible to troubleshoot.
We are actually going to be replacing SMOKNA1SHT with a view in January, so it will be interesting to see if that fixes the issue - if it is framework, then it should not.
As well as the reported message, we had another one in the background that was half in English, half in French saying something like "Transferring the objects from cMSAActivities in section _IAC failed. Details: Not possible to carry out a cast from an object of type 'MSA.SCalendarTS' to type 'MSA.SMSAACTactoverview'"
That may not be the exist message as my French is a little shaky
Just so you know that we share the pain of this error
Regards
James -
How to get the list of values for a dynamic parameter using Web Services SDK?
<p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>
<p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>
-
How to get the current month value for a customer exit variable?
How to get the current month value for a customer exit variable?
And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
Thanks!Hi Kevin,
Check here........
Re: Customer Exist for "From Current Date To Month End"
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
Cal month
Regards,
Vijay. -
Insert three values for each record
I have a very complex Data Flow, with several joins, splits, etc.... once all of this logic is completed, I need to insert the values 2013, 2014, and 2015 for a Derived Column (called Year). Each record that comes through this data flow needs to have
a duplicated entry three times, and insert these values for the year.
Here's a simple example source:
Key Name
1 Brandon
2 Thomas
So the target should end up being:
Key Name
Year
1 Brandon
2013
2 Brandon
2014
3 Brandon
2015
4 Thomas
2013
5 Thomas
2014
6 Thomas
2015
Can anyone help?
There are only 10 types of people in the world... those who know binary, and those who don't.Hi,
Try this,
1. Load the data into your destination with 2013 as a derived column.
2. Have an another Dataflow task to load one more time. (Select the distinct record from dest table - have an id key and take distinct based on that or please check for your data nature). After selecting the distinct records, have 2014 as derived column
in that DFT.
3. Again have another DFT to load for 2015.
This is a static method since you have only 3 years to insert. If you have more years like this, do a loop to achieve this logic.
--------------------Mark as Answered or Vote as helpful if this solves your problem.------------------ -
Possible APEX BUG - Export to CSV from SQL Query (updateable report)
I'm getting a the following sql error - just by enabling the Export to a CSV file from a SQL Query (updateable report) and selecting the export link - anyone have an idea what I could as a workaround?
ORA-06550: line 1, column 45: PLS-00103: Encountered the symbol "1" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
Error ERR-1000 Unable to determine LOV from "declare function x return varchar2 is begin 1 Not Checked;1 Not Checked,2 Review Passed;2 Review Passed,3 Reviewed w/ Issues;3 Reviewed w/ Issues,4 Not Applicable;4 Not Applicable return null; end; begin wwv_flow_utilities.g_query := x; end;".
OK
report error:
ORA-20001: Error fetching column value: ORA-20001: Query must begin with SELECT or WITHFrank,
I received your email with this same question so I'll just respond here. Our internet-facing hosted site apex.oracle.com allows you to request a workspace and, after the request is approved and the workspace provisioned, to develop applications there. If you already have an application that you need some help with, you can import/install it into your workspace on apex.oracle.com. This makes it easy to demonstrate problems to others who might be able to help.
Sometimes it will be necessary for you to create developer accounts in your workspace in order for others to use your Application Builder. You can post usernames/passwords here or you can convey those privately to those offering their services. In either case, you'd want to remove or disable those accounts as soon as the problem is resolved. For problems that I ask to see demonstrated on apex.oracle.com, it is not necessary for you to create an account for me. I can do that as our group runs the site. I just need to know your workspace name and application ID.
Scott -
Problem With SQL Query (updateable report)
Hi,
I have a report which I have set as type 'SQL Query (updateable report)'. I have added a 'row selector' to the report but when I run it I get the following error message:
failed to parse SQL query:
ORA-00904: "COL60": invalid identifier
The report works fine if I remove the row selector. Any ideas as to why the error is being produced?
Cheers
SimonI don't have the apex_application.g_f01(i) referenced in the page source...In the page source you wouldn't find anything by that name
Identify the tabular form's checkbox column in the page(firebug/chrome developer panel makes this easy)
It should be like
<input id="..." value="" type="checkbox" name="fXX" >we are interested in the name attribute , get that number (between 01 and 50)
Replace that number in the code, for instance if it was f05 , the code would use
apex_application.g_f05
--i'th checked record' primary keyWhen you loop through a checkbox array, it only contains the rows which are checked and it is common practice to returns the record's primary key as the value of the checkbox(available as the the i'th array index as apex_application.g_f05(i) , where i is sequence position of the checked row) so that you can identify the record.
Maybe you are looking for
-
How to get rid of files on time machine that no longer exist
I replaced my computer several months ago when my old one died. A large amount of data which was in a partition on my old computer is still on my time machine and is taking up a lot of space and forcing time machine to delete backups much sooner than
-
Hard drive took a dump and trying to find iCal files....
my hard drive just took a dump and I am trying to extract what data I can using DiskWarrior and I am trying to find iCal calendar files so I can manually import them. Where are they? Not in Application Support as I would have expected. Any ideas?
-
Finding photos on hard drive that are not in PSE?
There may be an easy way to do this, but I can't figure it out. I would like to identify all of the photos scattered around my hard drive that have not been added to a PSE catalog. Is there an easy way to do this? Any help appreciated.
-
Solution Manager and Business Object
Hi all, Have you seen any specific information (from SAP or others) indicating how SAP plan to integrate the Business Object Products into Solution Manager? First of all I need information about the SOLAR01/02 transactions (e.g. will separate Busines
-
I can not text individuals who do not have iPhones or IPads from my iPad.