Select the column details for table in one column as varchar2(32000)
Oracle Version: ORACLE 10G R 2
Problem : Select the column details for some tables and want to store the same in VARCHAR2(32000) separated by ||
Example:
TABLE_NAME COLUMN_NAME DATA_TYPE
EMP EMPNO NUMBER
EMP ENAME VARCHAR2
EMP JOB VARCHAR2
EMP MGR NUMBER
EMP HIREDATE DATE
EMP SAL NUMBER
EMP COMM NUMBER
EMP DEPTNO NUMBER
EMP RN NUMBER
Want to store
COLUMNS (empno||ename||job||mgr||hiredate||sal||comm||deptno||rn);
SQL> var cur refcursor
SQL> declare
ctx number;
begin
ctx := dbms_xmlgen.newcontext('select * from emp');
dbms_xmlgen.setNullHandling(ctx, dbms_xmlgen.empty_tag);
open :cur for select * from xmltable('for $i in ROW return string-join($i/*, "||")' passing dbms_xmlgen.getxmltype(ctx).extract('ROWSET/ROW'));
end;
PL/SQL procedure successfully completed.
SQL> print cur
COLUMN_VALUE
7369||SMITH||CLERK||7902||17.12.1980 00:00:00||800||||20
7499||ALLEN||SALESMAN||7698||20.02.1981 00:00:00||1600||300||30
7521||WARD||SALESMAN||7698||22.02.1981 00:00:00||1250||500||30
7566||JONES||MANAGER||7839||02.04.1981 00:00:00||2975||||20
7654||MARTIN||SALESMAN||7698||28.09.1981 00:00:00||1250||1400||30
7698||BLAKE||MANAGER||7839||01.05.1981 00:00:00||2850||||30
7782||CLARK||MANAGER||7839||09.06.1981 00:00:00||2450||||10
7788||SCOTT||ANALYST||7566||19.04.1987 00:00:00||3000||||20
7839||KING||PRESIDENT||||17.11.1981 00:00:00||5000||||10
7844||TURNER||SALESMAN||7698||08.09.1981 00:00:00||1500||0||30
7876||ADAMS||CLERK||7788||23.05.1987 00:00:00||1100||||20
7900||JAMES||CLERK||7698||03.12.1981 00:00:00||950||||30
7902||FORD||ANALYST||7566||03.12.1981 00:00:00||3000||||20
7934||MILLER||CLERK||7782||23.01.1982 00:00:00||1300||||10
14 rows selected.
Similar Messages
-
As we know, in planning form, we can add supporting details to one cell for the level 0 members intersections.
But can we do that as below:
add supporting details for more than one cells at the same time?
I tried to do that in workspace and smartview, neither is working.(my workspace version 11.1.2.2.300.20)
I wonder if i am not with the right version, because i don't know how to get the below.
Can any one explain?
Thank you.Hi,
I have tried in Smartview for a simple form where my period dimension was in columns and accounts in rows.
You need to select multiple period and select supporting details, it will show those selected period for which you can add the supporting details.
You can add these details and then submit the data in the form.
Regards,
Sourabh -
Access for update only one column in table?
Hi all,
My need is to grant access for update only one column c1 in table t1.
I guess I should use view, could you please give me some example? Maybe other ideas?Hi,
You can grant privileges on individual columns.
GRANT UPDATE (c1)
ON t1
TO grantee_name;Look up GRANT in the SQL language manual. Annoyingly, in recent editions of the manual, GRANT is not indexed, but it's in alphabetic order with all the other statements:
http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9013.htm#i2155015 -
To Select the data from two table one is transp table and onther is cluster
Hi All,
I want to select the data from two tables
Here i am giving with an example.
Fileds: kunnr belnr from bseg. table bseg
fields: adrnr from kna1 table: kna1.
Know i want to put these into one internal table based on kunnr and belnr.
Thanks in advance.
RameshHi,
U cant use joins on cluster table and BSEG is a cluster table so use FOR ALL ENTRIES for taht
refer this code
*& Form sub_read_bsak
text
--> p1 text
<-- p2 text
FORM sub_read_bsak.
*--Select data from BSAK Table
SELECT lifnr
augdt
augbl
gjahr
belnr
xblnr
blart
dmbtr
mwskz
mwsts
sgtxt
FROM bsak
INTO CORRESPONDING FIELDS OF TABLE it_bsak
WHERE belnr IN s_belnr
AND augdt IN s_augdt.
IF sy-subrc EQ 0.
*--Sort table by accounting document and vendor number
SORT it_bsak BY belnr lifnr.
ENDIF.
ENDFORM. " sub_read_bsak
*& Form sub_read_bseg
text
--> p1 text
<-- p2 text
FORM sub_read_bseg.
IF NOT it_bsak[] IS INITIAL.
*--Select data from BSEG table
SELECT belnr
gjahr
shkzg
kostl
hkont
ebeln
ebelp
FROM bseg
INTO CORRESPONDING FIELDS OF TABLE it_bseg
FOR ALL ENTRIES IN it_bsak
WHERE belnr EQ it_bsak-belnr
AND gjahr EQ it_bsak-gjahr
AND shkzg EQ 'S'.
IF sy-subrc EQ 0.
*--Sort table by accounting document
SORT it_bseg BY belnr.
ENDIF.
ENDIF.
ENDFORM. " sub_read_bseg -
Error!! Can not find the delivery details for the delivery Id :
hi all,
I have a report which i need to burst in seven different reports wherein my delivery key is column "emp_id". Now when i schedule the report to burst then the report completes with a warning. I see that there are various delivery cycles for the report and for one of the cycles i get the following message
Error!! Can not find the delivery details for the delivery Id :
hence, what happens due to this is, even there are successful deliveries for other delivery ids but then i get only two rows of data in each of the seven bursted ouput xls files. wheareas the data runs in thousands of rows for each cycle.
Hence whats happening is, that due to error /warning in one of the delivery cycles other reports are also not showing data.
I am not sure whats causing the issue and why i am not getting complete bursted files out.
Please suggest
Thanks
RonnyI guess, you are in 10.1.3.3.2 :),
in the latest release 10.1.3.4.1, there are more enhancement wrto bursting and performance i believe.
check th release notes
can you send me the xml and bursting query you have, i can try simulating in my local. -
Convert a table with one column to panelList with outputText
Hi,
I have a table with one column, I would like to change it to use panelList to present it instead. What will be the syntax for panelList?
<af:table value="#{bindings.ItasUiRuleParamsVO2.collectionModel}"
var="row"
rows="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
emptyText="#{bindings.ItasUiRuleParamsVO2.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.ItasUiRuleParamsVO2.collectionModel.selectedRow}"
selectionListener="#{bindings.ItasUiRuleParamsVO2.collectionModel.makeCurrent}"
rowSelection="single" id="t2"
partialTriggers="::t1">
<af:column sortProperty="RuleName" sortable="true"
headerText="#{bindings.ItasUiRuleParamsVO2.hints.RuleName.label}"
id="c11">
<af:outputText value="#{row.RuleName}"
id="ot11"/>
</af:column>
</af:table>
I tried this:
<af:panelList id="pl1">
<af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}">
<af:outputText value="#{item.RuleName}" id="ot14"/>
</af:forEach>
</af:panelList>
but the error say:
javax.servlet.jsp.JspException: "items" must point to a List or array
at org.apache.myfaces.trinidadinternal.taglib.ForEachTag.doStartTag(ForEachTag.java:136)
Any ideas?
Thanks
-Mina<af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}" var="row">
<af:outputText value="#{row.RuleName}" />
</af:forEach>
and make sure the table binding is still in place in your pagedef (or binding tab) -
Programatically setting column values for table
hi...
I am programatically setting column values for table.
But these values are not getting reflected on table after commit.
I mean to say,new values are not persisted after commit.
The code is as follows,It is in Application Module class
public void createRecord()
OAViewObject vo = (OAViewObject)this.getOpptyLoeVO1();
if (!vo.isPreparedForExecution())
vo.executeQuery();
Row row = vo.createRow();
row.setAttribute("Id",new Number(850));
row.setAttribute("Model","Honda");
row.setAttribute("Role","Team Lead");
row.setAttribute("Hours",new Number(35));
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
getTransaction().commit();
Here "Id,Model,Role,Hours" are columns in table .Hi,
is your VO based on an Entity Object?
If not, you can't update values in the DB using only a View Object!
If yes, you should control that, in your VO, you have not selected the flag "Read Only" for the EO you want to update.
Hope this helps you.
Bye
Raffy -
Hi experts . how can we know the stock details for a perticular plant?
hi experts . how can we know the stock details for a perticular plant
check this code
REPORT YSG_MATSTK_REP LINE-SIZE 220
LINE-COUNT 50(5).
*& DATA DECLARATION *
TABLES: MARA, "GENERAL MASTER DATA
MARC, "PLANT DATA FOR MATERIAL
MARD, "STORAGE LOCATION DATA FOR MATERIAL
MBEW, "MATERIAL VALUATION
MVKE, "SALES DATA FOR MATERIAL
MAKT. "MATERIAL DESCRIPTION
DATA: BEGIN OF I_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,"MATERIAL NUMBER
MBRSH LIKE MARA-MBRSH,"INDUSTRY SECTOR
MEINS LIKE MARA-MEINS,"BASE UNIT OF MEASURE
END OF I_MARA.
DATA: BEGIN OF I_MARC OCCURS 0,
MATNR LIKE MARC-MATNR,"MATERIAL NUMBER
WERKS LIKE MARC-WERKS,"PLANT
LVORM LIKE MARC-LVORM,"FLAG MATERIAL FOR DELETION AT PLANT
"LEVEL
PSTAT LIKE MARC-PSTAT,"MAINTENANCE STATUS
DISPO LIKE MARC-DISPO,"MRP CONTROLLER
END OF I_MARC.
DATA: BEGIN OF I_MAKT OCCURS 0,
MATNR LIKE MAKT-MATNR,"MATERIAL NUMBER
MAKTX LIKE MAKT-MAKTX,"MATERIAL DESCRIPTION
END OF I_MAKT.
DATA: BEGIN OF I_MVKE OCCURS 0,
MATNR LIKE MVKE-MATNR,"MATERIAL NUMBER
VKORG LIKE MVKE-VKORG,"SALES ORGANIZATION
VTWEG LIKE MVKE-VTWEG,"DISTRIBUTION CHANNEL
END OF I_MVKE.
DATA: BEGIN OF I_MARD OCCURS 0,
MATNR LIKE MARD-MATNR,"MATERIAL NUMBER
LGORT LIKE MARD-LGORT,"STORAGE LOCATION
LABST LIKE MARD-LABST,"VALUATED STOCK WITH UNRESTRICTED USE
END OF I_MARD.
DATA: BEGIN OF I_OUT OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
LVORM LIKE MARC-LVORM,
PSTAT LIKE MARC-PSTAT,
DISPO LIKE MARC-DISPO,
MBRSH LIKE MARA-MBRSH,
MEINS LIKE MARA-MEINS,
MAKTX LIKE MAKT-MAKTX,
VKORG LIKE MVKE-VKORG,
VTWEG LIKE MVKE-VTWEG,
LGORT LIKE MARD-LGORT,
LABST LIKE MARD-LABST,
END OF I_OUT.
DATA : TOT TYPE I. " TOT - TOTAL TO PRINT STOCK
*& S E L E C T I O N - S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR OBLIGATORY.
PARAMETERS: P_WERKS LIKE MARC-WERKS OBLIGATORY.
SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
S_DISPO FOR MARC-DISPO.
SELECTION-SCREEN END OF BLOCK B1.
*& I N I T I A L I Z A T I O N *
INITIALIZATION.
S_MATNR-SIGN = 'I'.
S_MATNR-OPTION = 'EQ'.
S_MATNR-LOW = 'M-14'.
S_MATNR-HIGH = 'M-18'.
P_WERKS = '3000'.
S_LGORT-SIGN = 'I'.
S_LGORT-OPTION = 'EQ'.
S_LGORT-LOW = '0001'.
S_LGORT-HIGH = '0004'.
S_DISPO-SIGN = 'I'.
S_DISPO-OPTION = 'EQ'.
S_DISPO-LOW = '001'.
S_DISPO-HIGH = '002'.
APPEND S_DISPO.
APPEND S_LGORT.
APPEND S_MATNR.
CLEAR S_DISPO.
CLEAR S_LGORT.
CLEAR S_MATNR.
*& S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
SELECT MATNR WERKS LVORM DISPO FROM MARC
INTO CORRESPONDING FIELDS OF TABLE I_MARC
WHERE WERKS EQ P_WERKS
AND MATNR IN S_MATNR
AND DISPO IN S_DISPO
AND WERKS = P_WERKS.
IF I_MARC[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
EXIT.
ENDIF.
SELECT MATNR LGORT LABST FROM MARD INTO TABLE I_MARD
FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR
AND WERKS EQ P_WERKS
AND LGORT IN S_LGORT.
IF I_MARD[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
EXIT.
ENDIF.
SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR.
IF I_MVKE[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
EXIT.
ENDIF.
LOOP AT I_MARC.
MOVE-CORRESPONDING I_MARC TO I_OUT.
CLEAR MARC.
SELECT SINGLE MATNR MBRSH MEINS FROM MARA
INTO CORRESPONDING FIELDS OF MARA
WHERE MATNR = I_OUT-MATNR.
IF SY-SUBRC = 0.
MOVE: MARA-MBRSH TO I_OUT-MBRSH,
MARA-MEINS TO I_OUT-MEINS.
ELSE.
CONTINUE.
ENDIF.
SELECT SINGLE MATNR MAKTX FROM MAKT
INTO CORRESPONDING FIELDS OF MAKT
WHERE MATNR = I_OUT-MATNR.
IF SY-SUBRC = 0.
MOVE: MAKT-MAKTX TO I_OUT-MAKTX.
ELSE.
CONTINUE.
ENDIF.
LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
MOVE: I_MARD-LABST TO I_OUT-LABST,
I_MARD-LGORT TO I_OUT-LGORT.
APPEND I_OUT.
ENDLOOP.
LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
I_MVKE-VTWEG TO I_OUT-VTWEG.
APPEND I_OUT.
ENDLOOP.
CLEAR I_OUT.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\matstk.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = I_OUT.
*& T O P - O F - P A G E *
TOP-OF-PAGE.
WRITE:/ 'DATE:' ,SY-DATUM.
*& E N D - O F - P A G E *
END-OF-PAGE.
WRITE: / SY-ULINE,
/100 'PAGNO: ',SY-PAGNO,
SY-ULINE.
*& E N D -- O F -- S E L E C T I O N *
END-OF-SELECTION.
LOOP AT I_OUT.
AT FIRST.
WRITE :/ 'MATERIAL EXTRACTION REPORT',
SY-ULINE.
ENDAT.
WRITE:/ SY-VLINE,
I_OUT-MATNR,SY-VLINE,
I_OUT-MEINS,SY-VLINE,
I_OUT-WERKS,SY-VLINE,
I_OUT-LVORM,SY-VLINE,
I_OUT-PSTAT,SY-VLINE,
I_OUT-DISPO,SY-VLINE,
I_OUT-MBRSH,SY-VLINE,
I_OUT-MAKTX,SY-VLINE,
I_OUT-VKORG,SY-VLINE,
I_OUT-VTWEG,SY-VLINE,
I_OUT-LGORT,SY-VLINE,
I_OUT-LABST,SY-VLINE.
TOT = TOT + I_OUT-LABST.
AT NEW MATNR.
WRITE : 'NEW RECORD',
SY-VLINE.
ENDAT.
AT END OF LABST.
WRITE : 'STOCK = ',
TOT,
SY-VLINE,
SY-ULINE.
ENDAT.
AT LAST.
FORMAT COLOR 7 INTENSIFIED OFF.
WRITE : /159 'TOTAL STOCK = ',
TOT.
ENDAT.
ENDLOOP.
WRITE : /159 'TOTAL STOCK = ',
TOT.
regards,
srinivas
<b>*reward for useful answers*</b> -
Function module to get the payment details for PO
Hi,
Is there any standard function modlue to get the payment details for specific purchase order or is there any table where we can get the payment details till date.
My requirement is purchase order wise how much already paid to vendor and what is the balance amount to be paid vendor.
thanks in advance....
Regards,
SreeHello
BAPI_PO_GETDETAIL will help you.
Look at structures PO_ITEM_HISTORY and PO_ITEM_HISTORY_TOTALS
Also you may use table EKBE -
How to pass the tax details for the PO in me23n to script??
Hi friends,
I have a requirement to display the tax details for every line item of the PO in PO layout through script. Here I am gettin the tax details value for Purchase Order from the transaction ME23N. In this transaction, there is tab called invoice, when you click the tab, you will get the tax details. I need to print this details in the my PO layout. I checked in the technical field, the values are getting from the structure KOMVD. I tried to pull the value from the structure itself, but I am getting only Gross price. I am not able to display the taxes details in the layout. I need the condition type value and name and amount field also.
Please help me how to achieve this.<< priority reduced>>
I would appreciate the replies.
Thanks in advance.
Please let me know if you need anything more.
Regards,
Ahamed.
Edited by: Rob Burbank on Oct 11, 2011 3:42 PMHi
You can Try with Tables EKPO AND BSET.
Regards
Ajit -
I'm using iTunes 9 and I recently just bought AirPort Express. I have used it before in the past put the problem I have now is that I cannot select the Express network for my speakers. Does Airport Express only work with iTunes 10 or 11?
Hello Hornet12,
Indeed, iTunes 10.2 or later will be required to utilize AirPlay.
Using AirPlay
http://support.apple.com/kb/HT4437
AirPlay requirements and capabilities
To get full AirPlay features, make sure your AirPlay-enabled devices are running the latest software updates. The table below identifies minimum AirPlay requirements and capabilities:
Stream content from
Requirement
Notes
iPad
iOS 4.3 or later.1
From the Videos, iPod, Photos, Music, and YouTube apps on iOS devices, stream videos, music, and photos to an Apple TV (2nd and 3rd generation), or stream music to an AirPort Express or compatible third-party device.
With iOS 4.3 and later, you can also stream video and audio from a website or a third-party app installed on your iOS device if the developer for the app or website has added AirPlay functionality.
iPhone (3GS or later)
iPod touch
(2nd generation or later)
Computer
iTunes 10.2 or later.
Stream videos and music from your iTunes library to an Apple TV (2nd and 3rd generation), or music to an AirPort Express or compatible third-party device.
Apple TV
Apple TV software version 5.1 or later.
Stream music from your Apple TV to another Apple TV (2nd and 3rd generation), to an AirPort Express or compatible third-party device.
Cheers,
Allen -
I want to include/display the absence details for employee
Hi
I want to display the absence details for an employee in the payslip.
Please guide.
MinalHi
I think you got the solution .
Please do one thing tell the note number and close the thread.
So that it may be useful for others.
Manoj Shakya -
Hi Experts,
We have TABLE OF CONTENTS followed by 100 forms with totally 215 pages.
We have checked in the Exclude from form page count option for TABLE OF CONTENTS form in Group level.
The forms followed by TABLE OF CONTENTS form all are using FORMSETPAGENUM rule in footer.
the very first form followed by TABLE OF CONTENTS form the page number starts at 1 of 215 and the last form ends at 215 of 215.
Now i want to print the Page number for TABLE OF CONTENTS form alone.
How can we do that ? Any thoughts ?
Regards,
RAMAN CHi Raman,
I guess, you have included 'Exclude Page Count' option in Table Of Content (TOC) form.
There is a limitation in studio. The page number functions (FORM PAGE NUM OF/ FORMSET PAGE NUM OF) will be ineffective when we select the 'Exclude Page Count' option in TOC form. Hence, you was not able to print the Form Page Count in TOC form.
The only way to print page count is to deselect 'Exclude Page Count' option. Then you can normally print the TOC Page Count in TOC form. However, thiS TOC page count will add to the Total formset Page Count. The Formset Page Count can be controlled through Postransdal using the script [FORMSET PAGE NUM = TotalPages() - 1]
Regards,
Mahesh -
FM to select the file path for download into application server
Hello,
I need a FM to select the file path for download into application server. It is a F4 help .
Its functionality should be simmilar to the one used for presentation server i.e. as fol
CALL METHOD cl_gui_frontend_services=>file_save_dialogHello,
What about F4_DXFILENAME_TOPRECURSION? You can check other FMs of the group DX_FILE.
BR,
Suhas
PS: I think these FMs are not released by SAP, so need to be cautious while using these -
I also have a .csv file with the name of a jpeg in one column and a text description of each jpeg in a second column. Is there a way to automatically insert one jpeg (photo) and its corresponding text, each pair on one page, into a Indesign document?
I would also recommend to write the description into the meta data. This would allow to place a text frame above the image and it is possible to add meta information and file name automatically together with the image, when you place it or even in a prepared template.
Meta data information can be written easily in Bridge in the Meta File Workspace.
Maybe you are looking for
-
JABBER 9.2.2 CALENDAR INTERGRATION OUTLOOK365
Hi guys I have jabber 9.2.2 and outlook 365, CUCM 9.1 and CUPS 9.X The calender does not show up. Any advise configs on CUCM for intergrating with Outlook 365? Thank you in advance
-
ITunes/iPod connectivity and battery issues
I have been having several issues with my iPod, but I know for a fact that it all comes back to my battery charging/connectivity. 1. Whenever I connect my iPod to charge it, *my computer recognizes it* but *iTunes does not see it* at all. 2. Instead
-
Still images exported to DVD look deinterlaced and flicker on TV monitor
Hi, I have tried tried almost everything and I still have issues with the still images exported to DVD as sequencefrom FCP 7.0 by using Compressor are deinterlaced and flicker on TV monitor. Please help remove the annoying flicker. My FCP Timeline Se
-
Contract as a replacement of Purchase Order
Hi, The requirement of my client is that they want to use Contract (Quantity or Value based) as Purchase Order in business purpose as well as in MRP. It means they want Contract to appear in MD04 as a result of MRP and if the contract is open (in ter
-
SharePoint 2010 100% cpu w3wp.exe after windows server update desember 2013
Hi Using SharePoint 2010 with 2 frontend webservers and 1 appserver: Our ApplicationPool for our portal workerprocess has for a second time gone up to and stuck on 99% CPU on one of our 2 frontend webservers. What happens is that this server falls o