Date array and Sorting
I have a date array that i created from a database. I am trying to sort the dates into the correct order with the upcoming on top.... the best would be that after the date has passed it would go to the bottom of the list. Can anyone tell me if I am on the right path with what I have so far and give me any hints? thanks (the second loop give me an error)
<!--- Declare query array --->
<cfset dateArray = arraynew(1)>
<!--Poppulate Array row by row--->
<cfloop query="CDE_Dates2">
<cfset dateArray[currentRow][1] = event_date>
</cfloop>
<!--- Sort Array Dates --->
<cfloop index="i" from="1" to="#arrayLen(dateArray)#">
<cfset dateVar = DateFormat(dateArray[i],"YYYY/MM/DD")>
</cfloop>
I think I read that as you want dates sored in an order something like this: future dates at the top, sorted in ascending order (most imminent first to farthest future last), then past dates at the bottom in ascending order (oldest first to most recent past last).
The easiest way would be to either do this when you query the database (in your CDE_Dates2) or do a query-of-query on CDE_Dates2. You can do it using a union and adding an extra column for sorting. Here's some SQL pseudo-code:
SELECT dateColumn, otherColumn, anotherColumn, 0 AS sortOverride
FROM someTable
WHERE dateColumn > <cfqueryparam value="#Now()#" cfsqltype="cf_sql_date">
UNION
SELECT dateColumn, otherColumn, anotherColumn, 1 AS sortOverride
FROM someTable
WHERE dateColumn <= <cfqueryparam value="#Now()#" cfsqltype="cf_sql_date">
ORDER BY sortOverride, dateColumn
This will force the future dates to the top and put past dates at the bottom.
You could do the same thing in a QofQ.
-Carl V.
Similar Messages
-
Copy array and sort the numbers in the new array
Hi!
I have an array containing some digits where some of the digits are zeros. I want to copy the digits to another array but the zeros (well, I actually want to copy the zeros as well but I want to have them in the end of the new array).
I suppose I need an if-statement that checks if the old array contains any zeros and in that if-statement copy the content to the new array and put the zeros in the end.
This is my code so far and I don�t know how to go on from here:
int[] new_array = new int[array.length];
for (int i = 0; i < array.length; i++)
if (array[i] > 0)
new_array[i] = array;
new_array = array;
System.out.print(new_array[i] + " ");Roxxor wrote:
I think I know how to do it but only if I can catch the digits bigger than zero.
My code below just checks if there are positive digits and if there are, the whole old array is copied to the new one.Yes. Don't do that, you can see it's wrong.
So my problem is that I don�t know how to catch the digits bigger than zero and copy them. Is there any built in java keyword that catches signs, number etc?
if (array>=0)
new_array[i] = array[i];
new_array = array;
Yes, there is such a keyword. And you are already using it correctly in your code. You are already testing if the array entry is bigger than zero. Your only problem is, you don't know what to do when it is. But now you've been given two hints about what to do. -
DECODE function to validate date value and sort the records
Hi Friends,
I am looking for some query which can give me the required output,
I need to do this using SQL query only and I have tried using the MIN() and MAX() functions it was working fine with limited data, now after inserting the last record(in the below table) which has date for start_range and end_range in(mm/dd/yyyy hh24:mi:ss) format.
Because the data type is VARCHAR2 if I am using the MIN() function it is sorting as a string value, hence the min date is incorrect. I tried using validating the value to date or non date and tried to using MIN() and MAX() functions using the DECODE function, I am getting this error "ORA-01840: input value not long enough for date format".
select table_name,
DECODE(substr(START_RANGE,3,1)||substr(START_RANGE,6,1)||substr(START_RANGE,11,1)||substr(START_RANGE,14,1)||substr(START_RANGE,17,1),'// ::',
to_char(min(to_date(start_range,'mm/dd/yyyy hh24:mi:ss')),'MM/DD/YYYY HH24:MI:SS'),min(start_range)) MIN_RUNS_START_RANGE,
DECODE(substr(END_RANGE,3,1)||substr(A.END_RANGE,6,1)||substr(END_RANGE,11,1)||substr(END_RANGE,14,1)||substr(END_RANGE,17,1),'// ::',
to_char(max(to_date(END_RANGE,'mm/dd/yyyy hh24:mi:ss')),'MM/DD/YYYY HH24:MI:SS'),max(END_RANGE)) MAX_RUNS_END_RANGE
from MY_TABLE
GROUP BY table_name,
(substr(START_RANGE,3,1)||substr(START_RANGE,6,1)||substr(START_RANGE,11,1)||substr(START_RANGE,14,1)||substr(START_RANGE,17,1)),
(substr(END_RANGE,3,1)||substr(END_RANGE,6,1)||substr(END_RANGE,11,1)||substr(END_RANGE,14,1)||substr(END_RANGE,17,1))
Can sombody please advise what is the best way I can query this data with the required output.
The following are the source table and records and the out put records using the sql query.
MY_TABLE
TABLE_NAME(VARCHAR2),START_RANGE(VARCHAR2),END_RANGE(VARCHAR2)
TABLE1,1000,10000
TABLE2,ABCD,EEEE
TABLE3,01/12/2010 00:00:00,12/31/2010 23:59:59
TABLE1,10001,20000
TABLE2,EEEF,GGGG
TABLE3,01/01/2011 00:00:00,01/31/2011 23:59:59
OUTPUT :
TABLE_NAME,MIN(START_RANGE),MAX(END_RANGE)
TABLE1,1000,20000
TABLE2,ABCD,GGGG
TABLE3,01/12/2010 00:00:00,01/31/2011 23:59:59
Thanks
Kalycsi also think this is a very bad table design ...
but if you are not able to change it, you could split the select (date and non-date data) and combine the result with UNION like this:
with t as
SELECT 'TABLE1' table_name,'1000' start_range,'10000' end_range FROM dual UNION
SELECT 'TABLE2','ABCD','EEEE' FROM dual UNION
SELECT 'TABLE3','01/12/2010 00:00:00','12/31/2010 23:59:59' FROM dual UNION
SELECT 'TABLE1','10001','20000' FROM dual UNION
SELECT 'TABLE2','EEEF','GGGG' FROM dual UNION
SELECT 'TABLE3','01/01/2011 00:00:00','01/31/2011 23:59:59' FROM dual
SELECT table_name,
TO_CHAR(MIN(TO_DATE(start_range, 'MM/DD/YYYY HH24:MI:SS')), 'MM/DD/YYYY HH24:MI:SS'),
TO_CHAR(MAX(TO_DATE(end_range, 'MM/DD/YYYY HH24:MI:SS')), 'MM/DD/YYYY HH24:MI:SS')
FROM t
WHERE start_range LIKE '%/%/%:%:%'
GROUP BY table_name
UNION
SELECT table_name,
MIN(start_range),
MAX(end_range)
FROM t
WHERE start_range NOT LIKE '%/%/%:%:%'
GROUP BY
table_name;
TABLE_ MIN_VALUE MAX_VALUE
TABLE1 1000 20000
TABLE2 ABCD GGGG
TABLE3 01/12/2010 00:00:00 01/31/2011 23:59:59 -
Data Grid - issues resizing width of columns and with data refresh and sort
SQLDeveloper 1215 on Windows XP professional
Database : various 9.2
In the table data tab there are a few minor issues our developers have highlighted.
1) There seems to be a minimum column width in the data display. This restricts flexibility in reviewing the data, esp. where the data length is less than the minimum column width.
2) If a column is resized or the column order is changed and a refresh or a new filter is applied then the columns are restored to their original position and size making it frustrating to run more than one query via the GUI.
3) There is no quick sort option by clicking on the column heading which would be useful.I am still seeing this minimum column width in SQL Developer production (v1467) and I haven't seen any other posts relating to this. I have seen this all of the grids that I have looked at, including all of the grid based sub-tabs for the Object tabs (ie Columns, Data, Indexes, Constraints, etc) and the SQL Worksheet results tab.
It is very obvious with the Column Name and Data Type columns of the Table Columns tab - the Column Name column can be shrunk to truncate values but the Data Type column can only be shrunk to about the twice the width of the widest value.
Can anyone in development provide any comments about why we have this minimum width and how the minimum width is actually calculated? -
Hello,
In the attached VI, I would like to extract the first 50 points, then next 50 and so on (from the attached file), and build up an array as shown in the image file.
Any help will be greatly appreciated.
Thanks,
hiNi.
Solved!
Go to Solution.
Attachments:
array_scan.vi 10 KB
1600pts.txt 32 KB
end array.png 41 KBI was hoping to solve this without a loop...
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice -
How would you sort an int array w/out using the sort algorithum given w/ java. Please also show all the steps...i have been trying to figure this one out for about 3 days now...help
Start by showing us the code to your homework assignment that you've completed so far. We can help you debug specific issues. When you post your code, please used the special tokens found at http://forum.java.sun.com/faq.jsp#format to format your code.
-
I need to store a data array and include text that describes what the data is. (using for various configuration files.) Anyway, I would like to be able to save the string as part of the txt file, and somehow read it back, remove the (various length string), and display it in an indicator. All the while, not causing too much problem with the initial data array.
Thanks in advance!!There are several ways to do what you require. A simple method would be to use an ASCII text file. When writing one of those, you just need to basically build a gaint string starting with the description text you want. We like to call that a header. Once you've got the header, make some sort of delimiter like a bunch of "-" or two sets of ( EOL = End of Line = CRLF = \r\n ). After your delimiter, concatenate your array in string form or flatten your array from its native form into a string and tack it on the file (append).
See the (very quick) example attached.
Dan Press
www.primetest.com
Attachments:
fileheader.vi 41 KB -
Write Text Data Array to text file
Greetings all. I hope someone can help me as I am really under the gun. The attached vi shows the basics of what I am trying to do. I have already written a vi that takes the Cal Data Array and prints it out in a nicely formatted report. My problem is that the powers that be also want the data saved to a generic text file that can be copied and printed out anywhere they like. As such, I need to save the data to a generic text file in column format such that it will all fit on one page in landscape mode. There are a total of 12 columns of data. I have been trying to create something that would format each column to a specific length instead of them all being the same. No luck so far. Basically, I need columns 1,2,3,8 and 12 to be length of 5. The rest a length of 9. I have tried to place the formatting part in a for loop with the formatting in a case, but it does not appear to work. I really need this quick so if anyone has any ideas, please help. As always, I really appreciate the assistance.
Thanks,
Frank
Attachments:
Write Cal Data to Text File.vi 21 KBpincpanter's is a good solution. Beat me to it while I was away building an example. Similiar approach using two for loops and case statement. Here is my suggestion anyway....
cheers
David
Message Edited by David Crawford on 11-23-2005 09:37 AM
Attachments:
Write Text Data Array to text file.vi 31 KB -
HashMaps and Sorting issue.
Hey,
I was wondering what the most effective method of doing the following was:
I have some directories which are a collection of <id, reference to either a directory or a file> sets. The file objects contain a hashmap which has some information about the file. I want to sort the directory the file is in, by the values in the hashmap of the file.
Originally I had the directory as a hashmap, with the id the key and the reference to the directory or file the value. The plan was to put the values.getHashMap.values() in an array, and sort it. However, I'm not quite sure this would work. I'm also no longer sure if a hashmap is the most effective way of doing this.
Any ideas? Should I elaborate? Should I get rid of hashmap all together in this case?
Thanks,
-SFirst call the entrySet() method of the Map and you'll get a Set of EntrySet objects. The EntrySet object contains the key and the value, so it's those you want to sort. You can make a List or an array of those EntrySet objects quite easily, and then with a suitable Comparator you can sort that List or array in the right order.
-
Grouping and sorting the data based on the parameter
Hi,
I need to display the total of item Cost i.e sub total based on parameter in Excel format
if value = 1 then (Subtotal by Manufacture) and sorting by Manufacture, Receipt Date, Organization, Item Code
if value = 2 then (Subtotal by Organization ) and sorting by Organization, Item, Serial Number
and at the end of report need to display full total
is it possible in excel output using the below xml , please guide me if i need to change the way of getting XML ouput or can be acheived using this.
Please find the xml , thanks in advance
<?xml version="1.0"?>
<!-- Generated by Oracle Reports version 6.0.8.27.0 -->
<ASWRECDTREP>
<LIST_G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>10</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PARTS</ORGANISATION_NAME>
<SERIAL_NUMBER>90699100802262</SERIAL_NUMBER>
<ITEM_CODE>OM906LA.007</ITEM_CODE>
<DESCRIPTION>MERCEDES SERIES 900 OFF HWY ENGINE 205 KW 0852</DESCRIPTION>
<MANUFACTURER>MER</MANUFACTURER>
<APPLICATION>INDL</APPLICATION>
<ITEM_COST>15009.09</ITEM_COST>
<MATERIAL_COST>685.25</MATERIAL_COST>
<PO_NUMBER>1001395</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>22-MAY-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>EUR</CURRENCY_CODE>
<PO_UNIT_PRICE>7431.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>10</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PARTS</ORGANISATION_NAME>
<SERIAL_NUMBER>90699100802285</SERIAL_NUMBER>
<ITEM_CODE>OM906LA.007</ITEM_CODE>
<DESCRIPTION>MERCEDES SERIES 900 OFF HWY ENGINE 205 KW 0852</DESCRIPTION>
<MANUFACTURER>MER</MANUFACTURER>
<APPLICATION>INDL</APPLICATION>
<ITEM_COST>15009.09</ITEM_COST>
<MATERIAL_COST>685.25</MATERIAL_COST>
<PO_NUMBER>1001395</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>22-MAY-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>EUR</CURRENCY_CODE>
<PO_UNIT_PRICE>7431.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>30</ORGANIZATION_CODE>
<ORGANISATION_NAME>Melbourne</ORGANISATION_NAME>
<SERIAL_NUMBER>6520107896</SERIAL_NUMBER>
<ITEM_CODE>3500.010</ITEM_CODE>
<DESCRIPTION>ALLISON 3000 SERIES ON HWY TRANSMISSION E018179</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>11126.11</ITEM_COST>
<MATERIAL_COST>664.23</MATERIAL_COST>
<PO_NUMBER>971515</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>14-APR-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>8063.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>30</ORGANIZATION_CODE>
<ORGANISATION_NAME>Melbourne</ORGANISATION_NAME>
<SERIAL_NUMBER>6510869062</SERIAL_NUMBER>
<ITEM_CODE>3200.010</ITEM_CODE>
<DESCRIPTION>ALLISON 3000 SERIES ON HWY TRANSMISSION E017944</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>11853.57</ITEM_COST>
<MATERIAL_COST>707.66</MATERIAL_COST>
<PO_NUMBER>982120</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>12-MAY-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>8251.6</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>40</ORGANIZATION_CODE>
<ORGANISATION_NAME>Brisbane</ORGANISATION_NAME>
<SERIAL_NUMBER>D6002 G6003</SERIAL_NUMBER>
<ITEM_CODE>520 SERIES.002</ITEM_CODE>
<DESCRIPTION>KONRAD 520 SERIES MARINE STERN DRIVE</DESCRIPTION>
<MANUFACTURER>OTH</MANUFACTURER>
<APPLICATION>MARI</APPLICATION>
<ITEM_COST>9296.95</ITEM_COST>
<MATERIAL_COST>482.91</MATERIAL_COST>
<PO_NUMBER>1009062</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>24-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>6939.29</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>40</ORGANIZATION_CODE>
<ORGANISATION_NAME>Brisbane</ORGANISATION_NAME>
<SERIAL_NUMBER>ABC123</SERIAL_NUMBER>
<ITEM_CODE>GM20541-KP1.001</ITEM_CODE>
<DESCRIPTION>KOHLER GENSET</DESCRIPTION>
<MANUFACTURER>KOH</MANUFACTURER>
<APPLICATION>PGEN</APPLICATION>
<ITEM_COST>756.83</ITEM_COST>
<MATERIAL_COST>.78</MATERIAL_COST>
<PO_NUMBER>1015156</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>14-OCT-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>AUD</CURRENCY_CODE>
<PO_UNIT_PRICE>20</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>40</ORGANIZATION_CODE>
<ORGANISATION_NAME>Brisbane</ORGANISATION_NAME>
<SERIAL_NUMBER>ABC124</SERIAL_NUMBER>
<ITEM_CODE>GM20541-KP1.001</ITEM_CODE>
<DESCRIPTION>KOHLER GENSET</DESCRIPTION>
<MANUFACTURER>KOH</MANUFACTURER>
<APPLICATION>PGEN</APPLICATION>
<ITEM_COST>756.83</ITEM_COST>
<MATERIAL_COST>.78</MATERIAL_COST>
<PO_NUMBER>1015156</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>14-OCT-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>AUD</CURRENCY_CODE>
<PO_UNIT_PRICE>20</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>06R1017763</SERIAL_NUMBER>
<ITEM_CODE>6062HK30.005</ITEM_CODE>
<DESCRIPTION>DETROIT SERIES 60 MARINE ENGINE 615 KW 2949322</DESCRIPTION>
<MANUFACTURER>MDD</MANUFACTURER>
<APPLICATION>MARI</APPLICATION>
<ITEM_COST>99125.34</ITEM_COST>
<MATERIAL_COST>2028.31</MATERIAL_COST>
<PO_NUMBER>883339</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>05-MAR-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>63768</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310935001</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1000221</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>01-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310935002</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1000221</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>01-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310935003</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1000221</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>01-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6510876301</SERIAL_NUMBER>
<ITEM_CODE>T350R.004</ITEM_CODE>
<DESCRIPTION>ALLISON TORQMATIC ON HWY TRANSMISSION</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>9465.69</ITEM_COST>
<MATERIAL_COST>597.33</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>6936.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6510876302</SERIAL_NUMBER>
<ITEM_CODE>T350R.004</ITEM_CODE>
<DESCRIPTION>ALLISON TORQMATIC ON HWY TRANSMISSION</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>9465.69</ITEM_COST>
<MATERIAL_COST>597.33</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>6936.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6510876303</SERIAL_NUMBER>
<ITEM_CODE>T375R.002</ITEM_CODE>
<DESCRIPTION>ALLISON TORQMATIC ON HWY TRANSMISSION</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>10224.19</ITEM_COST>
<MATERIAL_COST>645.19</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>7433.3</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940354</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940355</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940356</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>6310940357</SERIAL_NUMBER>
<ITEM_CODE>2500.003</ITEM_CODE>
<DESCRIPTION>ALLISON 2000 SERIES ON HWY TRANSMISSION E016189</DESCRIPTION>
<MANUFACTURER>ATD</MANUFACTURER>
<APPLICATION>ONHY</APPLICATION>
<ITEM_COST>4855.33</ITEM_COST>
<MATERIAL_COST>306.39</MATERIAL_COST>
<PO_NUMBER>1005777</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>23-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>3574.9</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
<G_ASW_REC_DATE>
<ORGANIZATION_CODE>70</ORGANIZATION_CODE>
<ORGANISATION_NAME>NDC - PRODUCT</ORGANISATION_NAME>
<SERIAL_NUMBER>5272003543</SERIAL_NUMBER>
<ITEM_CODE>T1637K33.002</ITEM_CODE>
<DESCRIPTION>DETROIT SERIES 4000 INDUSTRIAL ENGINE 1865 KW 2456291</DESCRIPTION>
<MANUFACTURER>MDD</MANUFACTURER>
<APPLICATION>MNIG</APPLICATION>
<ITEM_COST>420083.16</ITEM_COST>
<MATERIAL_COST>3785.85</MATERIAL_COST>
<PO_NUMBER>921170</PO_NUMBER>
<TRANSACTION_RECEIPT_DATE>30-JUN-09</TRANSACTION_RECEIPT_DATE>
<VENDOR_LOT_NUM></VENDOR_LOT_NUM>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<PO_UNIT_PRICE>301549</PO_UNIT_PRICE>
</G_ASW_REC_DATE>
</LIST_G_ASW_REC_DATE>
</ASWRECDTREP>
Best Regards,
MahiHi Vetri,
I tried to implement the solution you have given and i am getting error,
I tried to see the output by loading the xml to the template given in BIP Blog in the following Link,
http://blogs.oracle.com/xmlpublisher/2007/05/left_up_down_right_group.html
I am getting the same error,Please help me how to overcome this.If possible send me the template that was working for you.
The error log is as follows:
ConfFile: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config\xdoconfig.xml
Font Dir: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
Run XDO Start
Template: C:\Users\MAHESH\Desktop\Grouping.rtf
RTFProcessor setLocale: en-us
FOProcessor setData: C:\Users\MAHESH\Desktop\EmployeeListing.xml
FOProcessor setLocale: en-us
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at RTF2PDF.runRTFto(RTF2PDF.java:629)
at RTF2PDF.runXDO(RTF2PDF.java:439)
at RTF2PDF.main(RTF2PDF.java:289)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at oracle.xdo.parser.v2.XSLTContext.peekExprValue4Grouping(XSLTContext.java:871)
at oracle.xdo.parser.v2.XPathFunctionCall.evaluate(XPathFunctionCall.java:536)
at oracle.xdo.parser.v2.XPathFunctionCall.evaluate(XPathFunctionCall.java:583)
at oracle.xdo.parser.v2.XSLVariable.getValue(XSLVariable.java:205)
at oracle.xdo.parser.v2.XSLVariable.processAction(XSLVariable.java:117)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:512)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
... 15 more
Best Regards,
Mahi -
I have downloaded and installed the latest version of numbers on my mac. Everytime I save and then try to reopen that document, I receive a message telling me that I need a new version of numbers. Also, when I try to sort the date column, it sorts out of order. The last version sorted fine.
Welcome to Apple Support Communities
When you install the new iWork version, the old iWork version is kept, so it looks like you are opening your old version.
To fix this, open a Finder window, choose Applications in the sidebar and drag the new Numbers version to the Dock, so you can access to it quickly. Open all documents from this version. I don't recommend you to delete the old Numbers version in case you need it.
Respecting to the second question, you will get better answers in the Numbers for OS X forum -
How to save data in a 4D array and make partial plots in real time?
Hi, this is a little complex, so bear with me...
I have a test system that tests a number of parts at the same time. The
experiment I do consists of measuring a number of properties of the
parts at various temperatures and voltages. I want to save all the
measured data in a 4-dimensional array. The indices represent,
respectively, temperature, voltage, part, property.
The way the experiment is done, I first do a loop in temperature, then
in voltage, then switch the part. At this point, I measure all the
properties for that condition and part and want to add them as a 1D
array to the 4D array.
At the same time, I want to make a multiple plot (on an XY graph) of
one selected property and part (using two pull-down selectors near the
XY graph) vs. voltage. (The reason I need to use an XY graph and not a
waveform graph, which would be easier, is that I do not have
equidistant steps in voltage, although all the voltage values I step
through are the same for all cases). The multiple plots are the data
sets at different temperatures. I would like to draw connection lines
between the points as a guide to the eye.
I also want the plot to be updated in the innermost for loop in real
time as the data are measured. I have a VI working using nested loops
as described above and passing the 4D array through shift registers,
starting with an array of the right dimensions initialized by zeroes. I
know in advance how many times all the loops have to be executed, and I
use the ReplaceArraySubset function to add the measured properties each
time. I then use IndexArray with the part and property index terminals
wired to extract the 2D array containing the data I want to plot. After
some transformation to combine these data with an array of the voltage
values in the form required to pass to the XYGraph control, I get my
plot.
The problem is: During program execution, when only partial data is
available, all the zero elements in the array do not allow the graph to
autoscale properly, and the lines between the points make little sense
when they jump to zero.
Here is how I think the problem could be solved:
1. Start with an empty array and have the array grow gradually as the
elements are measured. I tried to implement this using Insert Into
Array. Unfortunately, this VI is not as flexible as the Replace Array
Subset, and does not allow me to add a 1D array to a 4D array. One
other option would be to use the Build Array, but I could not figure
out if this is usable in this case.
2. The second option would be to extract only the already measured data
points from the 4D array and pass them to the graph
3. Keep track of the min. and max. values (only when they are different
from zero) and manually reset the graph Y axis scale each time.
Option 3 is doable, but more work for me.....
Option 2: I first tried to use Array Subset, but this always returns an
array of the same dimensionality of the input array. It seems to be
very difficult, but maybe not impossible, to make this work by using
Index Array first followed by Array Subset. Option 3 seems easier.
Ideally, I would like option 1, but I cannot figure out how to achieve
this.
Your help is appreciated, thanks in advance!
germ Remove "nospam" to replyIn article <[email protected]>,
chutla wrote:
> Greetings!
>
> You can use any of the 3D display vi's to show your "main" 3d
> data, and then use color to represent your fourth dimension. This can
> be accessed via the property node. You will have to set thresholds
> for each color you use, which is quite simple using the comparison
> functions. As far as the data is concerned, the fourth dimension will
> be just another vector (column) in your data file.
chutla, thanks for your post, but I don't want a 3D display of the
data....
> Also, check out
> the BUFFER examples for how to separate out "running" data in real
> time.
Not clear to me what you mean, but will c
heck the BUFFER examples.
> As far as autoscaling is concerned, you might have to disable
> it, or alternatively, you could force a couple of "dummy" points into
> your data which represent the absolute min/max you should encounter.
> Autoscaling should generally be regarded as a default mode, just to
> get things rolling, it should not be relied on too heavily for serious
> data acquisition. It's better to use well-conditioned data, or some
> other means, such as a logarithmic scale, to allow access to all your
> possible data points.
I love autoscaling, that's the way it should be.
germ Remove "nospam" to reply -
Data from a file to an array and opposite
Aloha! Hope you can help me on this one!
I need to read from a text (sequencial) file into an array, work on it and then save it to the origin file. How do I do this? I can only get examples of string->file file->string
Thanx in advance! :))Hum...what I need to do is take one file and read some of it's lines into the first position of the array; and so on for the next positions. Here are the first 2 sets of lines of the file:
They represent students, wich I need to load into a CardType type array:
11
Albert Einstein
100
2
B
234
120
45
2002 11 18 //date
8 0 0 //time
2002 11 15 //date
16 20 0 //time
Stephen Jay Gould
235
3
A
512
100
50
2002 11 18 //date
8 20 0 //time
2002 11 18 //date
12 30 0 //time -
How to Sort JTable data using Multiple fields (Date, time and string)
I have to fill the JTable data with some date, time and string values. for example my table data looks like this:
"1998/12/14","15:14:38","Unicorn1","row1"
"1998/12/14","15:14:39","Unicorn2","row2"
"1998/12/14","15:14:40","Unicorn4","row3"
"1998/12/17","12:14:12","Unicorn4","row6"
Now the Sorted Table should be in the following way:
"1998/12/17","12:14:12","Unicorn4","row6"
"1998/12/14","15:14:40","Unicorn4","row3"
"1998/12/14","15:14:39","Unicorn2","row2"
"1998/12/14","15:14:38","Unicorn1","row1"
ie First Date field should be sorted, if 2 date fields are same then sort based on time. if date and time fields are same then need to be sorted on String field.
So if any one worked on this please throw some light on how to proceed. I know how to sort based on single column.
But now i need to sort on multiple columns.So what is code change in the Comparater class.
Thanks in advance.. This is urgent....I think your Schedule objects should implement Comparable. Then you can sort your linked list using the Collections.sort() method without passing in a Comparator.class Schedule(Date date, String class) implements Comparable
public void compareTo(Object obj)
Schedule other = (Schedule)obj;
return date.getTime() - other.getDate().getTime();
} -
Created date for JPGs used in FCE - how to view and sort by
In FCE I need to view and sort by the date created not date modified on JPG images. How do I do that?
Why would the developers prevent users from using information about when they TOOK the pictures rather than when they edited them? Seems like a real deficiency in the program to me.
I make movies using 100s of images from a variety of photographers and put them in chronological order. Having to go to Finder on every one is impractical.
Maybe you are looking for
-
Installing windows 7 on Lenovo G500 without losing preinstalled windows 8
I want to keep the preinstalled version of windows 8 and install windows 7 too but after a few hours of research the only sugestion in every method is choosing one of the versions. Is there any way I can keep both?
-
Hi, How do we set the background color of a column in a report? I have four columns in the table and I want to display the data of each column with different color. Can you help? regards VJ
-
STSUPLD.DLL not recognizing as an add-on; upload multiple documents disabled
On my client system, Windows XP, Office 2007 and IE8 is installed. It is a 32 bit system. On the Sharepoint site, "upload multiple document" feature is disabled. After searching for the cause, I came to know about the STSUPLD add-on that needs to be
-
Hello All, Please suggest, Is there any way to check, who change the Email ID for the user, i already checked the changed Document for the user, but the history is only showing the password locked, validity date changed. etc In SU3 this
-
Reimbursement type not displaying on India Claims Application
Dear Experts, We are implementing SAP EHP5 for India and want to use Claims application on ESS. After doing all the configurtation still we are not able to see Reimbursement Types on ESS. Please let me know the possible reason for the same. Thanks &