Channel of String conversion to the data channel
I have a problem I tried to accomplish through a. The URI of the file but can seem to make it work good for me. I have an original data channel are in TEXT format and the data in the channel are the phone number in the format 6667779999 or 4343. Can someone help me with a suggestion of script to convert this. Most of my ATTEMPTS end with a 66.67779e5. Can be simple but I can just figure it out.
Thank you J
Hello J,
A number such as 66.6778888e5 can be shown as 6667778888 in a DISPLAY box or table or text REPORT or a axis of REPORT graph by using the display correct format string - in this case "d". Where do you 6667778888 number appears like this in DIAdem, exactly? If you want to see in a BULLETIN Board, you will need to choose the option button 'Selected channels' first in the configuration dialog box, and only then will you be able to choose a format string to display such as "d" for this column.
Brad Turpin
Tiara Product Support Engineer
National Instruments
Tags: NI Software
Similar Questions
-
Hello
I've recently become involved with databases, and I hit a little snag.
I have strings that represent a date, they are very oddly formatted and need to store them as dates. the format string looks like this:
"Monday, May 13, 2001"
How can I effectively convert DATE type?
I hope it's more simple I think.
Thanks in advance/* Formatted on 2012/06/26 04:31 (Formatter Plus v4.8.8) */ SELECT TO_DATE (REGEXP_REPLACE ('SUNDAY,May the 13th of 2001', 'the|th|of', ''), 'DAY,MONTH DD RRRR' ) FROM DUAL;
-
problem with implicit to the conversion of the date in oracle
Next date functions will work fine as long as string confirms for the next model of the date
D MY separator2 R separator1
the separator can be any sign of punctuation (/ $ % & *, ^) sapces, tabs...
as
Select ADD_MONTHS('21$MAY*2010',2) from DUAL;
SELECT MONTHS_BETWEEN (23 ^ FEB & 2010', ' 11% jan(2011') FROM DUAL;)
the two works perfectly, but it does not work in the ROUND functions (date) and TRUNC (date);
SELECT ROUND('12-FEB-2010') FROM DUAL; -gives error
It needs explicit conversion using TO_DATE();
My question is why what is happening?
Is it because we have two functions ROUND (NUMBER) and ROUND (DATE)?Hello
Welcome to the forum!
user650693 wrote:
Next date functions will work fine as long as string confirms for the next model of the dateAll of the built-in functions will work fine as long as use you them as directed; in particular, pass arguments that have the correct data type. If a function requires a DATE for an argument, always place a DATE, not a VARCHAR2 you hope will be be implicitly converted to DATE.
the separator can be any sign of punctuation (/ $ % & *, ^) sapces, tabs...
This applies to explicitly call the functions where a format string is used, for example, TO_DATE.
as
Select ADD_MONTHS('21$MAY*2010',2) from DUAL;SELECT MONTHS_BETWEEN ('23 ^ FEB & 2010', ' 11% jan(2011') FROM DUAL;)
the two works perfectly,
As the respondent previous said, the two work may , depends on several factors, such as your NLS parameters. It's a very bad habit to rely on such things. The 1st argument to ADD_MONTHS and two arguments to MONTHS_BETWEEN, are supposed to be DATEs, so always call these functions with the DATEs.
but this does not work in the ROUND functions (date) and TRUNC (date);
SELECT ROUND('12-FEB-2010') FROM DUAL; -gives errorIt needs explicit conversion using TO_DATE();
My question is why what is happening?
Is it because we have two functions ROUND (NUMBER) and ROUND (DATE)?No, it's because there is no ROUND function (VARCHAR2).
The use of strings which are expected of the DATEs is simply asking for trouble. Sometimes, you get what you're asking. -
Need help for the conversion of the Date
Hi all
Your expert input is much appreciated.
Have a problem where it is my master table structure, whenever there is an update/delete/insert on the main table
There's a trigger that insert an entry in the Audit table.
SQL > cpp_Master Desc;
Number of Ent_id
Date of Ent_date
SQL > Desc Cpp_Master_Audit
Number of Ent_id
Date of Ent_date,
Insert_type varchar2 (1)
The problem is that when we insert the Sub record in the table, the ent_date column appears in this way.
SQL > INSERT INTO CED.cpp_Master (ENT_ID, Ent_date)
VALUES (6030902, TO_DATE (1 JANUARY 01 00:00:00 ', ' HH24: PUT DD/MM/YYYY "));SQL > SELECT * FROM CED.cpp_Master;
6030902 01/01/0001
SQL > SELECT * FROM CDS. Cpp_Master_Audit;
6030902 01/01/0001
But when I update the date is coming up as below
SQL > update ced.cpp_Master set Ent_date = to_date (' 1 March 01', ' dd-mon-YYYY "") where ent_id = '6030902';
SQL > commit;Tried under updates so
(
Update ced.cpp_Master set Ent_date = ' March 1 01' where ent_id = '6030902';
Update ced.cpp_Master set Ent_date = to_char (' 1 March 01', ' dd-mon-YYYY "") where ent_id = '6030902';
)
Whenever the output below always. (Insert has no problem, just update a problem)
I wonder why when there is an insertion of the date value is "01/01/01" in (Cpp_Master_Audit), but when I update the date value is "01/01/2001" ".
I need the value to insert as "01/01/01", as all that was updated in Master table (Cpp_Master)
SQL > SELECT * FROM CED.cpp_Master;
6030902 01/01/2001
My request to trigger:
CREATE OR REPLACE TRIGGER CDS. CPP_AUDT
AFTER INSERT OR UPDATE OR DELETE
ON CED.cpp_Master REFERENCING OLD AS OLD AGAIN AS NEW
FOR EACH LINE
DECLARE
l_action_code VARCHAR2 (1);
BEGINIF THE INSERTION
THEN
l_action_code: = 'I ';
ELSIF UPDATE
THEN
l_action_code: = 'U ';
ON THE OTHER
l_action_code: = ';
END IF;IF (l_action_code = 'I'
OR l_action_code = '
OR (l_action_code = 'U'
AND (NVL (: OLD.)) ENT_ID, 0) NVL <>(: NEW.) ENT_ID, 0)
OR NVL (TO_CHAR (: OLD.)) Ent_date, ' mm/dd/yyyy'),
'X') <>
NVL (TO_CHAR (: NEW.)) Ent_date, ' mm/dd/yyyy'),
« X »)
)))
THEN
INSERT IN DEC. () Cpp_Master_Audit
ENT_ID, Ent_date, Insert_type
)
VALUES (DECODE (: OLD.ent_id, NULL,: NEW.ent_id,: OLD.ent_id),)
DECODE (l_action_code, 'I',: NEW.) Ent_date, 'd', NULL, 'U', DECODE (: NEW.) Ent_date,: OLD. Ent_date, NULL,: NEW. Ent_date)),
Insert_type l_action_code);END IF;
END;
/You wrote that ent_date is of type DATE
SQL > cpp_Master Desc;
Number of Ent_id
Date of Ent_date
so DO NOT fill with a chain, but with a date, and you have correct data in it.
This:
Update ced.cpp_Master set Ent_date = 1 March 01 ' where ent_id = '6030902';
is simply wrong that fill you your column DATE with a string and your NUMBER column with a string filter too.
Use
Update ced.cpp_Master
Set Ent_date = TO_DATE('01-MAR-0001','DD-MON-YYYY') where ent_id = 6030902;
and you will have no problems (as long as the NLS_DATE_LANGUAGE parameter is set correctly to support abbreviations English months)
HTH
-
Download data - problems with the conversion of the date
Hello
I have a picture that I downloaded from a database of oracle using SAS. It has a column with dates in the following format: 10/31/2012 11:00
When I download the data (via workshop SQL-> utilities-> data workshop-> load data) by categorizing my dates as varchar2, everything works fine... but fails when I choose my type in the Date column.
Please advice how to fix this
Thank youK I import my data with other tools. Looking at the workshop of data utility, no doubt you would put MM/DD/YYYY HH: mi: SS AM in the 'Format' field for this column.
-
Conversion of the data type of a table column
Hello
I have a column with the varchar2 data type. I want to convert to number data type. But the data in the table are not lost. Can someone suggest me how to convert the column with the varchar2 data type to store the data in the table of number data type.
Thanks in advancetry something like this
create table t(col varchar2(10)); insert into t values('1'); insert into t values('2'); commit; select * from t; alter table t add col1 number; update t set col1 = to_number(col); commit; alter table t drop column col; alter table t rename column col1 to col; select * from t;
Published by: Karthick_Arp on April 6, 2009 12:32 AM
-
OpenScript / database: String obtained from the data bank cannot be used for parameters
Hello
I add a jar to java code OpenScript file. Since the need to enter the settings of the front console run the jar file, I think that it can read the settings from the database and then run it as "java-jar filename.jar para1, para2 para3", 2 3 para1 is synonymous with three parameters obtained from the database "
I get the value of the database as follows:
String para1 = "{{db.caseName.para1}}";
String para2 = "{{db.caseName.para2}}";
String para3 = "{{db.caseName.para3}}";
However, it does not work and it looks that this string has the database cannot used as settings in 'java-jar filename.jar para1, para2 para3.
I'm trying to assign the value directly as: String para1 = 'PARA1 '; String para2 = "PARA2; String = 'PARA3; then can run 'java-jar filename.jar para1, para2 para3' and this can work.
So, how can I use parameters got in 'java-jar filename.jar para1, para2 para3' database successfully?
Thank you very much ^ _ ^!
Kind regards
AngyoungHello
You can use eval() for this. That is to say. Use the following method
String para1 = eval ("{{db.caseName.para1}}");
String para2 = eval ("{{db.caseName.para2}}");
String para3 = eval ("{{db.caseName.para3}}");then run "java-jar filename.jar para1, para2 para3.
Kind regards
Dembélé M -
Problem with the conversion of the date
Hello
I have a column called period_name which is of type varchar which contains data as jan-02 Feb-03 and 05-02, now my requirement is I want convert month names number say jan-02 to 01-02.
I tried to use to_char (to_date(period_name,'mm/yy'), 'mm - yy') which gives good results to the selection, but when I use the same creation then Sunrise error
[Error] Run (58:24): ORA-01858: a non-digit character was found here where was waiting for a digital
Query:
create the table dumm1 as
(
Select to_char (to_date(period_name,'mm/yy'), 'mm - yy') in the period_name of xx_alll
)
Concerning
Published by: 862807 on June 13, 2011 03:30862807 wrote:
Here when I write a select statement which I produced earlier works fine, but when I write the same create in her statement generates an error.
No it's not.
You're not extract all lines, you use Toad or some other GUI to confuse you. Enter the results data grid and type CTRL + end to fetch the last row. Or use sqlplus. The selection will fail too.
-
How to string conversion in the Nodelist XML in java
Hai
I need to convert the string to a nodelist in java
Element parentcustom = (element) wink;
String resultNodeValue = replaceAngleBracketsChildType (parentcustom.toString ());
NodeList parentcustomList = resultNodeValue (NodeList);
I did high way, but I don't get the right answer
I need this resultNodeValue to be converted to nodelist.
can someone help me
Thanks in advance...
Your requirement is to get the "parentcustomdetails" inside the node 'parentruledetails '.
The following code will do that.
NodeList children = doc.getDocumentElement().getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node parentRule = children.item(i); if (parentRule.getNodeName().equals("Parentrule")) { NodeList nlParentRule = parentRule.getChildNodes(); for (int j = 0; j < nlParentRule.getLength(); j++) { Node parentRuleDetails = nlParentRule.item(j); if (parentRuleDetails.getNodeName().equals( "parentruledetails")) { NodeList nlParentRuleDetails = parentRuleDetails .getChildNodes(); for (int k = 0; k < nlParentRuleDetails.getLength(); k++) { Node parentCustomDetails = nlParentRuleDetails .item(k); if (parentCustomDetails.getNodeName().equals( "parentcustomdetails")) { NamedNodeMap attributes = parentCustomDetails .getAttributes(); System.out.println(parentCustomDetails .getNodeName()); for (int l = 0; l < attributes.getLength(); l++) { Node attr = attributes.item(l); System.out.println("\t" + attr.getNodeName() + " -- " + attr.getNodeValue()); } } } } } } }
The output of this code is,
parentcustomdetails CHILD_TYPE -- Console CMD_CODE -- 37135 CMD_NAME -- login authentication [string] CMD_OPTION -- login authentication COLUMN_INDEX -- 0 CONDN_OPER -- exists CONDN_VALUE -- True PARENT_RULE_CODE -- PR630 RULE_TYPE_FLAG -- Customrule parentcustomdetails CHILD_TYPE -- Console CMD_CODE -- 37135 CMD_NAME -- login authentication [string] CMD_OPTION -- string COLUMN_INDEX -- 1 CONDN_OPER -- equalsto CONDN_VALUE -- AAAAAAAAA PARENT_RULE_CODE -- PR630 RULE_TYPE_FLAG -- Customrule
-
Help with the conversion of the date
Hello my table contains the sample_date of the column that contains values for the format: 12/09/2010 00:00:00.
I want to read the lines more than two years, so I used the following query:
"SELECT * FROM TEST_TABLE WHERE TO_CHAR(SAMPLE_DATE,'DD/MM/YYYY') < 6 February 2009;
However this will not get the required lines.
Can you please?
Thank you in advance.Use this
SELECT * FROM TEST_TABLE WHERE SAMPLE_DATE<>
Concerning
Arun -
Reliability of the data in the conversion to &; from a Variant...
It is possible to convert any data type to a variant, and then turn it back on. In doing so, are there data types who will lose information during the conversion process? If so, why?
Yes, you can convert any type to a variable ranging and back. There is a VI called "Variant data" which will have a type as input. He continued to convert the variant the correct data. The side variant must know what type of data to expect. He can pull of the Variant. However, you can use a cluster of generic data that consists of a username and a Variant. Then you can have different types of data which can handle the side reception. It is a two-step process. One of conversion the variant of general type (data type and Variant cluster). The second would be a case statement uses the type then covert the internal variant to the specified type. This approach is used for generic messaging systems. The upper levels of the code will know what to do with the data. The lower levels are just generic data passing around.
I'm not aware of any information that get lost during the conversion of the data to and from a variant. Of course, I not had no problem using them.
-
Hi friends,
I have a problem with the conversion of the date in my PB.
SELECT eff_dt, TO_CHAR (TO_DATE (eff_dt, 'Dd-mon-yy'), 'dd-mm-yyyy') DATE from une_table;
It gives me o/p as -.
DATE OF EFF_DT
01.01.1950 00:00:00 01/01/2050
as you can see here the year is wrong, while I convert the date that I use the substr() also to cut the year of first line, but it gives me the 50 i.e. onle last (YY)
So, if someone can help me with this prob.
If eff_dt is a column DATE, then stop calling to_date on it.
If this is not the case, consider making it into a DATE column. If you are unable to do this, use the format mask appropriate when you call to_date
-
How to read the date of the day of the day of the year?
I want to put 30 days for the test of endurance for the application of the components. the user will have the current value of 30 days with specify them the end of the day.
I saw that the "seconds to Date/Time.vi" sure I checked the day of the year. If I can use this day of the year, I can add + 30 read 30 date.
Barros,
What I gave was the answer you were looking for originally because I believe. You will not just be able to read the date in a coherent way and then add 30. You can either use the function Get time in seconds or a few varaint it and then add the offset you want (you could use the get a Date/time string and enter the date directly, but this digital conversion which will be useful in the monitoring of the time elapsed will be much more difficult than what I provided only). If you want to stop the test, simply to keep track of the amount of time the test is in pause and extension at the time where that amount.
Cheers, Matt
-
I have data to the basic generic text file format that must be converted into Excel spreadsheet format. The data are much longer than 65536 rows and in my code, I was not able to find a way to see the data in the next column. Currently, the conversion is done manually and generates an Excel file which has a total of 30-40 complete columns of data. Any suggestions would be greatly appreciated.
Thank you
Darrick
Here is a possible solution to the (potential) problem. Convert an array of strings and erase the data before writing to the file
-
The date in the table external or real
Hi all
We have to load the file .csv to external table, few of the columns are date data type
If I load in an external table as tank and convert to date during the actual table loading
In general, which is faster (making the conversion of the date when loading the external tables or at a real table).
Oracle version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
Thank you
RambeauHere it is - very basic, no indexes or constraints, a single column. The input file has 99000 rows with 3 distinct values.
create table xtest1 (dt date); create table xtest2 (dt date) organization external ( type oracle_loader default directory gic access parameters ( records delimited by newline fields ( DT CHAR(10) DATE_FORMAT DATE MASK "YYYY-MM-DD" ) ) location ('xtest.data') ) ; create table xtest3 (dt varchar2(10)) organization external ( type oracle_loader default directory gic access parameters ( records delimited by newline fields ( DT CHAR(10) ) ) location ('xtest.data') ) ; create table xtest4 (dt date) organization external ( type oracle_loader default directory test access parameters ( records delimited by newline date_cache 0 fields ( DT CHAR(10) DATE_FORMAT DATE MASK "YYYY-MM-DD" ) ) location ('xtest.data') ) ; declare v_timer number; begin v_timer := DBMS_UTILITY.GET_TIME(); INSERT INTO xtest1 SELECT dt from xtest2; DBMS_OUTPUT.PUT_LINE('External with date cache: Time Taken: '||to_char((DBMS_UTILITY.GET_TIME()-v_timer)/100,'999G999D99')); EXECUTE IMMEDIATE 'TRUNCATE TABLE xtest1'; v_timer := DBMS_UTILITY.GET_TIME(); INSERT INTO xtest1 SELECT to_date(dt,'YYYY-MM-DD') from xtest3; DBMS_OUTPUT.PUT_LINE('In SQL: Time Taken: '||to_char((DBMS_UTILITY.GET_TIME()-v_timer)/100,'999G999D99')); EXECUTE IMMEDIATE 'TRUNCATE TABLE xtest1'; v_timer := DBMS_UTILITY.GET_TIME(); INSERT INTO xtest1 SELECT dt from xtest4; DBMS_OUTPUT.PUT_LINE('External no date cache: Time Taken: '||to_char((DBMS_UTILITY.GET_TIME()-v_timer)/100,'999G999D99')); EXECUTE IMMEDIATE 'TRUNCATE TABLE xtest1'; end; / External with date cache: Time Taken: .34 In SQL: Time Taken: .47 External no date cache: Time Taken: .41 External with date cache: Time Taken: .34 In SQL: Time Taken: .47 External no date cache: Time Taken: .41 External with date cache: Time Taken: .35 In SQL: Time Taken: .47 External no date cache: Time Taken: .42
Kind regards
Bob
Maybe you are looking for
-
iPod classic 80 GB won't charge songs
Hello I'm an Italian boy, and I have an old ipod classic 80 GB, but it is held with care. I tried to download songs, about 1000 (I was shure first they were totally less then 60 gb) but it stops at the 800th and my computer (end of 2015) with itunes
-
No Satellite Pro 6100 no response from the screen
Can anyone help? My 6100 Pro Satellite lit last night then automatically went into hibernation, despite being connected. Now when I turn it on there is no response from the screen, but if I plug a monitor to the laptop, the screen works (as long as I
-
Satellite Pro C50-A-153 does not not turn on more - overheat?
LS,A week ago I bought a new laptop, a Toshiba Satellite Pro C50-A-153. Last night I was watching some micro-credit (looking for a new holiday) and I noticed that the laptop was overheating.I hit the market / stop butten and it turned of... later.And
-
WinRAR is really free, or is it a virus?
Hi, Im wondering if there is some fake sites Web WinRaR, virus etc, I got a request yesterday for details of payment and credit cards etc, yesterday, although it seems to be a free Web comments? Thanking you in advance, Maria. original title: Setup-W
-
Windows Update is not installed
I am using automatic updates. Update: "A security update for SQL Server Reporting Services 2000 Service Pack 2 (KB970899)" will not be installed. I click on "Quick Installation" it tries to install it, and then after a minute or two, it is said tha