Export to Insert (clipboard) - Bad Data / Unable to use
I have been using SQL Developer 1.1.0 at work and recently was updated to the latest (2.1.0.63.73). The problem I have is with the export, to an insert, giving me the wrong formatting and an unusable statement.
My steps for exporting... Right click result(s) --> Export Data --> Insert --> choose clipboard --> change table --> Apply
Here is an example of what it would look like with version 1.1.0 (the correct formatting):
REM INSERTING into data_tracker
Insert into data_tracker ("DATA_ID","DATA_FILE","DATE_OF_DATA","DATE_LOADED","DATE_REMOVED","DATE_RECEIVED") values ('DATAFILE','DATAFILE.XLS',to_date('31-JAN-10','DD-MON-RR'),null,null,to_date('12-FEB-10','DD-MON-RR'));
But when i run the same exact same steps in 2.1.0.63.73 I get the following:
REM INSERTING into data_tracker
Insert into "data_tracker" (DATA_ID,DATA_FILE,DATE_OF_DATA,DATE_LOADED,DATE_REMOVED,DATE_RECEIVED) values ('XXX','DATAFILE.XLS',to_timestamp('31-JAN-10','DD-MON-RR HH.MI.SSXFF AM'),null,null,to_timestamp('12-FEB-10','DD-MON-RR HH.MI.SSXFF AM'));
I need to get the formatting back to setting quotes around the table columns, i need the table to no longer be in quotes, and I need to get the time stamp to correctly be exported (DD-MON-RR).
Any assistance would be greatly appreciated. I have tried to go through the preferences, however there are so many new options in 2.1 that aren't in 1.1, I am unable to sufficiently locate the exact settings that I may need to alter. I will post any settings that may help in correcting my situation.
Thanks,
Nick
That has been happening since the 1.5 versions. See 1.5/EA3/EA2/EA1: Export Wizard can't export dates? on how to fiddle with the Preferences - Database - NLS settings to get it going.
Hope that helps,
K.
Similar Messages
-
Export sql insert generates to_date('1987-04-19','DD-MON-RR')
export sql insert generates buggy dates :
Scott --> Tables --> EMP --> export --> sql inserts
Columns --> ALL
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7788,'SCOTT','ANALYST',7566,to_date('1987-04-19','DD-MON-RR'),3000,null,20);
the to_date is invalid.
this bug happens only when selecting ALL columns
cheers
LaurentHi Sue,
I have version 1.0.0.15.57 Linux x86 (downloaded last week).
Is there a way to produce trace files or additional info so that we can debug this one?
$ env
PATH=/bin:/usr/bin
LANG=en_US.UTF-8
HOME=/home/lsc
DISPLAY=:0.0
_=/usr/bin/env
$ cat /etc/SuSE-release
SUSE Linux Enterprise Server 10 (i586)
VERSION = 10
$ /home/lsc/sqldeveloper/sqldeveloper
Oracle SQL Developer 1.0
Copyright (c) 2005 Oracle Corporation. All Rights Reserved.
Working directory is /home/lsc/sqldeveloper/jdev/bin
Assert: Initializing.. [email protected]
Assert: Unknown Node:8: USER
Assert: Unknown Node:8: SHARED QUERIES
Assert: Unknown Node:8: TABLE EDITORS
Assert: Unknown Node:8: VIEWS
Assert: Unknown Node:8: MVIEWS
Assert: Unknown Node:8: SYNONYM
Assert: Unknown Node:8: SEQ
Assert: Unknown Node:8: Recycle Bin
Assert: Unknown Node:8: DB Link
Assert: Unknown Node:8: MVIEW LOG
Assert: Unknown Node:8: PLSQL
Assert: Unknown Node:8: TRigger
Assert: Unknown Node:8: INDEX
Assert: SQLView initedAssert: Folder:Unsupported node in report.xml:#text
Assert: Folder:Unsupported node in report.xml:#text
Assert: Folder:Unsupported node in report.xml:#text
Assert: Folder:Unsupported node in report.xml:#text
Assert: Folder:Unsupported node in report.xml:#text
Assert: Folder:Unsupported node in report.xml:#text
Assert: Folder:Unsupported node in report.xml:#text
Assert: Folder:Unsupported node in report.xml:#textexpand "connections "
expand "LSC02"
expand "Tables"
select "EMP"
right-click EMP
chose EXPORT--SQL INSERT
Format=INSERT Output=File TABLE=EMP File=/home/lsc/EMP.sql Columns=ALL
Click apply
$ cat EMP.sql
-- INSERTING into EMP
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7369,'SMITH','CLERK',7902,to_date('1980-12-17','DD-MON-RR'),800,null,20);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7499,'ALLEN','SALESMAN',7698,to_date('1981-02-20','DD-MON-RR'),1600,300,30);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7521,'WARD','SALESMAN',7698,to_date('1981-02-22','DD-MON-RR'),1250,500,30);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7566,'JONES','MANAGER',7839,to_date('1981-04-02','DD-MON-RR'),2975,null,20);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7654,'MARTIN','SALESMAN',7698,to_date('1981-09-28','DD-MON-RR'),1250,1400,30);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7698,'BLAKE','MANAGER',7839,to_date('1981-05-01','DD-MON-RR'),2850,null,30);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7782,'CLARK','MANAGER',7839,to_date('1981-06-09','DD-MON-RR'),2450,null,10);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7788,'SCOTT','ANALYST',7566,to_date('1987-04-19','DD-MON-RR'),3800,null,20);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7839,'KING','PRESIDENT',null,to_date('1981-11-17','DD-MON-RR'),5000,null,10);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7844,'TURNER','SALESMAN',7698,to_date('1981-09-08','DD-MON-RR'),1500,0,30);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7876,'ADAMS','CLERK',7788,to_date('1987-05-23','DD-MON-RR'),1100,null,20);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7900,'JAMES','CLERK',7698,to_date('1981-12-03','DD-MON-RR'),950,null,30);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7902,'FORD','ANALYST',7566,to_date('1981-12-03','DD-MON-RR'),3000,null,20);
Insert into "EMP" ("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values (7934,'MILLER','CLERK',7782,to_date('1982-01-23','DD-MON-RR'),1300,null,10); -
Unable to install. The stub received ve bad data error
how to fix error unable to install. The stub received ve bad data error in windows 8 operating system while installing HP printer driver
Dear Customer,
Welcome and Thank you for posting your query on HP Support Forum
Please click on the below shown link to troubleshoot the issue
http://answers.microsoft.com/en-us/windows/forum/windows8_1-performance/the-stub-received-bad-data-e...
Hope this helps, for any further queries reply to the post and feel free to join us again
**Click the KUDOS star on left to say Thanks**
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
Thank You,
K N R K
Although I am an HP employee, I am speaking for myself and not for HP -
I haven't seen anyone from oracle on the thread below and wanted to make sure it gets seen so that the bug can be logged.
See this thread:
Export to INSERT errorIt has to do with data types. I think that the data appears in the correct order, but the quotes don't.
For example:
Using HR.COUNTRIES as an example:
Reorder REGION_ID to the first position and export to insert via file.
The file looks like this. Note the lack of quotes around COUNTRY_ID:
REM INSERTING into COUNTRIES
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('2',AR,'Argentina');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('3',AU,'Australia');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',BE,'Belgium');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('2',BR,'Brazil');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('2',CA,'Canada');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',CH,'Switzerland');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('3',CN,'China');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',DE,'Germany');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',DK,'Denmark');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('4',EG,'Egypt');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',FR,'France');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('3',HK,'HongKong');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('4',IL,'Israel');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('3',IN,'India');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',IT,'Italy');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('3',JP,'Japan');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('4',KW,'Kuwait');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('2',MX,'Mexico');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('4',NG,'Nigeria');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',NL,'Netherlands');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('3',SG,'Singapore');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('1',UK,'United Kingdom');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('2',US,'United States of America');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('4',ZM,'Zambia');
Insert into COUNTRIES ("REGION_ID","COUNTRY_ID","COUNTRY_NAME") values ('4',ZW,'Zimbabwe');
Thanks,
Eric -
Unable to use ref cursor as a input parameter at the time of inserting reco
Hi
i am unable to use ref cursor when inserting the data to oracle 11g from visual studio 2008. please help me as early as possible my code is bellows
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Configuration;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
public partial class App_frmTest : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
protected void btnClick_Click(object sender, EventArgs e)
OracleCommand cmd=new OracleCommand();
Data objdata = new Data();
int i = 0;
string constr = "Data Source=Cwc;User Id=scott; Password=tiger;";// enlist=false; pooling=false;
OracleConnection con = new OracleConnection(constr);
/*Connection Open*/
con.Open();
cmd.Connection = con;
/*Connection Open End*/
/*Select Through Ref Cursor*/
cmd.CommandText = "scott.TEST_USER.getUSER";
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter p_rc = cmd.Parameters.Add("p_rc", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Output);
OracleParameter p_rc1;
if (TextBox1.Text == "")
p_rc1 = cmd.Parameters.Add("p_rc", OracleDbType.Int16, DBNull.Value, ParameterDirection.Input);
else
p_rc1 = cmd.Parameters.Add("p_rc", OracleDbType.Int16, Convert.ToInt16(TextBox1.Text), ParameterDirection.Input);
// OracleParameter p_rc1 = cmd.Parameters.Add("p_rc", OracleDbType.Int16, 2, ParameterDirection.Input);
OracleDataReader reader = cmd.ExecuteReader();
DataSet ds = new DataSet();
DataTable dt1 = new DataTable();
dt1.Load(reader);
ds.Tables.Add(dt1);
GridView1.DataSource = ds;
GridView1.DataBind();
cmd.Parameters.Clear();
con.Close();
con.Dispose();
OracleCommand cmd1 = new OracleCommand();
OracleConnection con1 = new OracleConnection(constr);
con1.Open();
cmd1.Connection = con1;
cmd1.CommandText = "scott.TEST_USER.ADDUSER";
cmd1.CommandType = CommandType.StoredProcedure;
OracleParameter P_ADDUSER = cmd1.Parameters.Add("P_ADDUSER", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Input);
cmd1.ExecuteNonQuery(); // i am getting error when executing this line
Server Error in '/CWC' Application.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source Error:
Line 77: OracleParameter P_ADDUSER = cmd1.Parameters.Add("P_ADDUSER", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Input);
Line 78: //OracleParameter P_MSG = cmd.Parameters.Add("P_MSG", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.Output);
Line 79: cmd1.ExecuteNonQuery();
Line 80:
Line 81: DataTable dt = new DataTable();
Source File: d:\CWC\App\frmTest.aspx.cs Line: 79
Stack Trace:
[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
Oracle.DataAccess.Client.OpsSql.ExecuteNonQuery(IntPtr opsConCtx, IntPtr& opsErrCtx, IntPtr& opsSqlCtx, IntPtr& opsDacCtx, IntPtr opsSubscrCtx, Int32& isSubscrRegistered, Int32 bchgNTFNExcludeRowidInfo, Int32 bQueryBasedNTFNRegistration, Int64& query_id, OpoSqlValCtx*& pOpoSqlValCtx, String pCommandText, IntPtr& pUTF8CommandText, IntPtr[] pOpoPrmValCtx, String[] ppOpoPrmRefCtx, OpoMetValCtx*& pOpoMetValCtx, Int32 prmCnt, Int32 bFromPool) +0
Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery() +4731
App_frmTest.btnClick_Click(Object sender, EventArgs e) in d:\CWC\App\frmTest.aspx.cs:79
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565Hi;
Its better to ask it at visual studio forum site:http://social.msdn.microsoft.com/Forums/en-US/category/visualstudio
Regard
Helios -
Export and Import of Configuration Data
Hi All,
I have created a number of custom properties, structures, groups, renderers, layout sets etc and would like to move them from Dev to Test system.
I have found the following in the help doco:
"Export and Import of Configuration Data"
http://help.sap.com/saphelp_nw04/helpdata/en/e1/029c414c79b25fe10000000a1550b0/content.htm
However I am unable to see its functionality in our portal systems (namely the Actions->Export and Actions->Import functions).
Our version of Portal is: 6.0.9.6.0
KM: 6.0.9.3.0 (NW04 SPS09 Patch3)
Therefore we should be able to see it? no?
Are there any special settings to see these buttons?
Cheers,
VicThanks for your replies.
OK, so in otherwords, it is not available in SP09 and only in SP12+.
So, to "transport" this information I will have to manually reapply thes settings in the Test system!
Message was edited by: Victor Yeoh -
Bad Data treated as row delimiter
HI,
i'm having an issue about the SAP download file having a bad data treated by BODI as row delimiter.
*Here is the error:*
A row delimiter was seen for row number <12424> while processing column number <32> in file
<FILE_LOCATION>. The row delimiter should be seen after <36> columns. Please check the file for
bad data, or redefine the input schema for the file by editing the file format in the UI.
A row delimiter was seen for row number <12424> while processing column number <32> in file
<FILE_LOCATION>. The row delimiter should be seen after <36> columns. Please check the file for
bad data, or redefine the input schema for the file by editing the file format in the UI.
column # 32 - is the short text description column.
for this kind of error, is it possible to clean the data inside the R/3 Extraction before BODI writes the data or should this be done on the SAP side?
thanks
sheI have txt file this kind of the data but i need to insert it into in datbase
1 1301190300084178 11205 individual individual resident can any one help for this issue to filter this data and insert it into through txt file in asp.net database
1~1301190300084178~I11205~~Individual~Individual-Resident~PRAKASH AMRUTLAL SHAH~REETA PRAKASH SHAH~~A 101 104 MOTA NAGAR,~28216567~~ANDHERI KURLA ROAD,~ANDHERI EAST,[email protected]com~~~~~~2~12~PRAKASH AMRUTLAL
SHAH~A 101 104 MOTA NAGAR,~28216567~~ANDHERI KURLA ROAD,~ANDHERI EAST,~MUMBAI~MAHARASHTRA~INDIA~400099~6~RISHIN PRAKASH SHAH~A 101 104 MOTA NAGAR,~~~ANDHERI KURLA ROAD, CHAKALA,~ANDHERI EAST,~MUMBAI~MAHARASHTRA~INDIA~400099
21-AUG-2013~1~1~0
thanks in advance -
Export to INSERT STATEMENT Possible Bug
h2. Synopsis
Currently, if your table has nested tables using Types, the export to INSERT STATEMENT does correctly create the insert statement. In the sample below, the PURGE_WHERE_CLAUSE is a nested table (TYPE and TABLE of TYPE)
h2. Examples
h4. Below is an example of the incorrectly created insert statement made by SQL Developer.
INSERT
INTO PRG_DTLS
PRG_NAME,
TABLE_ID,
FILE_ID,
PRG_ORDER_SEQ_NO,
PRG_ACTION_ID,
OPERATING_SYSTEMS_ID,
PRG_WHERE_CLAUSE,
CREATED_BY,
CREATED_DATE,
LAST_UPDATED_BY,
LAST_UPDATED_DATE
VALUES
'GUITEST01',
26,
NULL,
1,4,
NULL,
*'STGMGR.PRG_CRITERIA(STGMGR.PRG_CRITERIA(PRCS_ID,=,1,null,null,null))',*
'XXXXXXX',
to_date('21-MAY-09','DD-MON-RR'),
'XXXXXXX',
to_date('21-MAY-09','DD-MON-RR')
h4. Below is a sample of how it should correctly be made
INSERT
INTO STGMGR.PRG_DTLS
PRG_NAME,
TABLE_ID,
PRG_ORDER_SEQ_NO,
PRG_ACTION_ID,
PRG_WHERE_CLAUSE,
CREATED_BY,
CREATED_DATE,
LAST_UPDATED_BY,
LAST_UPDATED_DATE
VALUES
'GUITEST01',
26,
1,
4,
*"STGMGR"."PRG_CRITERIA_NT"( "STGMGR".PRG_CRITERIA('PRCS_ID','=','1',NULL,NULL,NULL)),*
'XXXXXXXX',
TO_DATE('05/21/2009 15:45:18', 'MM/DD/YYYY HH24:MI:SS'),
'XXXXXXX',
TO_DATE('05/21/2009 15:45:18', 'MM/DD/YYYY HH24:MI:SS')
COMMIT;
h2. Is there a workaround or fix?
I've attempted to see if I can find a fix for this in some type of settings in the preference but I have not yet found anything. Has anyone found a fix for this issue?Hi Barry,
It is a Type and Table of types stored as a nested table in a regular table.
Its basically a tool we created to store the WHERE clauses for an automated tool that will delete old data that we no longer need from our database.
So, it dynamically stores and creates the DELETE statements.
Hope this answers your question Barry.
Thanks. -
While Creating New Insert Form Existing Data Display from the Table
Hi
I am New To Sun Java Studio Creator and New to Java Also While Creating New Insert Form Existing Data Display from the Table while i am Run the Form. Can any one help me to Solve this oneDear Giri,
As per your Advise, Literally I have Search the Properties for the Components to set value Null, but I am Unable to find the Value in Properties palate. I have tried in various options like
In the Properties Palate
TextField1_onselect use Value null
TextField1_text I have selected use Value option and I have manually Keyed-in null;
In the JSP Page, I have manually keyed in the null value below said
<ui:textField binding="#{BI.textField2}" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
<ui:textField binding="#{BI.textField2.Value = null }" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
At last I am Failure. I am ignorant of it. Can you please help me on this where I have to set null value for the components? I will be very kind of you -
Script request for exporting, importing, inserting entry to Oracle 9i LDAP
Do anyone has the scripts for exporting, importing, inserting entry to Oracle 9i LDAP server? Thanks for help.
you can use ldapsearch utility to generate ldif files. Perform a search on the node you want to export and specify the output to be in LDIF format ( -L - this is a ldapsearch option). Once you have the ldif file, you can import it to any LDAPv3 complaint server such as OID. for OID, use ldapadd/ldapmodify utility to import the data.
These utilities are present under IAS_HOME/bin or ORACLE_HOME/bin. -
Clearing today's date otherwise insert today's date
Sorry for the bad title. I'm trying to insert today's date by default, but I want the user to be able to change it. If they leave the field blank, I want acrobat to reinsert today's date. What's wrong with my code?
var val = this.getField('Day').value;
var today = util.printd("d", new Date());
if( val == today)
val = "";
if( val = "" )
val = util.printd("d", new Date());
this.getField('Day').value = val;OnFocus -> Run a Javascript
if( this.getField("Month").value == util.printd("mm", new Date()) )
this.getField("Month").value = "";
OnBlue -> Run a Javascript
if (this.getField("Month").value == "")
this.getField("Month").value = util.printd("mm", new Date());
OnFocus -> Run a Javascript
if( this.getField("Year").value == util.printd("yyyy", new Date()) )
this.getField("Year").value = "";
OnBlue -> Run a Javascript
if (this.getField("Year").value == "")
this.getField("Year").value = util.printd("yyyy", new Date()); -
BAD DATA FORMAT using cl_gui_frontend_services= gui_upload
Hello SAPients!
I'm using the method cl_gui_frontend_services=>gui_upload to upload a file to my program like this
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lvs_input_f1
filetype = 'ASC'
CHANGING
data_tab = in_rec[]
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
The SY-.SUBRC field always returns with a value of 8 (Bad data format?). The thing is that the last field of the structure IN_REC is of type i (integer) and I think this is the problem. I modified the file with a text editor and set the last field with 2, 4, 8 and 16 chars but I always receive the same error. I can't change the last field to char. Does any one have an idea of what is the problem? How can I ensure that the last field have an integer value?
Thank you.Ok, I have modified the code a bit, you might want to try it. First upload to a table of type STRING, then move the values to the other internal table.
report zrich_0001 .
data: begin of in_rec occurs 0,
matnr(18), "Material Number
bwkey like mbew-bwkey, " For Plant
werks like mbew-bwkey, " Add Plant
type(2) type c, " TYPE.
cname(50) type c, " Changble Name
bom(1) type c, " BOM Usage
task(2) type c, " task type
verid_nd like ckmlmv001-verid_nd, "Production Version
perc(16) type c, " Percent for Plant1
* above are user inputs ; below are program flag.
flag(1) type c, " Program flag.
kalnr like ckmlmv001-kalnr, "
mix_flag(1) type c, " Program flag.
cnt type i,
end of in_rec.
data: istr type table of string with header line.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
data retfiletable type filetable.
data retrc type sysubrc.
data retuseraction type i.
call method cl_gui_frontend_services=>file_open_dialog
exporting
multiselection = abap_false
changing
file_table = retfiletable
rc = retrc
user_action = retuseraction.
read table retfiletable into p_file index 1.
start-of-selection.
perform open_file.
*& Form OPEN_FILE
form open_file.
*------------------------ Begin Change - UN001 ------------------------*
* CALL FUNCTION 'WS_UPLOAD'
* EXPORTING
* filename = input_f1
* filetype = 'DAT'
* TABLES
* data_tab = in_rec.
data:
lvs_input_f1 type string. " To store filename
* lit_mat_tbl TYPE TABLE OF lt_raw_tab, " To store file lines
* lwa_mat_tbl TYPE lt_raw_tab. " Work area
lvs_input_f1 = p_file.
* lvs_input_f1 = input_f1.
call method cl_gui_frontend_services=>gui_upload
exporting
filename = lvs_input_f1
filetype = 'ASC'
changing
data_tab = istr[]
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 19.
if sy-subrc ne 0.
* WRITE / text-e01.
message e000(fb) with text-e01.
endif.
loop at istr.
in_rec = istr.
append in_rec.
endloop.
loop at in_rec.
write:/ in_rec.
endloop.
*------------------------ End Change - UN001 ------------------------*
*SKD 08/02/06---------DEVK980441-----------v
delete in_rec where perc = 0.
*SKD 08/02/06---------DEVK980441-----------^
endform. "OPEN_FILE
Regards,
Rich Heilman -
Bad date format string in Crystal 2013
I have a report that I wrote a formula to convert the date from a number to a date recognizable by the end user. It works fine. The user then wanted to add another field to the same report. Same type of deal, so I copied the first formula into a new formula for the second conversion and simply changed the file name that it was pulling from. When I check the formula, it comes back no errors found, but when I insert it into the report, I get an error that says "Bad date format string" it's the exact same formula that runs fine in the field next to it. What am I missing? The exact formula as used is;
date(mid(totext({File.name},0,' '),5,2)+'/'+ right(totext({File.Name},0,' ' ),2) + '/' + left(totext({File.Name},0,' '),4)) It is intended to take it from 20140405 to 04/05/2014.
Any help would be greatly appreciated. As I am new to Crystal reports and by no means a database administrator by trade.
Thanks
Bob V.hi Bob,
you can use something like the following
stringvar s:= '20140405';
date(s[1 to 4] + '/' + s[5 to 6] + '/' + s[7 to 8])
and if you want to be safe and use a check, then you can use something this
stringvar s:= '20140405';
s:= s[1 to 4] + '/' + s[5 to 6] + '/' + s[7 to 8];
if isdate(s) then date(s);
-jamie -
Quicktime export from FCP quality bad on Windows Quicktime
Hey all,
I believe this question has been brought up in a previous post (http://discussions.apple.com/thread.jspa?messageID=2932763� "Quicktime export from FCP quality bad on PCs"), but it was never answered. So I captured video using final cut pro using the following capture preset:
Sequence Preset - DV NTSC 48 kHz
DVR-TRV900 using NTSC
29.97 fps
DV - NTSC at Best Quality
24 bits per pixel
720 by 480
When I view the video under quicktime for mac, it looks good. However, when I view the content under quicktime for windows, the quality is noticeably degraded. For instance, when I looked at the video clip in mac, there was a text overlay that displayed the time and date. When I look at it in Windows quicktime, the quality has degraded to an extent that the numbers are no longer readable. Besides the overall quality difference in playback between mac and pc quicktime, there are no other noticeable artifacts. Also, I tried viewing the video in VLC (video lan client) on windows, and it looks perfectly fine.
Rayseems like this is a PC Quicktime issue rather than an FCP issue, you may have more success in resolving the problem if you post your question on the Quicktime for Windows forum
that said, you might want to check the Quicktime Player preferences on your PC (Edit > Preferences > Player Preferences)
make sure you have checked the "Use high quality video setting when available" checkbox
good luck
Andy -
Insert old missing data from one table to another(databaase trigger)
Hello,
i want to do two things
1)I want to insert old missing data from one table to another through a database trigger but it can't be executed that way i don't know what should i do in case of replacing old data in table_1 into table_2
2)what should i use :NEW. OR :OLD. instead.
3) what should i do if i have records exising between the two dates
i want to surpress the existing records.
the following code is what i have but no effect occured.
CREATE OR REPLACE TRIGGER ATTENDANCEE_FOLLOWS
AFTER INSERT ON ACCESSLOG
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
V_COUNT NUMBER(2);
V_TIME_OUT DATE;
V_DATE_IN DATE;
V_DATE_OUT DATE;
V_TIME_IN DATE;
V_ATT_FLAG VARCHAR2(3);
V_EMP_ID NUMBER(11);
CURSOR EMP_FOLLOWS IS
SELECT EMPLOYEEID , LOGDATE , LOGTIME , INOUT
FROM ACCESSLOG
WHERE LOGDATE
BETWEEN TO_DATE('18/12/2008','dd/mm/rrrr')
AND TO_DATE('19/12/2008','dd/mm/rrrr');
BEGIN
FOR EMP IN EMP_FOLLOWS LOOP
SELECT COUNT(*)
INTO V_COUNT
FROM EMP_ATTENDANCEE
WHERE EMP_ID = EMP.EMPLOYEEID
AND DATE_IN = EMP.LOGDATE
AND ATT_FLAG = 'I';
IF V_COUNT = 0 THEN
INSERT INTO EMP_ATTENDANCEE (EMP_ID, DATE_IN ,DATE_OUT
,TIME_IN ,TIME_OUT,ATT_FLAG)
VALUES (TO_NUMBER(TO_CHAR(:NEW.employeeid,99999)),
TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'), -- DATE_IN
NULL,
TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'), -- TIME_IN
NULL ,'I');
ELSIF V_COUNT > 0 THEN
UPDATE EMP_ATTENDANCEE
SET DATE_OUT = TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'), -- DATE_OUT,
TIME_OUT = TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'), -- TIME_OUT
ATT_FLAG = 'O'
WHERE EMP_ID = TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
AND DATE_IN <= (SELECT MAX (DATE_IN )
FROM EMP_ATTENDANCEE
WHERE EMP_ID = TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
AND DATE_OUT IS NULL
AND TIME_OUT IS NULL )
AND DATE_OUT IS NULL
AND TIME_OUT IS NULL ;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS THEN RAISE;
END ATTENDANCEE_FOLLOWS ;
Regards,
Abdetu..INSERT INTO SALES_MASTER
( NO
, Name
, PINCODE )
SELECT SALESMANNO
, SALESMANNAME
, PINCODE
FROM SALESMAN_MASTER;Regards,
Christian Balz
Maybe you are looking for
-
How to display photo in jsp through blob from oracle
i am struggling here to retrieve an image which is stored in oracle-blob data type through jdbc-type-1.and i am unable to display that in jsp.i had a rich code library for this problem.but nothing gave me the exact solution. please give me exact the
-
Problem with 6700 slide Gallery
Hi all, I bought 6700 slide last week. I have updated the firmware to v.033.014. I had three files dandelion.png, spring.png, leaves.png in the images folder(c:\data\images) on the phone memory. I've deleted them from the file manager but now they ar
-
Why do I have so little free disk space and am running slowly?
My iMac is running very slowly, and I was advised to examine the activity monitor to troubleshoot. I am not technically savvy, but I can see that I have very little free disk space, and that Safari seems to be taking up a lot of memory. I'm not a hae
-
HELP!!!! I cannot get Pro to load...or even get to a place wehre I can eneter a code number to install it! ELP NOW!!!! I have a Windows 7 operating system and am about to go nuts with this. I have never ever seen anywhere that you bought a program an
-
Ok, You probably will laough at me, but here is what happened: my cat took a nap on the keyboard of my MacBook, and whatever combination of keys she pushed, zoomed in the entire display so much that cursor is now about 1/4 of the screen. Rebooting th