Need help in writing NVARCHAR2 column to an excel sheet
Hi All,
I have a NVARCHAR2 column in my table. I want to store the data present in the column into an excel file. When i write the data to an excel file the data is getting converted to some other form. It's not in human readable form.
Language is not fixed for the column.
I need help in storing the NVARCHAR2 data into an excel file without any implicit conversion done by the oracle.
Please help.
Thanks,
Girish G
Edited by: Girish G on Jul 14, 2011 2:02 AM
Export data to BLOB (csv)
Similar Messages
-
Need help in writing data from JSP to excel
Hi ,
I need help in writing the data from JSP to excel.I somehow able to retrieve the data into excel but unable to get the required format.
For eg: The amount should be displayed in 0.00 format .when i am exporting it to excel it is displaying as 0 :( .
I am using the following code in JSP.
"out.print(amt + '\t');"
Would like to know if there is any otherway where in i can get my requirement.
Thanks
TomHi,
Try using format part of the JSTL tag libs.
Syntax :
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:formatNumber value="40" pattern="$#,##0.00"/>
I need help in writing the data from JSP to excel.I
somehow able to retrieve the data into excelHow do u convert the jsp to excel?
One way to convert the jsp page to excel, is to render it as an excel appl instead of html. Set the content type of the response to application/ms-excel.
response.setContentType("application/ms-excel")Hope this Helps.... -
Need help for writing extract program
hi
i need help for writing extract program to retriew data from legacy system.
i already developed bdc programs for me31k and me21.
my requirement is to write extract program s for those t.codes.
to retriew data from legacy system and stored in flat file.i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
You haven't posted ANY 'java program' for us to help with.
The forum is NOT a coding service. It is to help you with YOUR code.
Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment. -
I am trying to get the last column in an Excel sheet using the Report Generation toolkit. The function "Excel Get Last Row" does not give last column info. Is there a function that will do this?
ThanksHello –
I think the following example program might be helpful to get you started programming your application.
Get Excel Data from Specified Field.
Hope this helps!
SVences
Applications Engineer
National Instruments -
Problem while exporting ALV column header to excel sheet.
Hi,
I am able to export an ALV grid details to an excel sheet. But the ALV column headers when exported to excel sheet are getting truncated.
For eg: if my column header in ALV grid is displayed as 'Material' then the column header in excel sheet is 'Mater' only. Remaining portion is getting truncated.
How can I view the entire column header text?
Kindly assist.
Thanks.I have the same problem with you, when user export to excel. I fixed it by using
w_layo-colwidth_optimize = 'X'. <<<<<<<<<<<<This
perform generate_fcat_reftab
using 'PRUEFLOS' 'T_INPUT' '' '' 'Inspection Lot' 0.
form generate_fcat_reftab using p_fieldname
p_tabname
p_ref_tabname
p_ref_fieldname
p_output_text
p_output_lenght.
clear w_fcat.
w_fcat-fieldname = p_fieldname.
w_fcat-tabname = p_tabname.
w_fcat-ref_fieldname = p_ref_fieldname.
w_fcat-ref_tabname = p_ref_tabname.
w_fcat-seltext_s = p_output_text.
w_fcat-seltext_m = p_output_text.
w_fcat-seltext_l = p_output_text.
w_fcat-outputlen = p_output_lenght.
w_fcat-ddictxt = 'L'. <<<<<<<<<<<<<<<<<<This
append w_fcat to t_fcat.
endform. -
Hi,
Please help in writing a UDF for these fields in mapping, which I need for the object Iu2019m doing currently.
The fields are like this:
1) batch_no = "TRUNC((GetMaxObjid('x_txn_sap_parts')-POWER(2,28))/5000)+1",
2) lot_id = "TRUNC((GetMaxObjid('x_txn_sap_parts')-POWER(2,28))/500)+1",
3) How to use JDBC connection factory class in the UDF.
Some logic I can provide which I know i.e. Power (2, 28) means 2 to the power of 28 (2 multiplied 28 times), Trunc means truncate, X_TXN_SAP_Parts is a database table.The Target fields are Batch_no, lot_id & Objid.Actually, objid is mapped initially to a source field i.e. Object ID and in this function it is only being used for the calculation of the batch_no.
Thanks in Advance,
Sreedhar.Hi,
Following with my query I've tried to use this code but still I'm unable to execute the mapping.
import java.util.*;
import com.sap.aii.mapping.lookup.*;
import com.sap.aii.mapping.lookup.*;
DataBaseAccessor accessor = null;
DataBaseResult JDBCOutPayload = null;
String BusinessSystem="clarify_dev_bizsys";
//give your business system having channel name
String CommunicationChannel="JDBC_TO_CDEV";
//give your channel name
String InputPayload= " select X_TXN_PRE_SITE_XFACE.nextval from dual;";
//give your sql query
try {
Channel channel =
LookupService.getChannel(BusinessSystem,CommunicationChannel);
accessor = LookupService.getDataBaseAccessor(channel);
DataBaseResult resultSet = accessor.execute(InputPayload);
for(Iterator rows = resultSet.getRows();rows.hasNext();){
Map rowMap = (Map)rows.next();
Object cValue = rowMap.get("batchno");
//field name of field required , as in database
catch (Exception e) {}
finally {
if (accessor != null)
accessor.close();
result.addValue((String)cValue);
--> I don't know what are the parameters to be used and how to be used in the UDF because this is the first time I'm writing a UDF.
--> The problem in using this query is that both OBJID & BatchNo. are on the target side and the value for the OBJID is retrieved by a SELECT query from the database.
Kindly help me how to resolve this query of mine.
Thanks in Advance.
Sreedhar. -
Need help with writing a query with dynamic FROM clause
Hi Folks,
I need help with an query that should generate the "FROM" clause dynamically.
My main query is as follows
select DT_SKEY, count(*)
from *???*
where DT_SKEY between 20110601 and 20110719
group by DT_SKEY
having count(*) = 0
order by 1; The "from" clause of the above query should be generated as below
select 'Schema_Name'||'.'||TABLE_NAME
from dba_tables
where OWNER = 'Schema_Name'Simply sticking the later query in the first query does not work.
Any pointers will be appreciated.
Thanks
rogers42Hi,
rogers42 wrote:
Hi Folks,
I need help with an query that should generate the "FROM" clause dynamically.
My main query is as follows
select DT_SKEY, count(*)
from *???*
where DT_SKEY between 20110601 and 20110719
group by DT_SKEY
having count(*) = 0
order by 1; The "from" clause of the above query should be generated as below
select 'Schema_Name'||'.'||TABLE_NAME
from dba_tables
where OWNER = 'Schema_Name'
Remember that anything inside quotes is case-sensitive. Is the owner really "Schema_Name" with a capital S and a capital N, and 8 lower-case letters?
Simply sticking the later query in the first query does not work.Right; the table name must be given when you compile the query. It's not an expression that you can generate in the query itself.
Any pointers will be appreciated.In SQL*Plus, you can do something like the query bleow.
Say you want to count the rows in scott.emp, but you're not certain that the name is emp; it could be emp_2011 or emp_august, or anything else that starts with e. (And the name could change every day, so you can't just look it up now and hard-code it in a query that you want to run in the future.)
Typically, how dynamic SQL works is that some code (such as a preliminary query) gets some of the information you need to write the query first, and you use that information in a SQL statement that is compiled and run after that. For example:
-- Preliminary Query:
COLUMN my_table_name_col NEW_VALUE my_table_name
SELECT table_name AS my_table_name_col
FROM all_tables
WHERE owner = 'SCOTT'
AND table_name LIKE 'E%';
-- Main Query:
SELECT COUNT (*) AS cnt
FROM scott.&my_table_name
;This assumes that the preliminary query will find exactly one row; that is, it assumes that SCOTT has exactly one table whose name starts with E. Could you have 0 tables in the schema, or more than 1? If so, what results would you want? Give a concrete example, preferably suing commonly available tables (like those in the SCOTT schema) so that the poepl who want to help you can re-create the problem and test their ideas.
Edited by: Frank Kulash on Aug 11, 2011 2:30 PM -
Need helping in writing query for finding percentage of duration
Can any one please help in writing query for this.
The table is like this :-
ID Region Month Duration
I1 R1 Jan 80
I2 R2 Jan 70
I3 R1 Jan 70
I4 R3 Jan 40
I5 R1 Feb 80
I6 R2 Feb 30
I7 R3 Mar 100
I want to write a query to find
% of duration for each and every region against each and every month.
Please help in solving this query. I am in urgent need of this.
Thanks in advance.I also have to do in MS Access 2003You also have to ask into an other forum since here it's an Oracle forum, to try to find Oracle solution.
Nicolas. -
Need help in writing a vbscript
Hi,
I need help in wring a vbscript. I have serached for the vbscript on the net, but could not find any.
I need to add a file to an msi using vbscript. - That's the requirement.
For this I have done the following with the help of vbscript.
1. With the insert statement I inserted a new copmonent in the FeatureComponent Table.
2. Now the next thing I did is, I inserted a new row in the File table using insert statement again. The file is uncompressed.
3. Since the file is a non-version file I also added a row in the MSIFileHash table.
4. Also, now added the Component in the component table.
After doing this I am able to see the chnages in the mst, however whrn I try to install it I get an error 2725 (Invalid database tables).
Can somebody please post a vbscript which can add a file to an msi?Hi All,
Thanks for all your responses.
Yes, It is not so easy. I never said it was. Thanks for pointing out Orca. We use Orca on a daily basis.
What exactly I am looking at, is this.
We have some standard applications which needs to be repackaged every month. The repackaging process is same and does not change at least for these packages. So I was actually looking at automating these things.
What I did so far.
First we have created an object for Windows installer. I have then taken a copy of the original msi and then opened the database of this temporary msi database in transact mode. Once the database is opened we can use select, insert, update
and delete statements to update the database.
I could successfully add a registry to the msi. The component was also added successfully to the component table. I also could make changes to the Property table.
The tricky part comes with the addition of file to the file table.
The addition of file requires the following steps.
1. Add a new row to the file table. This can be done with the Insert statement.
2. We then need to associate the file to a new component or any other component already existing in the msi. In my case I am creating a new component.
3. We then have to associate this components to a feature in the FeatureComponents table.
4. Since the file I am adding is a non-versioned file, a new row also has to be added to the MSIFILEHASH table.
I could see the changes that I have done using the mst. But when I try to install the msi with the mst, I get the error 2725. I checked everything. All the other steps except for the file addition works fine.
To check whether I am indeed right, I have did this.
Skipped the file addition part to the msi. Every other change that I make works and I am able to install the msi with the mst successfully.
For obvious security reasons I will not be able to share the vbscript with you. If you guys think, that this is not a right forum for this question, please let me know the right forum. I have been stuck with this issue from the past 6 months. Any help would
really be appreciated. -
Need help in writing a vbs script
I am very new to scripting and need help in scripting the following:
When the Windows 7 machine boots up or a user logs on (easy to do with GPO), I want to execute a script that starts some services
ONLY if the length of the computer name is less than or equal to 15 else it should exit. It has to be done in the background without any user interaction.
The script should be able to work for both x86 and x64 version of Win7.
Any help would be greatly appreciated.
Thanks in advance.
JD
JDHi,
I highly recommend that you skip VBScript and learn PowerShell instead. This is pretty trivial in PowerShell:
If ($env:COMPUTERNAME.Length -le 15) {
# Do stuff
# HINT: Look into Start-Service
Write-Host "Under limit: $env:COMPUTERNAME"
} Else {
# Do optional stuff
Write-Host "Over limit: $env:COMPUTERNAME"
(OT: jrv - happy? =])
If you must stick with VBScript for some odd reason, here's an example to get you started:
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputerName = wshNetwork.ComputerName
If Len(strComputerName) <= 15 Then
'Do stuff here when the name is short enough
WScript.Echo "Under limit: " & strComputerName
Else
'Do stuff here when the name is too long (only if you want to)
WScript.Echo "Over limit: " & strComputerName
End If
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/services/
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing) -
Need help on getting the column names of Tabletype
I have a table Mapping with the following values: This Mapping table contains the table names (in Tabname) and the column names(colname) of various tables and values(ValuesTobeFilled) for the columns.
I have to insert into the tables present in the Tabname field with the values present in the ValuesTobeFilled in the columns present in the Colname field.
Note: The Mapping table need not contain all the columns of the base table. The columns that are not present can be filled with null. And this mapping table is not fixed i.e. rows can be inserted/deleted frequently.
Sample values in mapping table:
Tabname Colname ValuesTobeFilled
sample_items Eno Corresponding Expression to get the values from XML input
sample_items Ename Corresponding Expression to get the values from XML input
XXX YYY Corresponding Expression to get the values from XML input
Before filling in the actual tables, I have to store the entire data temporarily and I have used a tabletype declared as follows:
TYPE T_sample_items IS TABLE OF sample_items%ROWTYPE INDEX BY BINARY_INTEGER;
l_sample_items T_sample_items;
Where the table sample_items have the following columns:
• Eno
• Ename
• Eaddress
• Eemail
So, the tabletype should be filled as:
Eno Ename Eaddress EEmail
1 XXX - -
I have declared a cursor to select the values from mapping table and I need to fill in the ValuesTobeFilled values to the corresponding table.
CURSOR c_xpath (c_tname mapping.TABNAME%type)
IS
select * from mapping where tabname = c_tname;
CURSOR c_tables
IS
SELECT DISTINCT TABNAME FROM mapping;
FOR crsr IN c_tables
LOOP
p_tname := CRSR.TABNAME;
FOR csr IN c_xpath(p_tname)
LOOP
IF l_xml_doc.EXISTSNODE(CSR.XPATH_EXP) = 1
THEN
l_node_value := l_xml_doc.extract(CSR.XPATH_EXP).getStringVal(); -- This is the value to be stored in the corresponding column
ELSE
l_node_value := NULL;
END IF;
IF CSR.COLUMN_NAME = ‘eno’
THEN
l_sample_items(1).eno := l_node_value;
ELSIF CSR.COLUMN_NAME = ‘ename’
THEN
l_sample_items(1).name := l_node_value;
END IF;
END LOOP;
END LOOP;
And I need to eliminate hard coding while comparing the column names (in the following piece of code) as the Mapping table values are subject to insertion/deletion:
IF CSR.COLUMN_NAME = ‘eno’
THEN
l_sample_items(1).eno := l_node_value;
ELSIF CSR.COLUMN_NAME = ‘ename’
THEN
l_sample_items(1).ename := l_node_value;
END IF;
I need to insert the values directly into the tabletype without this hardcoding. Please suggest me ways to compare the mapping table values with the field (column) names of the tabletype. If it is not possible using tabletype, please suggest any other ways of fixing the problem.
Many thanks,
GopiI take it this isn't going to be a serious production system at the end of the day?
Storing metadata in tables for extraction and insertion of data is just wrong in so many ways. It smells heavily of Entity Attribute Value modelling, which is the most wrong way to use a relational database and is known to have major performance implications and be liable to bugs and issues. The idea that EAV modelling allows for 'generic' databases where new data items can be added flexibly later on without having to change code is usually justified with an excuse of "it means we don't have to update all our tables when we want a new column" which is easily countered with "if you're adding a single column a good relational design wouldn't require you to add it to more than one table anyway in most cases".
Just what exactly are you trying to do and why? There has to be a better way. -
Need help with some rules. I want to book a number to a specific Entity at a Specific Custom 4 only. I don't want this formula to work at all C4 levels. How can this be done?
for example if Entity is "XBM1123" and we use C4 for tracking and the tracking level I want to book it to is IMPORT, how can this be done for a specific account 4400221
I have my formula as
If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
If HS.Entity.Member = "XBM1123" or HS.Custom4.Member = "IMPORT" then
HS.EXP "A#4400221= A#4521111 + A#3526644 + A#635210"
End If
End if
this did not work. I got hte following error
Calculate started.<BR>Error executing VBScript Microsoft VBScript runtime
error, Line 259:Object doesn't support this property or method:
'HS.Custom4.Member'.<BR>Calculate finished.<BR>Error executing
VBScript %0.
I then changed it to the below and it still did not work
If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
If HS.Entity.Member = "XBM1123" then
HS.EXP "A#4400221.C4#IMPORT= A#4521111 + A#3526644 + A#635210"
End If
End if
error
Invalid Custom1 member
specified for this function.
Invalid Destination specified for this function:
A#4400221.C4#IMPORT.You are close.
Try:
If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
If HS.Entity.Member = "XBM1123" then
HS.EXP "A#4400221.C4#IMPORT= A#4521111.C4#IMPORT + A#3526644.C4#IMPORT + A#635210.C4#IMPORT"
End If
End if
or replace IMPORT with with Top_C4 or what ever member you need to copy to C4#IMPORT.
Rule of thumb, to be on the safe side and for most simple calcs, is if you mention a dimension on the left side, you need to define it on the right side as well. -
Need help in writing coding in HTML?
HI All
I have requirement like this.
1st RFC i pass Plant and i will get trasportation point.
in display template i need to display trasportation point in dropdown box and user will select the trasportation point and iam passing this trasportation to aother RFC and gettting shipment cost.
i need help in how to write coding in .IRPT
i created the transactions for both the RFC and its working fine.First RFC iam getting trasportaion point ...i created Xecute query.
I need how to display !st one in dropdown box and pass that data into 2nd RFC.
Regards,
PhaniPhani,
You have to use the iBrowser displaytemplate.
Map the transportion point Xacute qquery in iBrowser displaytemplate.
In code use :
document.APP1.getBrowserObject().getSelectedItem();
Store the value of above code in a variable.
And pass this variable in other appalet which displays the R/3 details as below:
document.APP2.getQueryObject().setParam(1,var);
document.APP2.refresh();
-Suresh -
Help! Need to save data from field point in excel sheet!!!
Hey colleagues,
I need help. I am writing on my diploma thesis.Main topic is to develop a visualization of a process of a process plant which is used for an internship in uni. My meain problem is that I need a vi where I can save my fieldpoint data only in special cycles. At the moment I use a vi which can only save every second in form of a while loop and a metronom. I am searching for a vi where I can choose the time between every saving step in excel. In addition to that I would like to have a boolean button where i can start/stop the saving within running process.
please help me urgently!!!
MarcoHello Marco,
the answer
for your problem is called “Software Control Timing”.
If a
desired time has elapsed, you can write data’s to a file.
The explicit
timing is the timing for your while loop, e.g. 10ms.
If a
desired time has elapsed, you get a flag from a timing-function and an
additional block of your code (e.g. a subVI) will executed.
The set
time for the timing function is settable dynamically, while your program is
running.
Find the VI
in the attachment, which will provide this functionality for you.
I hope this
VI will bring you further ahead…..
Have nice
day…
Ulrich
AE-NIC
Attachments:
SoftControlTiming.vi 41 KB -
Need Help: Could WEBI report directly based on EXCEL file be refreshed?
In 3.0, Could WEBI reports directly based on EXCEL file be refreshed, after exporting to BOE platform?
I've made a test on that and find out WEBI report could not be freshed in Infoview while DESKI report could.
Some colleague suggest me to build the WEBI report based on a Universe created based on the EXCEL file.
I want to confirm, is it a by-design that we could only refresh WEBI report based on universe? or I could do some setting to made the refreshment of WEBI based directly on EXCEL file works?
Please Help!! Thanks a lot~~~Hi Rachel,
You could try the Rich Client Product Guide [http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_web_intelligence_rich_client_en.pdf] but I don't think it is a problem...more like a feature by design - it makes sense.
You could try the route of creating a universe on top of excel... See posts
[DBMS Independent universe;
[how to connect to excel sheet and create a universe on top of that;
Hope this helps
Jacques
Maybe you are looking for
-
I had to change my Apple ID and password. Now when I try to download or buy an app it says your Apple ID is disabled. How can I fix this?
-
Ai does not open files after launch
after installing ai on a second pc, the program opens, but when trying to open a file, i get an error message saying...."does not function anymore" (translated from german into english) I am logged in in cc, closed ai on the mac so only one program i
-
Keep getting an error with itunes Please help
I'm a first time user with itunes I just bought my ipod a couple of months ago and everything has been working fine, but when I went to charge my ipod and all my music had been taken off my ipod. I did mess with my settings a little bit and I think t
-
On Partitioning, Error telling to Format disk
Hi! I recently upgraded my previously Tiger Macbook Pro to Leopard over the weekend and decided to install a boot camp partition now that it came free with the new OS. After selecting my size and letting it load for a bit, I received this error: "Bac
-
My voicemail no longer gives me the option of choosing which voicemail to listen to. when I touch the voicemail icon, it automatically dials voicemail. I used to be able to see the voicemails and choose which one to listen to.