Extracting Extents from an Array Field seperated by semicolon
Post Author: hopdaniel
CA Forum: Formula
We have a Field in our Database that looks like this. 15000;10000;50000;0;0;0;0;0;0;0;0;0;0;0;0;0;
I need to extract the qty's in the first three extents without the semicolon.
The field name is rfqitem.qty, and our App vendor said that he's able to extract the extents using ex. rfqitem.qty[1], rfqitem.qty[2], and that progress refers each extent as [n] after the field name.
Thank you,
Post Author: bettername
CA Forum: Formula
Duh, yep. Well, it'd friday afternoon.... I was trying to make sure the string that was being created from the split operaion was being converted into a number, but that's not the way to do it!
There's probably a quicker way of doing it than this, but at least I've tested it!
stringvar mystring:="15000;10000;50000;0;0;0;0;0;0;0;0;0;0;0;0;0;"; // replace with your field if you like...
numbervar i;numbervar array mynumbers;stringvar thisnumber;
//loop through the string, adding each char to a temp string.
//If the char is a semicolon, convert the tempstring to a number and add to array (will have to increase size of array first though)
// and then clear tempstring
for i:=1 to len(mystring) do (if mid(mystring,i,1)=";" then(redim preserve mynumbers[count(mynumbers)1];mynumbers[ubound(mynumbers)]:=tonumber(thisnumber); thisnumber:="";)elsethisnumber:=thisnumbermid(mystring,i,1););
//display the 3rd item in the arraymynumbers[3]
Similar Messages
-
Extracting Year from the date field
Hi,
I want to extract year from the date field... I've tried following code but got the error
SELECT to_char(a.A_EXPIRY_DATE,'yyyy') as EXP_YEAR from Table_A a
Please advice
Thanks in advanceuser12863454 wrote:
SELECT to_char(a.A_EXPIRY_DATE,'yyyy') as EXP_YEAR from Table_A aThis should work and returns a string.
What error did you get?
maybe your column name is wrong? Is it really A_somthing? This is possible but slightly unusual.
also possible
select extract(Year from sysdate) from dual;
/* with your table and column */
SELECT extract(year from a.A_EXPIRY_DATE) as EXP_YEAR from Table_A a;Edited by: Sven W. on Aug 18, 2010 6:41 PM -
Call http service extract value from person/group field
Hi
I have a list that has people or group field.
When Runing my WF I want to get in to a variable the members of the group that is in people or group field.
I would like to extract members from group using call http action.
How can i start?
which URL should i put in "Enter the HTTP service URL"?
pleas your help.Hi,
You can use the following URL to extract the members from group
http://siteurl/_api/Web/SiteGroups/getbyname('groupname')/users
You can create a workflow variable and extract the value from the people or group field
Build the URL using as follows
[%Workflow Context:Current Site URL%]/_api/Web/SiteGroups/getbyname([%Variable: GroupName%])/Users
For more information how to use the Web Service in workflow use the following article.
http://blogs.msdn.com/b/sharepointdesigner/archive/2012/09/05/how-to-work-with-web-service-using-call-http-web-service-action.aspx
Please don't forget to mark it answered, if your problem resolved or helpful. -
Extract Data from a Blob field
I have a BLOB type field in a Table. Now I would like to have a Pl/Sql code or C code which could read the data in the BLOB field which is in XML format. Actually the data in the BLOB a record and I would like to take only required data from the BLOB and insert into another Table
You might want to look at these OTN articles:
[list][*]Managing Web Content
[*]Customizing Content with XML
[list]
These apps use CLOBs instead of BLOBs to store XML documents, but they might give you some ideas.
Good luck,
-rh -
Extract VBAP-EAN11 from Country Dependent field like KNA1-LAND1
Hello,
Is there a way I can extract VBAP-EAN11 from a different field dependent on the country KNA1-LAND1.
Please suggest, if i can extract the data with this condition or any possible conditions with which i can extract VABP-EAN11 dependent on the country field....
Any suggestions would be appreciated!
Thank youHello,
Thank you very much for your timely response!
This is the way they had coded to extract the UPC field.
VBAP-EAN11(UPC) = VBAP-PMATN (Pricing Reference Material).
Just to clarify....you mean to say that this field is already extracting the data with reference to Material?
The requirement is...If VBAP-EAN11 = North America then it has to extarct from VBAP=PMATn
Else....It has to extract from VBAP-MATNR.
Can you pelase explain and clarify my confusion....
Does it mean that it cannot exatrct the data seperately depending upon the country?
ANy explonation will be appreciated.
Regards,
Developer. -
Extract a value of a fields from an internal table
hello everyone,
i need to extract a value of a fields from an internal table, the fields is in a postion "sy-tabix" that i know, so i need to pick this value without using a loop
thank you.Like this?
DATA: FIELD1 TYPE C,
FIELD2 TYPE C.
READ TABLE T_TAB INDEX 3.
FIELD1 = T_TAB-FIELD1.
FIELD2 = T_TAB-FIELD2.
Greetings,
Blag. -
What key fields should i set in DSO extracting data from 2LIS_02_ITM
hi experts
i extract data from 2LIS_02_ITM into a DSO, i know the DSO isn't a must, becoz the 2LIS_02_ITM delta type is ABR, but i want to keep the info in change log.
so, what the key fields should i set in the dso? just ebeln and ebelp is enough?
hunger for ur advice and thanks a lot!If you extract ITM toa DSO you cannot maintain a log of every change....the data will come ....but when the data must be activated the reference of the ebelp ebeln will remain only a single record....if you want to maintain all the data you must create another field in extractor with you can difference all the changes for one single ebelp ebeln...
Regards -
How to extract data from the fields present in two or three tables
Hi Experts,
I have a scenario where i have to extract data from the fields of different tables. e.g. let there 2 tables which have some number of fields . I want the data of 3 fields each from these 2 tables. How can i get that??
SamHi
You can create view in tcode se11..
here you include all tables from which you want to fetch the data..
you need to give selection condition here
eg..
say select empname from table A, select empadd from table B.. where empno(from A)=empno(from B)
(note that you dont need to write queries like this.. i have just given u the example)
After creating the view you can create datasource in RSO2..
Regards
Swati -
I am making a form in Acrobat XI pro.
In one text field, I created an array of several elements. I want other text fields to display certain elements from that array. For instance, one field should display the 3rd element, another field should display the 13th element, etc.
The Javascript for making the array is very long, and so I don't want to have to re-calculate the array every single time (in order to reduce rendering time when I open the form on an iPad). This is why I'd like to only have to create the array once, and simply refer to it throughout the form.What code are you using to update the array currently? Are you completely rebuiding it when an element changes, or just changing specific elements for certain fields? I'm still not sure what exactly you are trying to do, but something like this in a document level script will create your array:
var myArray;
// Call 'updateArray' to initialize array
updateArray();
function updateArray() {
// Code here to create/update array
myArray = new Array();
myArray[0] = "Value 1";
myArray[1] = "Value 2";
myArray[2] = "Value 3";
Then, for each field that needs to update this array, you can add a call to 'updateArray()' in the appropriate event. This will rebuild the array completely; if you just want to update specific elements, then you can access them directly. -
Data extraction from an array of data
So I want to extract a
subset from an array of data.
I have two columns of data that I need to do with,
these are potential energy (expressed in terms of kT) and relative separation. The data typically results in a parabola-type
shape with the potential energy on the y-axis and the separation on the
x-axis. The potential energy starts at
high kT's at small separation and then decreases to zero as the separation
increases and then it starts to increase again once it is past zero kT. The issue I have is that I need to disregard
any data that is greater than 6 kT. Thus
I need to extract the data (both the potential energy data and the
corresponding separation data) from the array that is 6kT or below. So the problem I am having is trying to work
out how to approach the extraction of this data. I would love to get some suggestion as to how
I should approach it.
I initially thought of using a mathscript node to do this,
but I am not sure of how I should code this, if this is indeed possible.
Another option I considered was to use one of the array vi's
to perform this extraction as I thought I could use them to find the element
where the kT is higher than 6 and the corresponding index element which I could
then use to extract the relevant portions of the array. But I don't see an easy way to achieve this.
So the vi I will write for this will function will actually
be a subvi of another vi I have written (this vi is named ‘non-linear fit to PE
data mod.vi' and it also has a couple of other subvis). I have attached this vi and a relevant data
file (as an example of the data I will be getting and needing to analyse) in a
zip file. I haven't included an example
of the subvi I need to write because I looking to find some pointers as to how
I could do this first. In the ‘non-linear
fit to PE data mod.vi' I have included a text box in the location I will be
putting this subvi.
Any help in helping me out here would be appreciated.
Thanks
Solved!
Go to Solution.
Attachments:
data extraction help needed.zip 31 KBTry the attached VI. as per my understanding you want to remove the data in the array which is grater than the specified value,am right?
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Attachments:
Remove Data.vi 8 KB -
Extracting data from XMLType field
Sorry, I don't know XMLQuery very well, this is probably a simple question. I'm trying to extract data into a tablular form from an XMLTYPE field. I'll use the following example to illustrate my question:
WITH a as (
select xmltype('
<bugStatus>
<status>
<bugCode>111</bugCode>
<bug number="12345" description="Low severity bug"/>
</status>
<status>
<bugCode>222</bugCode>
<bug number="67890" description="High severity bug"/>
</status>
</bugStatus>
') xmldata from dual)
SELECT x.*
FROM a, xmltable('bugStatus/status'
passing a.xmldata columns
status_code number path 'bugCode'
) x;
Running that code block extracts the "bugCode" fields successfully. But I'd like to also similarly extract the "bug number" and "description" fields. Ideally as independent columns. But even if only as a single line showing "bug number=.... description=....." I could then still parse it with SQL.
Can someone please point me in the right direction of how I can also extract that additional data?
Thanks!Thanks Marco, that was a great and simple solution to my original question.
However let me change the data slightly. I've tried to do something similar with this slightly modified XML data and I think I'm close, but not quite there. Can you assist with this new scenario?
WITH a as (
select xmltype('
<bugStatus>
<bugCode REF_ID="XYZ">
<status>
<bug number="12345" description="Low severity bug"/>
<bug number="67890" description="High severity bug"/>
</status>
</bugCode>
</bugStatus>
') xmldata from dual)
SELECT /*x.bugCode,*/ y.bugNumber, y.bugDescription
FROM a,
xmltable('/bugStatus'
PASSING a.xmldata
COLUMNS
bugCode char(3) path 'bugCode/@REF_ID',
mystatus xmltype path 'bugCode/status'
) x,
xmltable('/status'
PASSING x.mystatus
COLUMNS
--row_number for ordinality,
bugNumber number path 'bug/@number',
bugDescription varchar2(80) path 'bug/@description'
) y;
I think I'm close on this one but still getting the error:
ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence
Thank you! -
How to extract number from array?
I'd like to extract some number from an array.For instance,there is an array {5,0,21,3,1,2,3,71,36},labview is expected to check if there is consecutive number in it.If is,the number before the first of the consecutive number and the one just after the last of the consecutive number are extracted,then they are put into another array. If not,nothing is done.In this array,1,2,3 are consecutive,then the number 3 and 71 will be put into another array.
I thought about it for a long time but nothing came out.I am really at a loss now.Any help will be appreciated.An uploaded vi would be better.Thanks so much!!this may jus help you to get started... pls debug for error possible. You can have better solution.
(and you got to figure out yourself of how it works as I was jus simply wire them up unitl it works )
Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
consecutive_check_example.vi 51 KB -
Problems While Extracting Hours From Date Field
Hi Guys,
Hope you are doing well.
I am facing some problems while extracting hours from date field. Below is an example of my orders table:-
select * from orders;
Order_NO Arrival Time Product Name
1 20-NOV-10 10:10:00 AM Desktop
2 21-NOV-10 17:26:34 PM Laptop
3 22-JAN-11 08:10:00 AM Printer
Earlier there was a requirement that daily how many orders are taking place in the order's table, In that I used to write a query
arrival_time>=trunc((sysdate-1),'DD')
and arrival_time<trunc((sysdate),'DD')
The above query gives me yesterday how many orders have been taken place.
Now I have new requirement to generate a report on every 4 hours how many orders will take place. For an example if current time is 8.00 AM IST then the query should fetch from 4.00 AM till 8 AM how many orders taken place. The report will run next at 12.00 PM IST which will give me order took place from 8.00 AM till 12.00 PM.
The report will run at every 4 hours a day and generate report of orders taken place of last 4 hours. I have a scheduler which will run this query every hours, but how to make the query understand to fetch order details which arrived last 4 hours. I am not able to achieve this using trunc.
Can you please assist me how to make this happen. I have checked "Extract" also but I am not satisfied.
Please help.
Thanks In Advance
Arijityou may try something like
with testdata as (
select sysdate - level/24 t from dual
connect by level <11
select
to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS') s
, to_char(t, 'DD-MM-YYYY HH24:MI:SS') t from testdata
where
t >= trunc(sysdate, 'HH') - numtodsinterval(4, 'HOUR')
S T
19-06-2012 16:08:21 19-06-2012 15:08:21
19-06-2012 16:08:21 19-06-2012 14:08:21
19-06-2012 16:08:21 19-06-2012 13:08:21
19-06-2012 16:08:21 19-06-2012 12:08:21trunc ( ,'HH') truncates the minutes and seconds from the date.
Extract hour works only on timestamps
regards
Edited by: chris227 on 19.06.2012 14:13 -
Monitoring using a Dashboard - How do you extract data from different fields?
I have a situation where a Dashboard needs to be made to monitor the state of different SAP systems.
Within individual Systems I know its easy to monitor the systems using CCMS (rz20), but my question is, How do you get to pull out the data that is displaying on the CCMS screen so that it could be taken and displayed on a dashboard. A dashboard could be a JAVA program that displays data from various such fields and displays maybe on a TV screen.
What I found so far was,
in rz20
Click on Performance Overview.
click on CPU Utilization
So, I place my mouse pointer on Value '2' for User CPU Utilization and hit F1 and then click on Technical Details
Now even if I place my mouse pointer on Value '1'' for User CPU Utilization and hit F1 and then click on Technical Details I get the same screen as above.
So, My question is, How do we determine what data sits in what field?
The aim again is to read these data and populate an external Dashboard.
The current Systems are not connected to SolMan as we do not have a SolMan setup yet. I am just trying to make a Dashboard using the existing CCMS tool.
Any thoughts or suggestions would be greatly appreciated.
Regards,
BevinHello Bevin,
There are other transactions : ST06N/OS07N to check performance data, see note:
#371023 - OS07/ST06: Monitoring operating system data
#1084019 - OS07N: New operating system monitor
All CCMS agents can copy data from the SAPOSCOL shared memory segment to the CCMS monitoring segment and transfer it to a central
monitoring system. This means that the data is visible in the CCMS monitoring architecture and is displayed both in the familiar transactions ST06
and OS07 and in the Alert Monitor (transaction RZ20)
Operating System Collector SAPOSCOL:
http://help.sap.com/saphelp_nw70ehp2/helpdata/en/c4/3a6bff505211d189550000e829fbbd/frameset.htmk
Kind regards,
Tamas Istenes SAP Support Engineer
AGS Primary Support, Global Support Center Hungary -
Hi i am new to labview
I want to extract data from a text file and display it on the front panel.
How do i proceed??
I have attached a file for your brief idea...
Attachments:
extract.jpg 3797 KBRoopeshV wrote:
Hi,
The below code shows how to read from txt file and display in the perticular fields.
Why have you used waveform?
Regards,
Roopesh
There are so many things wrong with this VI, I'm not even sure where to start.
Hard-coding paths that point to your user folder on the block diagram. What if somebody else tries to run it? They'll get an error. What if somebody tries to run this on Windows 7? They'll get an error. What if somebody tries to run this on a Mac or Linux? They'll get an error.
Not using Read From Spreadsheet File.
Use of local variables to populate an array.
Cannot insert values into an empty array.
What if there's a line missing from the text file? Now your data will not line up. Your case structure does handle this.
Also, how does this answer the poster's question?
Maybe you are looking for
-
Can´t sync Nokia N95 after upgrading to leopard
in 10.4 everything worked fine. in 10.5. sync from Nokia to iCal does not work! Thanks to all! Bernhard
-
OS 10.4.10 Update Causing Audio Popping (AND HUM) Issues:
OS 10.4.10 Update Causing Audio Popping (AND HUM) Issues: The problem on my Intel Mac mini with external Klipsch speakers (two mid-range/high and a subwoofer) is REAL obvious as the system emits a hum like a Spinal Tap amplifier turned up to #11 when
-
IP Redundancy on 7200's with CPA's
I have 2 7206's with CPA cards Escon attached to an IBM host. I'm trying to get IP failover to work without using EMIF. If I fail one of the boxes, IP rolls over to the second box. When I power that box back up, IP stops working. If I then do a shutd
-
I am new to Apple. I recently got an Ipod touch and created an apple ID. while I can log into the manage account section, am unable to log into itunes on the computer or the ipod. I have windows 7. Am also not able to log into other apps such as face
-
Import This option is currently not Available?
I just signed up for the standard plan, expecting to use this import feature, only to find that even though it is advertized as part of the plan, it is not yet available????? Okay, bait and switch? :-0 How soon? ETA???