Character.digit)
Hi people,
My goal is to convert the characters (for exaple 'A') to the value decimal ascii (= 65).
IM aware I should use Character.digit ('A', int RADIUS); But my question is: what does the radius value should be to get 65 returned? I tried 10 (decimal), but I always get returned-1.
And Yes, I googled. But nothing.
Thank you!
much easier to cast to int, it is a tank, after all.
(int) "A" is 65, for example.
Tags: BlackBerry Developers
Similar Questions
-
Hey. Attempts to convert a hexadecimal string into a Long, and then to a Date. If I execute the following code
I get on April 13 being the Hex String 01cbfa0fd37f9b80. If I then run this through my program, I get the result Fri Feb 02 18:06:40 GMT 4104773TimeZone.setDefault(TimeZone.getTimeZone("UTC")); String filetime = "Wed Apr 13 19:20:19 2011"; DateFormat sdf = new SimpleDateFormat("EEE MMM dd hh:mm:ss yyyy"); Date dateFiletime = sdf.parse(filetime); long longFiletime = WinBase.FILETIME.dateToFileTime(dateFiletime); System.out.println(net.proteanit.util.StringUtils.toHexString(longFiletime));
Anyone know why this might be the case?import java.io.*; import java.util.*; import java.math.*; public class test { public Date d; public String hexString; public test(){ hexString = "01cbfa0fd37f9b80"; // Apr 13 2011 w/time long val = hexToLong(hexString); d = new Date(val); } public static final long hexToLong(String hex) throws NumberFormatException { int len = hex.length(); if (len > 16) throw new NumberFormatException(); long l = 0; for (int i = 0; i < len; i++) { l <<= 4; int c = Character.digit(hex.charAt(i), 16); if (c < 0) throw new NumberFormatException(); l |= c; } return l; } public static void main(String[] args){ test sd = new test(); System.out.println(sd.d); } }
see you soonBecause this hexadecimal string is not just the millis, since then?
See:public static void main(String[] args) { String filetime = "Wed Apr 13 19:20:19 2011"; SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd hh:mm:ss yyyy"); try { Date dateFiletime = sdf.parse(filetime); System.out.println(dateFiletime.toString()); System.out.println(Long.toHexString(dateFiletime.getTime())); System.out.println(new Date(Long.parseLong("12f5017aab8", 16)).toString()); System.out.println(new Date(Long.parseLong("01cbfa0fd37f9b80", 16)).toString()); } catch (ParseException e) { e.printStackTrace(); } }
As a result:
Wed Apr 13 19:20:19 BST 2011 12f5017aab8 Wed Apr 13 19:20:19 BST 2011 Fri Feb 02 18:06:40 GMT 4104773
It's the original analysis.
The hexadecimal string from this date.
The result of the conversion than hexagonal back to a long and back to a Date (using Long.parseLong).
The result of the conversion of your hex for a long, and then for a Date (using Long.parseLong).If your is over the 4104773 year.
-
Form 10G - Saving Blob on server applications using Java.
Hello
Forms 10g using, I'm looking for a solution to retrieve the Blob from my database (10 gr 2) and save it to the application server on the "Oraclehome\Apache\Apache\htdocs" directory so that users can download/view it via the browser.
first of all, I used WebUtil to download files on the client and it worked perfectly.
However, for some reason, my client does not want to download the file on his client.
So here I am, I've created a java class called "saveBlobToFile" that receives a string as a parameter to write it to a file.
I imported this class in forms where I used the following code.
Everything works fine, but I need to convert my RAW in HEX to move to Java string and converted again to a Byte [].
I order to speed up the process, I would avoid these 2 conversions.
Don't you think that it is possible to move the RAW format (which is just a stream of bytes) to java? Either by converting it to ORA_JAVA. JACOB byte? Either passing as an object and cast in java to a byte array?
Thanks in advance,
Tim.
PS: I based my development on this article
https://support.Oracle.com/CSP/main/article?cmd=show & type = not & ID = 70110.1
/***************
FORMS
***************/
DECLARE
BLOB MY_BLOB;
RAW BUFFER (32767).
DIRECTORY OF THE AMT: = 10000; -32767;
INTEGER POS: = 1;
MYBLOBFILE ORA_JAVA. JOBJECT;
BEGIN
SELECT DOCUMENT
IN MY_BLOB
OF WRK_LOB_STORE
WHERE ID = 1;
LOOP
DBMS_LOB. READ (MY_BLOB, AMT, POS, BUFFER);
IF POS = 1 THEN
MYBLOBFILE: = SAVEBLOBTOFILE. NEW ();
SAVEBLOBTOFILE. WRITETOFILE (MYBLOBFILE, "C:\test.txt", RAWTOHEX (BUFFER));
ON THE OTHER
SAVEBLOBTOFILE. APPENDTOFILE (MYBLOBFILE, "C:\test.txt", RAWTOHEX (BUFFER));
END IF;
WHEN the AMT RELEASE < 10000;
POS: = POS + AMT;
END LOOP;
END;
/***************
JAVA
****************/
package saveblobtofile;
to import java.io.FileNotFoundException;
to import java.io.FileOutputStream;
import java.io.IOException;
public class saveBlobToFile {}
private FileOutputStream fio;
public saveBlobToFile() {}
}
' public void writeToFile (String fileName, String, stringBuffer) survey FileNotFoundException.
IOException {}
FIO = new FileOutputStream (fileName);
FIO. Write (hexStringToByteArray (stringBuffer));
FIO. Close();
}
' Public Sub appendToFile (String fileName, String, stringBuffer) throws FileNotFoundException,.
IOException {}
FIO = new FileOutputStream (fileName, true);
FIO. Write (hexStringToByteArray (stringBuffer));
FIO. Close();
}
public static ubyte [] hexStringToByteArray (String s) {}
int len = s.length ();
Byte [] = new ubyte data [len / 2];
for (int i = 0; i < len; I += 2) {}
data [I / 2] = (byte) ((Character.digit (s.charAt (i), 16) < < 4))
+ Character.digit (s.charAt(i+1), 16));
}
return data;
}
Public Shared Sub main (String [] args) {}
saveBlobToFile saveBlobToFile = new saveBlobToFile();
}
}A very simple solution is to 'adjust' the WEBUTIL_FILETRANSFER package and create a new procedure DB_TO_AS by combining the existing DB_TO_CLIENT and procedure CLIENT_TO_AS (withou the intermediate step to save the file on the client)
-
ORA-01858: a non-digit character was found here where was waiting for a digital
Hi friends,
Before posting inturn I have goggled on the question above, but looking forward for you suggestions.
I have the data in the table that consist of two columns of date below
when im trying to like
TO_NUMBER (ROUND (MONTHS_BETWEEN (TO_DATE (C22_LASTPAYDUEDATE, "YYYY-MM-DD HH24:MI:SS), TO_DATE (C23_FACGRANTDATE," YYYY-MM-DD HH24:MI:SS)))))))
Like the im getting the error ORA-01858: a non-digit character was found here where was waiting for a digital. How to solve this question friends.
Thanks in advance.
Kind regards
Saro
If C22_FACGRANTDATE and C23_LASTPAYDUEDATE are indeed 'two date columns', why are you doing a TO_DATE() on them? And why do you do a TO_NUMBER() to a value that will already be a number? Why not just do this:
ROUND (MONTHS_BETWEEN (C22_LASTPAYDUEDATE, C23_FACGRANTDATE))
If they are not the columns date (i.e. the DATE or TIMESTAMP data type columns), why are they not?
-
ERR: a non-digit character was found here where was waiting for a digital
Hello
I'm trying to load data into an oracle from oracle table.
I am getting following error:
java.sql.SQLDataException: ORA-01858: a non-digit character was found here where was waiting for a digital
When I run the sql code in the SQL Developer it gives me error like:
Error report:
SQL error: ORA-01858: a non-digit character was found here where was waiting for a digital
01858 00000 - "a non-digit character found here where was waiting for a digital".
* Cause: Input data to convert using a date format model has been
incorrect answer. The input data did not contain a number where is a number
required by the format model.
* Action: Fix the input data or the date format model to ensure that the
elements correspond to the number and the type. And then try the operation again.
Please give me any suggestions...
Thank youtry to copy the code generated to the developer of Toad or sql and execute it. You will get the same error here.
Now, try to give the date format according to your NLS parameter as to_date (source_coulumn, 'yyyymmdd') etc in the mapping target.
Thank you.
-
PLSQL procedure with the ORA-01858: a non-digit character was found where
Hi friends,
I'm pretty much back to the plsql programming. I am creating the plsql procedure that basically accepts the values of variables and controls difference of two columns if she's even if different it inserts values into the temporary table GTT_S_DOC_QUOTE, and then inserts data into another table in s_doc_quote please help me or correct my procedure.
Since I'm getting below error ORA-01858: a non-digit character was found here where waiting a digital .my procedure is as below.
CREATE OR REPLACE PROCEDURE QUOTE_STS)
ROW_ID_IN GGATE_CT. GTT_S_DOC_QUOTE. ROW_ID % TYPE,
STAT_CD_IN GGATE_CT. GTT_S_DOC_QUOTE. STAT_CD % TYPE,
PREV_STS_CD_IN GGATE_CT. GTT_S_DOC_QUOTE. PREV_STS_CD % TYPE,
BU_ID_IN GGATE_CT. GTT_S_DOC_QUOTE. BU_ID % TYPE,
CREATED_IN GGATE_CT. GTT_S_DOC_QUOTE. CREATED % TYPE,
X_CRRNT_TOT_AGRD_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_AGRD_RMS % TYPE,
X_CRRNT_TOT_BLCKD_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_BLCKD_RMS % TYPE,
X_CRRNT_TOT_PCKDUP_RMS_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_PCKDUP_RMS % TYPE,
X_CRRNT_TOT_PCKDUP_AVGRT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_PCKDUP_AVGRT % TYPE,
X_CRRNT_TOT_BLCKD_AVGRT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_TOT_BLCKD_AVGRT % TYPE,
X_CRRNT_CNTRCT_SR_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_SR_REVN % TYPE,
X_CRRNT_CNTRCT_FD_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_FD_REVN % TYPE,
X_CRRNT_CNTRCT_BEV_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_BEV_REVN % TYPE,
X_CRRNT_CNTRCT_RM_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_RM_REVN % TYPE,
X_CRRNT_USD_EXCHNG_RT_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_USD_EXCHNG_RT % TYPE,
X_CRRNT_CNTRCT_OTHR_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_OTHR_REVN % TYPE,
X_CRRNT_CNTRCT_RSRC_REVN_IN GGATE_CT. GTT_S_DOC_QUOTE. X_CRRNT_CNTRCT_RSRC_REVN % TYPE,
LAST_UPD_IN GGATE_CT. GTT_S_DOC_QUOTE. LAST_UPD % TYPE)
BEGIN
IF (PREV_STS_CD == STAT_CD) then
END if;
INSERT INTO GTT_S_DOC_QUOTE)
ROW_ID,
STAT_CD,
PREV_STS_CD,
BU_ID,
CREATED,
X_CRRNT_TOT_AGRD_RMS,
X_CRRNT_TOT_BLCKD_RMS,
X_CRRNT_TOT_PCKDUP_RMS,
X_CRRNT_TOT_PCKDUP_AVGRT,
X_CRRNT_TOT_BLCKD_AVGRT,
X_CRRNT_CNTRCT_SR_REVN,
X_CRRNT_CNTRCT_FD_REVN,
X_CRRNT_CNTRCT_BEV_REVN,
X_CRRNT_CNTRCT_RM_REVN,
X_CRRNT_USD_EXCHNG_RT,
X_CRRNT_CNTRCT_OTHR_REVN,
X_CRRNT_CNTRCT_RSRC_REVN,
LAST_UPD
)
VALUES ('ROW_ID_IN',
"STAT_CD_IN,"
"PREV_STS_CD_IN,"
"BU_ID_IN,"
"CREATED_IN,"
"X_CRRNT_TOT_AGRD_RMS_IN,"
"X_CRRNT_TOT_BLCKD_RMS_IN,"
"X_CRRNT_TOT_PCKDUP_RMS_IN,"
"X_CRRNT_TOT_PCKDUP_AVGRT_IN,"
"X_CRRNT_TOT_BLCKD_AVGRT_IN,"
"X_CRRNT_CNTRCT_SR_REVN_IN,"
"X_CRRNT_CNTRCT_FD_REVN_IN,"
"X_CRRNT_CNTRCT_BEV_REVN_IN,"
"X_CRRNT_CNTRCT_RM_REVN_IN,"
"X_CRRNT_USD_EXCHNG_RT_IN,"
"X_CRRNT_CNTRCT_OTHR_REVN_IN,"
"X_CRRNT_CNTRCT_RSRC_REVN_IN,"
'LAST_UPD '.
);
INSERT INTO S_DOC_QUOTE_CT
(ROW_ID_OUT, STAT_CD_OUT, PREV_STS_CD_OUT, BU_ID_OUT, CREATED_OUT, X_CRRNT_TOT_AGRD_RMS_OUT, X_CRRNT_TOT_BLCKD_RMS_OUT, X_CRRNT_TOT_PCKDUP_RMS_OUT, X_CRRNT_TOT_PCKDUP_AVGRT_OUT,
X_CRRNT_TOT_BLCKD_AVGRT_OUT, X_CRRNT_CNTRCT_SR_REVN_OUT, X_CRRNT_CNTRCT_FD_REVN_OUT, X_CRRNT_CNTRCT_BEV_REVN_OUT, X_CRRNT_CNTRCT_RM_REVN_OUT, X_CRRNT_USD_EXCHNG_RT_OUT, X_CRRNT_CNTRCT_OTHR_REVN_OUT,
SELECT X_CRRNT_CNTRCT_RSRC_REVN_OUT ROW_ID), STAT_CD, PREV_STS_CD, BU_ID, CREATED, X_CRRNT_TOT_AGRD_RMS, X_CRRNT_TOT_BLCKD_RMS, X_CRRNT_TOT_PCKDUP_RMS, X_CRRNT_TOT_PCKDUP_AVGRT,.
X_CRRNT_TOT_BLCKD_AVGRT, X_CRRNT_CNTRCT_SR_REVN, X_CRRNT_CNTRCT_FD_REVN, X_CRRNT_CNTRCT_BEV_REVN, X_CRRNT_CNTRCT_RM_REVN, X_CRRNT_USD_EXCHNG_RT, X_CRRNT_CNTRCT_OTHR_REVN,
GGATE_CT X_CRRNT_CNTRCT_RSRC_REVN. GTT_S_DOC_QUOTE;
COMMIT;
end if;
end QUOTE_STS;I was wondering why I get this error even if I stated the PREV_STS_CD
What line do you think that you said PREV_STS_ID on? As far as I can see that the IF statement is the first mention of it in your code. My guess is that you mean PREV_STATS_ID_IN (goes the same for STAT_CD / STAT_CD_IN).
If you write
IF prev_sts_cd_in = stat_cd_in THEN NULL; END IF; do_something_here;
then "do_something_here" will be processed regardless of the IF condition. I think what you probably wanted was something like
IF prev_sts_cd_in = stat_cd_in THEN NULL; ELSE do_something_here; END IF;
Is it possible for the prev_sts_cd and the stat_cd null? The test above would not handle this.
Also, as others have mentioned, the first INSERT statement attempts to insert the strings like "ROW_ID_IN" you probably want to use the value of the ROW_ID_IN parameter, which is the reason why you get the error ORA-01858. I'm guessing here of course, but I took out the quotes.
That would make your code something like this:
CREATE OR REPLACE PROCEDURE quote_sts ( row_id_in ggate_ct.gtt_s_doc_quote.row_id%TYPE , stat_cd_in ggate_ct.gtt_s_doc_quote.stat_cd%TYPE , prev_sts_cd_in ggate_ct.gtt_s_doc_quote.prev_sts_cd%TYPE , bu_id_in ggate_ct.gtt_s_doc_quote.bu_id%TYPE , created_in ggate_ct.gtt_s_doc_quote.created%TYPE , x_crrnt_tot_agrd_rms_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_agrd_rms%TYPE , x_crrnt_tot_blckd_rms_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_blckd_rms%TYPE , x_crrnt_tot_pckdup_rms_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_pckdup_rms%TYPE , x_crrnt_tot_pckdup_avgrt_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_pckdup_avgrt%TYPE , x_crrnt_tot_blckd_avgrt_in ggate_ct.gtt_s_doc_quote.x_crrnt_tot_blckd_avgrt%TYPE , x_crrnt_cntrct_sr_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_sr_revn%TYPE , x_crrnt_cntrct_fd_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_fd_revn%TYPE , x_crrnt_cntrct_bev_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_bev_revn%TYPE , x_crrnt_cntrct_rm_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_rm_revn%TYPE , x_crrnt_usd_exchng_rt_in ggate_ct.gtt_s_doc_quote.x_crrnt_usd_exchng_rt%TYPE , x_crrnt_cntrct_othr_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_othr_revn%TYPE , x_crrnt_cntrct_rsrc_revn_in ggate_ct.gtt_s_doc_quote.x_crrnt_cntrct_rsrc_revn%TYPE , last_upd_in ggate_ct.gtt_s_doc_quote.last_upd%TYPE ) IS BEGIN IF prev_sts_cd_in = stat_cd_in THEN NULL; ELSE INSERT INTO gtt_s_doc_quote ( row_id , stat_cd , prev_sts_cd , bu_id , created , x_crrnt_tot_agrd_rms , x_crrnt_tot_blckd_rms , x_crrnt_tot_pckdup_rms , x_crrnt_tot_pckdup_avgrt , x_crrnt_tot_blckd_avgrt , x_crrnt_cntrct_sr_revn , x_crrnt_cntrct_fd_revn , x_crrnt_cntrct_bev_revn , x_crrnt_cntrct_rm_revn , x_crrnt_usd_exchng_rt , x_crrnt_cntrct_othr_revn , x_crrnt_cntrct_rsrc_revn , last_upd ) VALUES ( row_id_in , stat_cd_in , prev_sts_cd_in , bu_id_in , created_in , x_crrnt_tot_agrd_rms_in , x_crrnt_tot_blckd_rms_in , x_crrnt_tot_pckdup_rms_in , x_crrnt_tot_pckdup_avgrt_in , x_crrnt_tot_blckd_avgrt_in , x_crrnt_cntrct_sr_revn_in , x_crrnt_cntrct_fd_revn_in , x_crrnt_cntrct_bev_revn_in , x_crrnt_cntrct_rm_revn_in , x_crrnt_usd_exchng_rt_in , x_crrnt_cntrct_othr_revn_in , x_crrnt_cntrct_rsrc_revn_in , last_upd ); INSERT INTO s_doc_quote_ct ( row_id , stat_cd , prev_sts_cd , bu_id , created , x_crrnt_tot_agrd_rms , x_crrnt_tot_blckd_rms , x_crrnt_tot_pckdup_rms , x_crrnt_tot_pckdup_avgrt , x_crrnt_tot_blckd_avgrt , x_crrnt_cntrct_sr_revn , x_crrnt_cntrct_fd_revn , x_crrnt_cntrct_bev_revn , x_crrnt_cntrct_rm_revn , x_crrnt_usd_exchng_rt , x_crrnt_cntrct_othr_revn , x_crrnt_cntrct_rsrc_revn , last_upd) SELECT row_id , stat_cd , prev_sts_cd , bu_id , created , x_crrnt_tot_agrd_rms , x_crrnt_tot_blckd_rms , x_crrnt_tot_pckdup_rms , x_crrnt_tot_pckdup_avgrt , x_crrnt_tot_blckd_avgrt , x_crrnt_cntrct_sr_revn , x_crrnt_cntrct_fd_revn , x_crrnt_cntrct_bev_revn , x_crrnt_cntrct_rm_revn , x_crrnt_usd_exchng_rt , x_crrnt_cntrct_othr_revn , x_crrnt_cntrct_rsrc_revn , last_upd FROM ggate_ct.gtt_s_doc_quote; END IF; END quote_sts;
-
: Error: the port number you entered contains a non-digit character
Hi all
Nice day.
After installation of the version 11g GRID on a Windows 2008 Server, now I tried to install the Agent on one of the servers which is a 64-bit solaris box.
I read that silent installation is possible.
I made the necessary changes in the additional_agent.rsp.
The same thing has been changed in the staticports.iniOMS_HOST=xxx.43.xx.177 OMS_PORT=4889 AGENT_REGISTRATION_PASSWORD=xxxxx123
The OMS_HOST contains the IP address where the grid and OMS_PORT is the port of the GRID.Oracle Management Agent Port=4889
Then on run the below command, I get this error:
In the file journal below are comments:-bash-3.00$ ./runInstaller -silent -responseFile /t5/oracle/grid_agent/solaris/response/additional_agent.rsp Starting Oracle Universal Installer... Checking Temp space: must be greater than 150 MB. Actual 10602 MB Passed Checking swap space: must be greater than 150 MB. Actual 21941 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-06-05_11-06-37PM. Please wait ...-bash-3.00$ *** Check for updates *** *** Select Installation Type *** *** Check Prerequisites *** *** Specify Oracle Management Service Location *** *** Customize Ports *** ERROR: Error:The port number you entered contains a non-numeric character.
Please suggest how tobash-3.00$ vi oraInstall2012-06-05_11-06-37PM.err "oraInstall2012-06-05_11-06-37PM.err" 16 lines, 1474 characters /etc/inittab does not seem to contain default runlevel information. oracle.sysman.install.oneclick.queries.AgentPortHandler$PortHandlerException: Failed to allocate free Enterprise Manager Central Console Port from Default Range 1830 to 1849. Please free a port from the Range and re-try the installation. at oracle.sysman.install.oneclick.queries.AgentPortHandler.getFreePort(AgentPortHandler.java:250) at oracle.sysman.install.oneclick.EMGCPortDlg.getPortDialogValues(EMGCPortDlg.java:388) at oracle.sysman.install.oneclick.EMGCPortDlg.m_createMainPanel(EMGCPortDlg.java:301) at oracle.sysman.install.oneclick.EMGCOMSConnectInfoForAgentInstall$PageValidationListener.wizardValidatePage(EMGCOMSConnectInfoForAge ntInstall.java:262) at oracle.bali.ewt.wizard.WizardPage.processWizardValidateEvent(Unknown Source) at oracle.bali.ewt.wizard.WizardPage.validatePage(Unknown Source) at oracle.bali.ewt.wizard.BaseWizard.validateSelectedPage(Unknown Source) at oracle.bali.ewt.wizard.BaseWizard._validatePage(Unknown Source) at oracle.bali.ewt.wizard.BaseWizard.doNext(Unknown Source) at oracle.bali.ewt.wizard.dWizard.DWizard.doNext(Unknown Source) at oracle.bali.ewt.wizard.dWizard.DWizard.goForward(Unknown Source) at oracle.sysman.install.oneclick.EMGCInstaller.prepareForSilentInstall(EMGCInstaller.java:952) at oracle.sysman.install.oneclick.EMGCInstaller.main(EMGCInstaller.java:1031) ERROR: Error:The port number you entered contains a non-numeric character.
Concerning
KKA few things to check:
-Check that the file/etc/hosts on the computer (agent) has a target entry valid for the host, especially its ip address. If necessary, run the following commands to cross check:
Nslookup
NslookupNote: The recommended file/etc/hosts format is
. -Check if there is a restriction of firewall on the range of ports from 1830 to 1849
Kind regards
-Loc -
a non-digit character was while digital was expected
Hello
I get the error from database when working with Oracle PLSQL code below.
I come from a previous date Sunday in a variable and passing the date in the native dynamic SQL
DECLARE v_sun_date DATE; v_sql varchar2(30); v_s1_date VARCHAR2(30); v_sql1 VARCHAR2(1000); v_date VARCHAR2(30); BEGIN --select to_char(next_day ( trunc (sysdate-5, 'iw') , 'Sunday' ) ,'DD-MON-YY') into v_sun_date from dual; SELECT to_date(to_char(trunc(next_day(sysdate-5,'Sunday')),'MM/DD/YYYY'),'MM/DD/RRRR') into v_sun_date from dual; dbms_output.put_line('The sunday date is '||v_sun_date); --select TO_DATE(v_sun_date,'MM/DD/YYYY') into v_s1_date from dual; --dbms_output.put_line('The sunday date is '||v_s1_date); --v_sql := q'[drop table test_util]'; --execute immediate v_sql; execute immediate q'[create table test_util as SELECT A.* From HRBOSTF.TBL_STF_UTL_MAIN A, DIM_DATE where EMPLOYEE_NUMBER <> 'FILLER' and (A.PROVIDER_REGION = 'Own' or A.PROVIDER_REGION ='Inter SBU') and dim_date.Weekend_date <= '||v_sun_date||' --to_date('11/01/2015','MM/DD/YYYY') --- 1st feb sunday date and NVL(DIm_date.Note,'A') <> 'I' and COST_PA_PERIOD=DIm_date.Week_no and PROJECT_TYPE <> 'Public Holidays' and provdr_bu in ('CPRD','EUC','HTEC','IDS','MALS','CBS') and job_rank not in ('5 CN','05 SB','ZZ','NonEm','16','64 SU') and job_desc not in('Contractor', 'Supervising Associate') and job_class = 'CSS']'; END; /
If please appreciate your help and must pass the v_sun_date to immediate execution.
Concerning
What are you trying to do with this?
To_date (to_char(some_date_expression,'MM/DD/YYYY'), ' DD/MM/RRRR')
This is a verbose and inefficient way to TRUNC (some_date_expression), but your expression of date is already truncated so it is useless.
Your problem however is that your immediate execution of the query compares Weekend_date with the literal string. v_sun_date | instead of the contents of the variable v_sun_date. The best solution would be to use a variable binding (although I agree with Paul that it is generally a bad idea to create tables on the fly like this):
run immediately q'[create table test_util like
SELECT A.*
Of HRBOSTF. TBL_STF_UTL_MAIN A, DIM_DATE
where EMPLOYEE_NUMBER <> 'FILL' and (A.PROVIDER_REGION = 'Clean') or A.PROVIDER_REGION = 'SBU Inter'
and dim_date. Weekend_date <=>=> : 1
and NVL (dim_date.note, 'A') <> 'I '.
and COST_PA_PERIOD = DIm_date. Week_no
and PROJECT_TYPE <> "holidays".
and provdr_bu in ('SPCER', 'EUC', 'SACTH', 'ID', 'EVILS', 'CBS')
and not job_rank ("' CN 5 ', '05', 'ZZ', 'NonEm' SB ', '16', ' SU 64 ')
and not job_desc ("Entrepreneur", "supervision associated with")
and job_class = 'CSS']'
Using v_sun_date;
-
volume license 20-digit versus 25 characters product key activation
A week or two ago I was given an HP computer XP Professional sp3.
The operating system and the computer are older than 5 years
I want to restore the operating system to its "factory condition".
I DO NOT have the installation disk so I created a professional to xp bootable installation disk using the files on my hard drive.
The disk has been created; and to test it, I used another computer with a newly formatted hard drive.
Everything was going well until I came to the Web page requesting the key 25-digit product and Volume License product key.
I take 25 characters of the label on my HP computer case and was rejected.
I then they are in the 25-character activation code (obtained from the HP computer) and was again rejected.
I found a 20 digit SPSS (?) Volume license key (?) but this was rejected.
My goal is to have the xp professional willing to meet my needs
and
Having a way to reinstall xp professional following a catastrophic failure total
All help and advice welcome
concerning
All keys - volume-license keys are 25 characters long.
Since you don't even have a volume license, don't forget to try to find a key for a.Your PC has a COA sticker on it? If so, what operating system is listed? -
Retrieve column values is the only character
Hi all
I have a column whose values are the combination of characters and the number. example below.
1L2P - 7 K-004-ADJAEA
3L 24-7825767 - CC5YGY
9030-CAP
LOCK-9030-NOTSERV
NO-10E987-SERV
But I need to retrieve data that has only the character before the 1st dash '-'.
Query for the above values.
WITH SAMPLE_TAB
AS
(SELECT 'NON-10E987-SERV"AS DOUBLE DIGIT
UNION
SELECT ' 1L2P - 7K 004 - ADJAEA "AS THE DOUBLE DIGIT
UNION
SELECT "LOCK-9030-NOTSERV" AS THE DOUBLE DIGIT
UNION
' SELECT ' 3 L 24-7825767-CC5YGY "AS THE DOUBLE DIGIT
UNION
SELECT "FUEL-9030-CAP" AS DOUBLE DIGIT
)
SELECT * FROM SAMPLE_TAB;
Power required:
9030-CAP
NO-10E987-SERV
LOCK-9030-NOTSERV
Enjoy all that help.
Thank you
Hello
MSB says:
Hi all
I have a column whose values are the combination of characters and the number. example below.
1L2P - 7 K-004-ADJAEA
3L 24-7825767 - CC5YGY
9030-CAP
LOCK-9030-NOTSERV
NO-10E987-SERV
But I need to retrieve data that has only the character before the 1st dash '-'.
Query for the above values.
WITH SAMPLE_TAB
AS
(SELECT 'NON-10E987-SERV"AS DOUBLE DIGIT
UNION
SELECT ' 1L2P - 7K 004 - ADJAEA "AS THE DOUBLE DIGIT
UNION
SELECT "LOCK-9030-NOTSERV" AS THE DOUBLE DIGIT
UNION
' SELECT ' 3 L 24-7825767-CC5YGY "AS THE DOUBLE DIGIT
UNION
SELECT "FUEL-9030-CAP" AS DOUBLE DIGIT
)
SELECT * FROM SAMPLE_TAB;
Power required:
9030-CAP
NO-10E987-SERV
LOCK-9030-NOTSERV
Enjoy all that help.
Thank you
Perhaps the easiest way is
...
WHERE REGEXP_LIKE (alphanumeric, ' ^ [[: alpha:]] + -')
You could also write it like this:
SELECT *.
OF sample_tab
WHERE REGEXP_LIKE (alphanumeric
, '^' || -at the beginning of the string
"[[: alpha:]]' |" -alphabetical character (from A to Z according to your language, case insensitive)
'+' || -the above can occur 1 or more times
'-'-(no special meaning) the hyphen character
)
;
-
Hi all
I need your help in providing me the regular expression to exclude zeros only if it sits between the characters and a nonzero numerical value.
For example:
PL032 = > PL32
GDP500 = > GDP500 (should remain is that the zeros are not between a character and not null)
SOA008 = > SOA8
GDP000 = > GDP0 (only exception: If that's all the 000 and then convert it 0)
Thank you for your help in advance.
Kind regards
Emeline
Hi, emeline,
1000877 wrote:
Hi all
I need your help in providing me the regular expression to exclude zeros only if it sits between the characters and a nonzero numerical value.
For example:
-ONLINE PL32 PL032
GDP500-online GDP500 (expected to remain is that the zeros are not between a character and not null)
SOA008-ONLINE SOA8
GDP000 => GDP0 (only exception: If that's all the 000 and then convert it 0)
Are characters. When you say "between characters and numeric value", do you mean "between non-numeric characters and numeric characters?
If so:
REGEXP_REPLACE (str,
'(\D)0+(\d)'
, « \1\2 »
)
\D (with a capital D) means any non-digit character.
\d (with a small d) means any numeric characters, including 0. Because regular expressions are greedy by default, "0 + 'match all ' 0' if some other number follows, but leave the last '0' (as you want) then there is not another number immediately after him."
-
Limit the number of characters in a text based on the first digit field
Hello and thank you in advance for your help!
I want to limit the amount of characters in the text field based on the first digit of the number (the text field is limited to a number format... no decimals, no comma).
For example, if the number starts with a 3, I would limit the text field to allow only ten characters. I have three scenarios but if I could start with code and what is the best place to add (key combination or validation?) I can take it from there. Thanks again for your help!
I wrote this code for you that does this. Use it as a typo of the custom field code:
// Validate that only digits are entered if (event.change) { event.rc = /^\d+$/.test(event.change); } // Validate string length if it starts with 3 if (/^3/.test(AFMergeChange(event))) { event.rc = AFMergeChange(event).length <= 10; if (!event.rc) app.alert("If the number starts with \"3\" it may not be longer than 10 digits.",1); // optional error message }
You can duplicate the second part of it for additional terms, but keep in mind that this code won't let you even remove the first character in the field if the result is not valid.
For example, if you enter "234567890123456" then you can't remove the "2" at the beginning because that would result in a number not valid. You can delete all the other numbers, even if and when it is 10 digits or less, then you can remove the departure "2" as well.
-
Enter data into the empty cell inserts the invalid main character
When I enter data in an empty cell, for example 1 in a column, and then click validation I get the error ORA-01722: invalid number. Although I do not see the character in front of the 1 I use RIGHT twice after reaching HOME in this cell to get the cursor to the right of the 1, if a character appeared in front of the 1. Hit the BACKSPACE deletes the invisible character, and now I can commit the data entered.
The same thing seems to happen when you remove a date using backspace in a date column. The use of return back once led to an error "ORA-01858: a non-digit character was found here where was waiting for a digital". I have to use the BACKSPACE again to get the empty cell.
And the same thing happens in a varchar column too, although sometimes when he gets that space seems to be inserted in front of the text I entered, but this space is visible only when the cursor is not in the cell.
What causes this? Bug in the developer SQL, SQL Developer settings, settings of the keyboard, something else?
(Oracle SQL developer 3.1.0.7 64bits)This is a bug and has been fixed for the next version.
Brian Jeffries
SQL development team -
Hello
I have a situation where I have data like
6: serious players
5: long odd punters
6: serious players
5: long odd punters
1: savvy
5: long odd punters
6: serious players
5: long odd punters
I want only numeric data FRO this column so I used
SELECT double SUBSTR('6: Serious Players,1,2), but I'm
6
5
6
5
1
5
6
5
now how to remove this "character, so I'll go only a numeric value"Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> with test 2 as 3 (select q'"'6: Serious Players"' str from dual union all 4 select q'"'5: Long Odd Punters"' str from dual union all 5 select q'"'6: Serious Players"' str from dual union all 6 select q'"'5: Long Odd Punters"' str from dual union all 7 select q'"'1: Savvy"' str from dual union all 8 select q'"'5: Long Odd Punters"' str from dual union all 9 select q'"'6: Serious Players"' str from dual union all 10 select q'"'5: Long Odd Punters"' str from dual 11 ) 12 select str 13 , regexp_replace (str, '[^[:digit:]]') 14 , substr (str, 2, 1) 15 from test 16 / STR REGEXP_REPLACE(STR,' S -------------------- -------------------- - '6: Serious Players 6 6 '5: Long Odd Punters 5 5 '6: Serious Players 6 6 '5: Long Odd Punters 5 5 '1: Savvy 1 1 '5: Long Odd Punters 5 5 '6: Serious Players 6 6 '5: Long Odd Punters 5 5 8 rows selected.
the actual query starts at line 12, in the code above.
-
A character style that puts in shape all negative numbers (-10) with red color
How to set a character style that formats all negative numbers (-10) with red (a predefined text style)?
I guess that I should be using GREP, but it's kind again for me and I can't find an answer to this on google.
-\d+?,\d+?\%|-\d+?
seems to work
GREP is synonymous with General Regular Expression Parser - large print receive codes and you insert the code to highlight the characters you want to
In the that I provided above is probably not the nicest way to do it, but I'll break it
-= minus sign
\d = any digit
+ = Continue until there are no more numbers
? = off at the end of a group of numbers
This means find any number within a group of numbers
just means a comma
and yet once I wanted to find any group of numbers with \d+?
% means with a percentage at the end sign
-\d+?,\d+?\% means find: sign, followed by a group of digits followed by a comma followed of another group of numbers followed by the percent sign.
| [vertical] means OR
-\d+? would be to find a
-
Group of figures
-\d+?,\d+?\%|-\d+?
All means find any group of numbers separated by a comma with a sign of percentage at the end OR a sign less with a group of figures.
Maybe you are looking for
-
Satellite A40: Can I use the audio as audio output
can I use audio (microphone) as audio output on my Satellite A40? I need two audio output jacks to use an audio system 4.1. I got a PC where it was possible by changing the Bios.
-
HP mini 1109tu does not illuminate and has its power led flashing
Well I just got my Bill Mini of the day the following day and while they were inspecting it this morning the power led flashes and it won't turn (even on the battery mode). [IMG] http://i168.Photobucket.com/albums/u171/Arnaehl/img_96221_hp-1000.jpg [
-
Hello I use my Intel client to manage my wireless network connection in Windows XP Pro SP3. (I need to use the Intel client because it supports protocols wireless not supported by the Windows client). I would like to remove the icon from the system t
-
Internet (firefox) and other programs not giving sound.
I have fire fox Web browser which worked for a while, but recently I've been open the program, but he did not appear in my sound mixer. I can't adjust the sound at all. Other programs are functioning normally, but all from time to time another progra
-
I have an all-in-one, purchased B110A 5 months ago. I asked compatible Mac and the salesman who sold me the B110A read the packaging to confirm that it is indeed Mac compatible. The problem with the B110A, is that it's scanning is no longer under OS