PO related query
Hi,
We are using the function module BAPI_PO_CREATE for creating PO's,after creating PO it is sent to the vendor through mail or fax and the status is green.
Our requirement is that the PO created should not be sent immediately to the vendor, the status of the message(fax or mail) should be yellow.
Please let me know how this can be done.
Regards
Vimal
Hi,
Just have a look @ME23N-->Messages--->Further Data---->Dispatch Time-.
If option is 4 It will be sent as soon as save button is pressed. Use option 1.As mentioned in the F1 Help , report pgm RSNAT00 may be scheduled periodically or started manually as per the needs.
I hope this helps,
Regards
Raju chitale
Similar Messages
-
The workbook report no authorization, but related query can show part data
Dear All,
We meet an error, The workbook report no authorization, but related query can show part data.
We have a workbook, it have 1 queries, and when we key in condition to run it, in one field we put on one more condition(Z3XXX = ' WZO' & ' WZA")(User didn't have authorization for this condition), and workbook report no authorization.
Then we checked authorization check log and it show "You do not have sufficient authorization on Z3XXX = ' WCO'.
But when we execute the related query with same condition. the query can open and show WZA's data.
I'd like to know the reason.
thanks & Best Regards,
Kent YuDear All,
We meet an error, The workbook report no authorization, but related query can show part data.
We have a workbook, it have 1 queries, and when we key in condition to run it, in one field we put on one more condition(Z3XXX = ' WZO' & ' WZA")(User didn't have authorization for this condition), and workbook report no authorization.
Then we checked authorization check log and it show "You do not have sufficient authorization on Z3XXX = ' WCO'.
But when we execute the related query with same condition. the query can open and show WZA's data.
I'd like to know the reason.
thanks & Best Regards,
Kent Yu -
Multi-part related query reports
http://download-east.oracle.com/docs/html/B10310_01/orbr_concepts1.htm#1012365
Can someone provide me better info about 'Multi-part related query reports 'Hi,
yes you can have multiple query in your report. So you have multiple groups in your data model. Then you must put multiple repeating frames in your layout in order to extract data from your queries, selecting the desired group in the source property of your repeating frame.
Bye
Raffy -
How can I related Query name with Query elements?
Hello gurus!
I am working with BI7, content technical, well I need to find out a solution where I can related Query name with query elements (KYF, CKY, Restricted Key Figures, var, etc)
In master data 0tctquery, exist the query element, but, I can not related with object are from what query...
Do you know how I can do it??? some solution???
Best Regards"it is impossible to relate both tables" ???
hmmm... these are exactly the tables the Query Designer uses to "build" up the query... so trust me, they do relate
now to get this information in an InfoCube is a totally different thing... how do you expect to report on this if you should get it in an InfoCube? let's take a simple example... assume you have a query (QUERY_1) which looks like:
Sales Sales
Sales Org Customer Qty Value
1000 ABC 10 PC 500
1000 DEF 5 PC 250
in your Cube you would get:
QueryName QueryElement
QUERY_1 0SALESORG
QUERY_1 0CUSTOMER
QUERY_1 ZSLSQTY
QUERY_1 ZSLSVAL
if you have free characteristics, you'll add more lines... same for variables, CKFs, RKFs, conditions, ...
I guess it would be better to create a little ABAP report using the above tables (oh, you'll be needing a lot more tables if you wish more detail) -
Converting Relational query to XML
set serveroutput on
This is the code of a query to convert a relational query to xml. This code runs fine when I place the where condition at the end. e.g. where h.hospital_id=1. however when i place no such condition it begins returning errors such as
set serveroutput on
set long 10000000
set linesize 50000
set lines 20000
set pagesize 0
set pages 5
set feedback off
set head off
SET TRIMSPOOL ON
set long 200000000
set linesize 32000
set pagesize 0
set pages 0
set feedback off
set head off
Select XMLELEMENT("have:HospitalStatus",XMLAttributes('urn:oasis:names:tc:emergency:EDXL:HAVE:1.0 edxl-have_cs01.xsd' AS
"xsi:schemaLocation",
'urn:oasis:names:tc:emergency:EDXL:HAVE:1.0' AS
"xmlns:have",
'http://www.georss.org/georss' AS
"xmlns:n3",
'http://www.opengis.net/gml' AS
"xmlns:gml",
'http://www.w3.org/2001/XMLSchema-instance' AS
"xmlns:xsi",
'urn:oasis:names:tc:ciq:xal:3' AS
"xmlns:xal",
'urn:oasis:names:tc:ciq:xnl:3' AS
"xmlns:xnl",
'urn:oasis:names:tc:ciq:xpil:3' AS
"xmlns:xpil"
xmlagg(
xmlelement("have:Hospital",
xmlforest
( h.hospital_id,
xmlforest(
xmlforest(
h.name,
h.info,
h.addresses ,
h.contact_numbers) as "OrganizationInformation",
xmlforest(
h.geo_location) as "OrganizationGeoLocation",
h.comments) as "Organization"
xmlelement("have:EmergencyDepartmentStatus",
(select xmlagg(
xmlforest(
eds.date_updated,
xmlforest(
eds.ems_traffic_status,
eds.ems_traffic_reason) as "EMSTraffic",
xmlforest(
tcl.url,
tc.date_updated,
tc.code_value,
tc.ems_capacity
) as "EMSCapacity",
xmlforest(
tcl.url,
tc.date_updated,
tc.code_value,
tc.ems_census) as "EMSCensus",
xmlforest(
eds.ems_amb_offload_status,
eds.ems_amb_offload_min) as "EMSAmbulanceStatus",
xmlforest(
eds.ems_air_offload_status,
eds.ems_air_offload_min )as "EMSAirTransportStatus"
from EmergencyDepartmentStatus eds,TriageCode tc,TriageCodeListURN tcl
where eds.hospital_id = h.hospital_id and tc.hospital_id = h.hospital_id and tcl.hospital_id = h.hospital_id)),
xmlelement("have:HospitalBedCapacityStatus",
(select xmlagg(xmlelement("have:BedCapacity",
xmlforest(
mb.date_updated,
mb.bed_no,
mb.bed_type,
xmlforest(
mb.capacity_status,
mb.available_count,
mb.baseline_count,
mb.additional_24hr,
mb.additional_72hr) as "Capacity",
mb.comments
from MainBeds mb
where mb.hospital_id = h.hospital_id and mb.bed_no NOT IN(select mb.bed_no from MainBeds mb, SubBeds sb where mb.bed_no=sb.bed_no )
(select xmlagg(xmlelement("have:BedCapacity",
xmlforest(
mb.date_updated,
mb.bed_no ,
mb.bed_type,
xmlforest(
mb.capacity_status
) as "Capacity",
mb.comments
),(select xmlagg(
xmlforest(
sb.date_updated,
sb.bed_no,
sb.sub_bed_no,
xmlforest(
sb.capacity_status,
sb.available_count,
sb.baseline_count,
sb.additional_24hr,
sb.additional_72hr) as "Capacity",
sb.comments
)from SubBeds sb where mb.bed_no = sb.bed_no and sb.bed_no=h.hospital_id )
from MainBeds mb
where mb.hospital_id = h.hospital_id and mb.bed_no in (select unique mb.bed_no from MainBeds md, SubBeds sb where sb.bed_no=mb.bed_no))
xmlelement("have:ServiceCoverageStatus",
(select xmlagg(
xmlforest(
scs.date_updated,
scs.burn,
xmlelement("CardiologySubType",
xmlforest(scs.cardiology_invasive,
scs.cardiology_non_invasssive)) as "CardiologyIndicator",
scs.dialysis,
scs.emergency_dept,
scs.hyperbaric_chamber,
scs.infectious_diseases,
scs.neonatology,
xmlforest(xmlforest(
scs.neurology_invassive,
scs.neurology_non_invasssive) as "NeurologySubType") as "NeurologyIndicator",
xmlforest(xmlforest(
scs.obgyn_with_labor,
scs.obgyn_without_labor) as "OBGYNSubType")as "OBGYNIndicator",
scs.opthalmology,
scs.orthopedic,
scs.pediatrics,
xmlforest(
xmlforest(scs.psychiatry_adult_general,
scs.psychiatry_pediatric) as"PsychiatrySubType")as "PsychiatryIndicator",
xmlforest(
xmlforest(
sst.date_updated,
sst.general_ward,
sst.adult_general,
sst.pediatrics,
sst.orthopedics,
sst.nuero_surgery,
sst.facial,
sst.cardio_thoracic,
sst.hand,
sst.reimplantation,
sst.spinal,
sst.vascular,
sst.anesthesia) as "SurgerySubTypes") as "SurgeryIndicator",
xmlforest(xmlforest(
scs.ambulance_services,
scs.air_transport_services) as "TransportServicesSubType") as "TransportServicesIndicator",
xmlforest(xmlforest(
scs.trauma_service,
scs.trauma_service_level) as "TraumaCenterServicesSubType")as "TraumaCenterServicesIndicator"
from ServiceCoverageStatus scs, SurgerySubTypes sst
where scs.hospital_id = h.hospital_id and sst.hospital_id = h.hospital_id)),
xmlelement("have:HospitalFacilityStatus",
(select xmlagg(
xmlforest(
hfs.date_updated,
hfs.hospital_eoc_status,
hfs.hospital_eoc_plan,
hfs.clinical_status,
xmlforest(
dc.date_updated,
dc.decon_capacity_status,
dc.amb_patients_capacity,
dc.non_amb_patients_capacity) as "DeconCapacity",
xmlforest(
mc.date_updated,
mc.morgue_capacity_status,
mc.morgue_capacity_units) as "MorgueCapacity",
hfs.facility_status,
hfs.security_status,
xmlforest(
ah.date_update,
ah.admissions,
ah.discharges,
ah.deaths) as "Activity24hr",
hfs.comments,
hfs.clinical_operations,
hfs.resources_information
from HospitalFacilityStatus hfs,Activity24hr ah,MorgueCapacity mc,DeconCapacity dc
where hfs.hospital_id = h.hospital_id and ah.hospital_id = h.hospital_id and mc.hospital_id = h.hospital_id
and dc.hospital_id = h.hospital_id)),
xmlelement("have:HospitalResourceStatus",
(select xmlagg(
xmlforest(
hr.date_updated,
hr.staffing,
hr.facility_operations,
hr.clinical_operations,
hr.comments
from HospitalResourceStatus hr
where hr.hospital_id = h.hospital_id)),
xmlforest(h.last_update_time) as "UpdateTime"
))).extract('/*')
from hospital h;__________________________________________________________________________________________________________
ERROR:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00225: end-element tag "HOSPITAL_EOC_STATUS" does not match start-element tag "have:HospitalStatus"
Error at line 1
ORA-06512: at "SYS.XMLTYPE", line 111
Edited by: 872489 on 14-Jul-2011 03:59
Edited by: 872489 on Jul 14, 2011 9:11 AM
Apologies for lack of formatting earlierPlease repost this and use the tag with some decent formatting.
See the FAQ Posting Guidelines on the main page of this XMLDB OTN Forum -
Dear All,
Why do we use LDB in HR module?
What is the difference between the infotypes and tables ?
Do we use LDB in other modules?
Thanks,
Santhiya.BHi
Infotypes are nothing but information objects which are used in SAP HR Module
They also contain data and we can use Select Statements to fetch the data from these infotypes
HR deals with the INFOTYPES which are similar to Tables in General ABAP.
There are different ways of fetching data from these infotypes.
There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
Infotypes for these areas are different from one another area.
storing of records data in each type of area is different
LDBS like PNP are used in HR programing.
Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
On the whole Normal ABAP is different from HR abap.
For Personal Admn the Infotypes start with PA0000 to PA1999
Time Related Infotypes start with PA2000 to PA2999.
Orgn related Infotypes start with HRP1000 to HRP1999.
All custom developed infotypes stsrat with PA9000 onwards.
In payroll processing we use Clusters like PCL1,2,3 and 4.
Instead of Select query we use PROVIDE and ENDPROVIDE..
You have to assign a Logical Database in the attributes PNP.
LDB is a general concept which is used in other module also
It is another way of fetching data from database tables using GET and GET LATE commands
see the doc
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Re: **LDB**
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
<b>
Reward points for useful Answers</b>
Regards
Anji -
Displaying all related Query Views of an opened Query via DropDown
Hello Gurus,
I have following requirement in WAD for SAP BW 7:
All Query Views related to a opened Query should be displayed and selectable via a DropDown Item.
In the standard WebTemplate 0Analysis there is already implemented a DropDown Item called "QueryView Selection" but i dont get it working like in the BW 3.5 template 0adhoc.
Has anyone a solution or hint?
Edited by: D. Gehle on Jan 13, 2011 2:15 PM
Edited by: D. Gehle on Jan 13, 2011 2:15 PMHi Shantanu
Thank you for your reply.
I made a trace in the web by putting &TRACE=X at the end of the string.
I tried to analysis the transaction RSRTRACE and looked at the All Logs button against my user id.
Firstly, i do not seem to understand what this produces other than the debug session. I could not also seem to find any information that assisted me on how to produce a log file, and information that indicates what you have said in your reply.
If you could further assist providing info on how to use the debugger/log file, and how to read
- used processors
Thank you.
Simon -
LBACSYS related query consuming 30% of db time
HI,
Below query has been consuming more than 30% of db time for past few days.
BEGIN LBACSYS.lbac_events.logon(dbms_standard.login_user); END;
This is related to Oracle Label security.
Can someone suggest any workaround for this,Pl do not post duplicates - related to migration of db from sql server to oracle 11 g
Continue the discussion in your original thread
The error message is explicitly clear
ora :01440 : can not insert null into migrlog (id column)
Your process is trying to insert a NULL value into the ID column, which presumably cannot be NULL -
Drag & Relate Query iView Problem
Hi,
I just trying the weblog
1-2-3 Drag&Relate (or D&R for dummies)
So all the steps mentioned in that i have followed properly but in Content Admin --> unification under Business Objects i do get sales and stores and i define them according to weblog as source and destination but under <b>edit</b> mode Relation Type is <b>Empty</b> which i think should be <b>manual</b> or something and all the other things are same as shown is screen-shot of the weblog and also in the enduser screen i get message
<b>Query execution failed. Exception message: Error trying to execute a query statement against MetaMatrix: Error trying to establish connection to the EIS : null</b>
So i have no clue what could be possible problem
Kindly Help
Regards,
RickyHi,
Drag&Relate and Related links iviews are 2 different types of iviews.
1) Drag&Relate iview is part of the unification capability of the portal which can be used to get meaningful data by creating relations between business objects. Check
http://help.sap.com/saphelp_nw04/helpdata/en/76/c6693e54d6d112e10000000a11405a/frameset.htm
2) Related links iviews are iviews which are added as links or refernce iviews to existing iviews or pages so that it is easier to find them while navigating in the portal.
http://help.sap.com/saphelp_nw04/helpdata/en/c3/5f6c3eabbce712e10000000a11405a/frameset.htm
Cheers!! -
Hi,
I understand there are lots of examples related to Active Data Service over the internet. But my query is a bit specific.
If I want to include a (Real) data source instead of faking it through Threads, what would be inside the following methods.
void startActiveData(Collection<Object> rowKeys,int startChangeCount){}
void stopActiveData(Collection<Object> rowKeys){}
Any sample (runnable) code would be much much appreciated.
Thanks in advance!Timo Hahn wrote:
Well, me be you don't get answers as you don't give enough information to work on. Your question is a bit ambiguous, and you did not even give your jdev version.
TimoOk, let me put my query in another way.
I just want a sample code to be written inside the following two methods.
void startActiveData(Collection<Object> rowKeys,int startChangeCount){}
void stopActiveData(Collection<Object> rowKeys){}
wrt to this link http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/adv_ads.htm#CIHDIGID where these methods are not implemented. (they have commented out like "// Not needed. We do not need to connect to a (real) active data scource."). Can I have a sample method implementation with "real" datasource?...
vinod_t_krishnan wrote:
will this be helpful
http://www.orastudy.com/oradoc/selfstu/fusion/doc.1111/e15524/uc_async_dynamic.htm
http://prsync.com/oracle/building-a-real-time-twitter-client-with-oracle-adf-18495/
Thanks for the links but i've already gone through them, but doesn't cater to my need.
Regards!
Sorry forgot to add I'm using jdev 11gR2.
Edited by: adf_user on Aug 26, 2011 3:50 AM -
Mobile/Handheld client related query
hello all,
I have a query regarding handheld/mobile client. Does siebel gateway server come into picture when a mobile/handheld client synchronizes with siebel server? Iff yes then how?
ThanksYou're asking lots of questions and some are kind of loaded. But I'll chime in for some of them.
Web Service
In .Net I have created WCF services. What is the Java equivalent? Is it EJB?Definitely not EJB. The closest would be web services or RPC
Data Synchronisation
.Net has a Sync Framework. Basically it allows you to synchronise data from a main database (usually SQL Server) to a database on the mobile device (usually SQL Server CE). Is there a Java equivalent?My impression is not that this is specifically .NET, or at least not something you have to write code against. It's a service that you buy and deploy, right?
UI and UI Markup
The last time I used Java, Swing was what was used. Is that still the case? Is there a Java equivalent of Xaml? Xaml is an Xml like markup language which Microsoft uses for defining UI. It is very useful.There is no xaml equivalent. Swing it is as far as I know.
Data/Business Layer Utility
Is there are tool which will allow you to point at a data structure and pump out class files which reflect the database's structure? .Net has something called Entity Framework for this.Sounds like a job for Hibernate or similar ORM tool to me.
Auto Generation of Web Services
This is related to the first item Web Service, and the above item. Is there a way to pump out the services services automatically? In .Net I have written libraries that pump out Web Methods for saving, loading and deleting records in each of the tables in the database. Microsoft has something called RIA Architecture for this. Is there an equivalent in Java? I have no comment on this. -
GR 55 report updation and ke30 report related query.
hi
The GR 55 report is not matching with the GL transactions. There are some GL codes which are not appearing in the report at all. Kindly let me know where i can add the GL codes linking to the above report.Also there is difference in the report figure appearing for certain GL compared to the gl code balances.
Also Where i can get the linking tables for the data coming in KE30 reort please.
regards
sathyayour looking Gl balances relating to cost center reports(Library -1VK Cost Centers) or profit center reports(Library- 8A2 EC-PCA)?
If your looking for the above go to GRR2, go the library(if it is cost center related 1VK, Profit center related 8A2) and double click on your Zreport and double click on the relevant account and check the gl accounts in characteristic values.
If it is relating to Financial Statement Key Figure go to FSI2, select the relevant report and check the same way
for more information about report painter/writer please look at the below link, you can get the clear picture.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erpfi/report+painter -
Help with histogram related query
Hi there,
I'm trying to collect data through a query to draw an histogram. Its between lag count and user count.
Here's my query,
select (Y.lag_range /10) * 10 as range_start,
(((Y.lag_range/10) + 1) * 10) -1 as range_end,
sum(Y.user_count) as user_count
from (
(SELECT ((a.lag )) AS lag_range, COUNT(DISTINCT a.user_id) user_count
FROM testobj a INNER JOIN testobj b
ON a.user_id = b.user_id
GROUP BY ((a.lag) )
)Y
group by ((Y.lag_range /10) * 10), (((Y.lag_range/10) + 1) * 10) -1
The inner query gets the different lag count and user count. The outer query tries to group the lag count in different ranges like 0-9, 10-19, 20-29 and so on.
In my query, the outer query doesnt seem to have any impact and still gives the same answer like the inner one.
I get something like this.
RANGE_START RANGE_END USER_COUNT
0 9 2
1 10 1
2 11 2
3 12 1
when the actual out should be:
RANGE_START RANGE_END USER_COUNT
0 9 6 ( 2 + 1 + 2 + 1)
10 19 6
20 29 5
30 39 4
Could someone tell me what am I missing?
I appreciate any suggestion.
Thanks,Hi,
Whenever you have a question, you should post a little sample data and the results you want from that data.
MyNewWorld wrote:
I'm trying to collect data through a query to draw an histogram. Its between lag count and user count.
Here's my query,
select (Y.lag_range /10) * 10 as range_start,
(((Y.lag_range/10) + 1) * 10) -1 as range_end,
Could someone tell me what am I missing?You might be missing a call to TRUNC.
(x / 10) * 10is just the same as
xIf you want to round to the next multiple of 10 toward 0, you should say
TRUNC (x / 10) * 10In some languages, dividing one integer by another always returns an integer. SQL is not one of those languages. For example, if you divide 6 by 10 in SQL, the result is .6, and multiplying that by 10 brings you back to 6. <tt>TRUNC (6 / 10)</tt>, however, returns 0 (because 0 is the next integer towards 0 from .6). -
Retail: IS-Retail sytem and POS related Query in SAP Testing
Hi Experts,
I am expecting clear answer for my query.I am going to sit in SAP Testing project so i just want to know the t-codes which we use to send the O/B IDOCs to POS and the I/B IDOCs from POS to SAP R/3 system.What's the t-code i have to use if i didnt send my IDOCs to POS(where i have to monitor the POS O/B?i want t-code).What's the t-code i have to use if i am not able to get the IDOC or Data from POS to my R/3 system.(where i have to monitor the POS I/B? expecting t-code).I want complete process from R/3 to POS and from POS to R/3.I just want to know what t-code do we use in SAP Testing project as an SAP IS-Retail Functional consultant with SD.Hope for reply from SAP experts and hope for clear and step by step t-codes and procedure from experts.Thanks in Advance.
Regards
SandhyaHi
1) ECC to POS : a) WDBM_HPR tcode is use to trigger idoc for assortment list
b) WPMA tcode is used for triggering idocs for MC based promotion,Merchandise Hirarchacy & mixmatch discounts.
2) POS to SAP R/3 : data will pass through XI. POS Tlog files will be used by XI to process data into SAP.
WPUUMS & WPUTAB Idocs will be used to send data to R/3.
we can check in R/3 by using Tcode WPER for the creation of billing documents & Article documents.
Error handling :
1) check in weo5 & in XI monitoring for outbound idocs.
2) check in we05 inbound & in XI for inbound monitoring.
Regards
Abhijit -
PL/SQL cursor-collection related query
Hi all,
I have a function which will take a collection (table of numbers) as a input argument.
Each id in the collection corresponds to a set of columns.I need to return a cursor which will contain the resultsets for all the ids in the collection.How do i do it.
what should the query be ?
say each id has three columns a,b,c to be returned.
I am given the collection of ids and am supposed to return a cursor which will have a,b,c columns for all the ids.
For individual ids , its straight forward
select a,b,c from sometable where id=input_id.
But how do i construct the cursor given a collection of ids?
Thanks in advance.Hi,
Please see the below example:
SQL>CREATE TABLE T ( ID NUMBER(2),a NUMBER(2),b NUMBER(2),c NUMBER(2));
Table created.
SQL>SELECT * FROM t;
ID A B C
1 12 13 15
2 21 31 51
2 rows selected.
SQL>
Use the below query to create your cursor :
SQL>SELECT a,b,c FROM t tb1, TABLE( TBL_TYPE(1,2)) tb2 WHERE tb1.id = tb2.column_value;
A B C
12 13 15
21 31 51
2 rows selected.
SQL>Regards -
Problem with REGEXP_SUBSTR related query.
I am having a problem with this query:
SELECT *
FROM ( SELECT REGEXP_SUBSTR ('{SUMMER}|{POINT OF SALE}',
'({)([A-Z]+ *[A-Z]*)(})',
1,
LEVEL,
'i',
2)
val
FROM DUAL
CONNECT BY LEVEL <=
REGEXP_COUNT ('{SUMMER}|{POINT OF SALE}', '|') + 1)
WHERE val IS NOT NULL
I need the output in 2 rows in this format:
VAL
====
SUMMER
POINT OF SALE
But I am not able to get 'POINT OF SALE' in the output because of the blank space, or maybe some other reason. Can anyone correct my query?So you want something like this?
SQL> ed
Wrote file afiedt.buf
1 SELECT *
2 FROM ( SELECT REGEXP_SUBSTR ('{SUMMER}|{POINT OF SALE}', '[^{|}]+', 1, LEVEL, 'i') val
3 FROM DUAL
4 CONNECT BY LEVEL <=
5 REGEXP_COUNT ('{SUMMER}|{POINT OF SALE}', '[^|]+'))
6* WHERE val IS NOT NULL
SQL> /
VAL
SUMMER
POINT OF SALE
SQL>
Maybe you are looking for
-
Bug in Apex 4.1 tabular form with rowid as PK
Hi I think this is a bug in Apex 4.1. I tested it on apex.oracle.com. This is the simple scenario. Create a simple table: create table dropme (code number, description varchar2(200)); Now use the wizard to create a tabular form. Select Allowed Operat
-
Hi there, Just need a few information here... Can Solaris 10 x86 support the following: 1) SATA 2) SAS because all the server now c/w above new standards, instead of the long supported SCSI or IDE Thanks for any feedback...
-
Hello all. I've created document templates in Word 07 that my coworkers will be using to import(copy/paste) and create new instruction sheets/SOPs. I've been able to use content controls to structure the templates, but my primary goal now is to fin
-
Cause is mentioned as : "The cause for this error is due to person name is not assigned to the FND_USER." Do we need to attach the person name of employee whose reverse Global deployment we are doing or the person name of the person who is doing this
-
After start up, desktop does not appear on Mac Pro
I was working on my Mac Pro last night, steped away from it for about 20 minutes. The screen saver came on and froze, I was not able to exet out of the screen saver to the desk top. Had to force shut off, waited 1.5 minutes and restarted. As soon