Help query SQL Date!
I'm trying to show the amount of time spent for each TVMREF for the week of October 3, 10 '-October 9, 10'. However, when the value of start_time begins before October 3, 10 ', or the end_time stops after October 9, 10 ', in other words, start_time and end_time span the specified week, the results don't return any time at all. I need to show the elapsed time for each TVMREF for the week in question. How to accomplish this seemingly impossible task?Example table:
TVMREF ASSEMBLY START_DATE END_DATE
700 0 30 - SEPT. - 10 30 - SEPT - 10
700 0 30 - 7.-10 9 OCTOBER 10
636 0 7 OCTOBER 10 OCTOBER 8, 10
636 0 3 OCTOBER 10 OCTOBER 4, 10
636 0 6 OCTOBER 10 OCTOBER 6, 10
636 0 4 OCTOBER 10 OCTOBER 4, 10
636 0 1 OCTOBER 10 1 OCTOBER 10
635 0 3 OCTOBER 10 OCTOBER 3, 10
635 0 OCTOBER 1, 10 2 OCTOBER 10
635 0 1 OCTOBER 10 1 OCTOBER 10
635 0 30 - 7.-10 1ER OCTOBER 10
635 0 6 OCTOBER 10 OCTOBER 6, 10
635 0 3 OCTOBER 10 OCTOBER 4, 10
My query:
with a (too)
Select a.tvmref,
trunc (86400 *(a.end_time-a.start_time)) seconds
of reports.tvmdowntimes one
where a.assembly = 0
and a.start_time between October 3, 10 'and 9 October 10'
and a.tvmref < = "800"
order by 1)
Select
a.tvmref
round (sum(seconds/60/60), 2) as hours
a
A.tvmref group
order by 2 desc
Not exactly what you need, but it looks like:
with tvmdowntimes as (
select 700 tvmref,0 assembly,to_date('30-SEP-10','dd-mon-yy') start_time,to_date('30-SEP-10','dd-mon-yy') end_time from dual union all
select 700,0,to_date('30-SEP-10','dd-mon-yy'),to_date('09-OCT-10','dd-mon-yy') from dual union all
select 636,0,to_date('07-OCT-10','dd-mon-yy'),to_date('08-OCT-10','dd-mon-yy') from dual union all
select 636,0,to_date('03-OCT-10','dd-mon-yy'),to_date('04-OCT-10','dd-mon-yy') from dual union all
select 636,0,to_date('06-OCT-10','dd-mon-yy'),to_date('06-OCT-10','dd-mon-yy') from dual union all
select 636,0,to_date('04-OCT-10','dd-mon-yy'),to_date('04-OCT-10','dd-mon-yy') from dual union all
select 636,0,to_date('01-OCT-10','dd-mon-yy'),to_date('01-OCT-10','dd-mon-yy') from dual union all
select 635,0,to_date('03-OCT-10','dd-mon-yy'),to_date('03-OCT-10','dd-mon-yy') from dual union all
select 635,0,to_date('01-OCT-10','dd-mon-yy'),to_date('02-OCT-10','dd-mon-yy') from dual union all
select 635,0,to_date('01-OCT-10','dd-mon-yy'),to_date('01-OCT-10','dd-mon-yy') from dual union all
select 635,0,to_date('30-SEP-10','dd-mon-yy'),to_date('01-OCT-10','dd-mon-yy') from dual union all
select 635,0,to_date('06-OCT-10','dd-mon-yy'),to_date('06-OCT-10','dd-mon-yy') from dual union all
select 635,0,to_date('03-OCT-10','dd-mon-yy'),to_date('04-OCT-10','dd-mon-yy') from dual
)
select a.tvmref,
sum(
case
when a.start_time >= DATE'2010-10-03' and a.start_time < DATE'2010-10-10'
then 86400*(a.end_time-a.start_time)
end
) seconds
from tvmdowntimes a
where a.assembly = 0
and a.tvmref <= '800'
group by a.tvmref
order by 2 desc
/
TVMREF SECONDS
---------- ----------
700
636 172800
635 86400
SQL>
SY.
Tags: Database
Similar Questions
-
SELECT FIRST_NAME, SALARIES OF EMPLOYEES
NOT THOUSANDS IN *.
3600 *.
2900 *.
2500 *.
4000 *.
3200 *.
SAL should come in the stars.
Please guide me on how to solve this problem.Ref:
Replacement of number of asterisk
annual salaries with asterisks -
Need help with query SQL Inline views + Group
Hello gurus,
I would really appreciate your time and effort on this application. I have the following data set.
Reference_No---Check_Number---Check_Date---description---Invoice_Number---Invoice_Type---Paid_Amount---Vendor_Number
1234567 11223 - 05/07/2008 -paid for cleaning- 44345563-I-* 20.00 *---19
1234567 11223 - 05/07/2008 - 44345563 -a--10,00---19 ofbad quality adjustment
7654321 11223 - 05/07/2008 - setting the last billing cycle - 23543556 - A - 50.00 - 19
4653456 11223 - 05/07/2008 - paid for cleaning - 35654765 - I - 30, 00-19
Please ignore '-' added for clarity
I'm writing a paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, aggregate query Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Type, Invoice_Number, Vendor_Number. When there are no more records I want to display the respective Description.
The query should return the following data set
Reference_No---Check_Number---Check_Date---description---Invoice_Number---Invoice_Type---Paid_Amount---Vendor_Number
1234567 11223 - 05/07/2008 -paid for cleaning- 44345563-I-* 10.00 *---19
7654321 11223 - 05/07/2008 - setting the last billing cycle - 23543556 - A - 50.00 - 19
4653456 11223 - 05/07/2008 - paid for cleaning - 35654765 - I - 30, 00-19
Here's my query. I'm a little lost.
Select b., A.sequence_id, A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
de)
Select sequence_id, check_number, check_date, invoice_number, sum (paid_amount) sum, vendor_number
of the INVOICE
Sequence_id group check_date, check_number, invoice_number, vendor_number
) A, B OF INVOICE
where A.sequence_id = B.sequence_id
Thank you
NickIt seems that this is a duplicate thread - correct me if I am wrong in this case->
Need help with query SQL Inline views + Group
Kind regards.
LOULOU.
-
Please, help me to query SQL Construct.
Hi Experts,Could you please help me to query SQL Construct. Please find the details
HOSTNAME HOSTTYPE DEM R1 R2
RS123 P ABC 24.5 265,5RS123 P CYC 24.5 265,5
RS123 P ADDS 24.5 265,5
RS123 P ADE 24.5 265,5
RS123 P SRC 24.5 265,5
EXPECTED RESULTS
HOSTNAME HOSTTYPE MNE R1 R2
RS123 P ABC, CYC, ADD, ADE, CBC 24.5 265,5Concerning
See you soon
with t as)
Select "RS123' hostname 'P' hosttype, 'ABC' dem, 24.5 r1, r2 265,5 Union double all the
Select 'RS123', 'P', "CYC", 24.5, 265,5 double Union all
Select 'RS123', 'P', 'ADD', 24.5, 265,5 double Union all
Select "RS123', 'P', 'ADE', 24.5, 265,5 double Union all
Select 'RS123', 'P', 'SRC', 24.5, 265,5 double
)
Select the host name,
HostType,
RTrim (XMLAGG (XmlElement(e,MNE,','). (Extract ('//Text ()')), ',') DEM,.
R1,
R2
t
Group hostname,
HostType,
R1,
R2
/
HOSTN H DEM R1 R2
----- - -------------------- ---------- ----------
RS123 P ABC, CBC, ADE, ADD, CYC 24.5 265,5SQL >
SY.
-
query sql delicate... date of the created object.
friends...
I am trying to solve this query sql delicate for some time, but unable to progress when it comes to this day...
Q.
Query dba_objects and list all tables created yesterday ' sysdate - 1' and in another column of the list all the tables created ' sysdate - 7'.
-query below gives me to yesterday, but don't know how to have 'Last_week' column filled... maybe I join?
appreciate your time and effort in looking at this...select owner, object_name, to_char(created, 'MM-DD-YYYY HH24:MI:SS') "Yesterday", to_char(created, 'MM-DD-YYYY HH24:MI:SS') "Last_Week" from dba_objects where object_type = 'TABLE' and created >=trunc(sysdate - 1) and created < trunc(sysdate)
Thank you
Published by: khallas301 on March 19, 2013 09:27
typo edited... Thanks to frankkhallas301 wrote:
Query dba_objects and list all tables created yesterday ' sysdate - 1' and in another column of the list all the tables created ' sysdate - 7'.Well, sysdate - 7 ways months ago, not last week. If this is what you want, then:
select owner, object_name, case when trunc(created) = trunc(sysdate - 1) then to_char(created,'MM-DD-YYYY HH24:MI:SS') end "Yesterday", case when trunc(created) = trunc(sysdate - 7) then to_char(created, 'MM-DD-YYYY HH24:MI:SS') end "Week Ago" from dba_objects where object_type = 'TABLE' and ( trunc(created) = trunc(sysdate - 1) or trunc(created) = trunc(sysdate - 7) ) /
SY.
-
Under Update taking 2 h complete 3000 sets.
UPDATE ARR_TRANSACTIONS ARR
SET = NUMBER99
(SELECT ARR_1.NUMBER99
OF ARR_TRANSACTIONS ARR_1, ARR_HEADER BH
WHERE ARR_1.ARR_ID = BH. ARR_ID
AND BH. FLAG = "Y".
AND ARR_1.LINE_ID = ARR. ORIG_INV_LINE_ID
AND ARR_1.NUMBER9 IS NOT NULL
AND ROWNUM = 1)
WHERE ARR BATCH_ID = 26219
AND ARR. NUMBER99 IS NULL
I added more some condition where to reduce cost and its working fine. But I need to rise more than performance on SQL.
Please help with SQL.
I do not see the number of 3000 lines in the plan - so I guess that the optimizer does not compute with the correct numbers. Could generate the plan with dbms_xplan.display_cursor? This could tell us something about filter predicates and access.
In the given situation, I would check:
- is the access to the index in step 1 (filtered by the relevant conditions: this could be BATCH_ID = 26219) return actually 248 entries (or something similar)?
- Access table in step 2 returning 204 lines (or something similar) after applying the filters given? If the number of lines is much bigger then a Nested Loops is perhaps not a good idea.
To make this much simpler check, you could create a plan with statistics of content (RowSource) given that the plan containing the real and the number of estimated rows.
If the estimated cardinalities are not plausible the next question would be if the statistics are strong and up to date.
-
How to query the data of Contact with multiple fields
How can I query the data of Contact with multiple fields?
For example, I'll get contacts which are changed after a point at the specified time and whose country is US. How could I make the chain of research of the SOAP API "Query"?
And I also want to know how to make a search term for RESTful API for contacts above.
Any suggestions?
Thank you.
Hi Biao,
The following document describes how query for multiple fields using the SOAP API: request a Contact from several fields.
And you can search multiple fields using the REST API with the & operator. For example, to search for a Contact by e-mail address and date of creation:
- " emailAddress ='[email protected]' & converted > = '1369828886'".
Hope this helps and please let us know if you need more information.
Thank you
Fred
-
The maximum size of the model in SQL Data Modeler?
Hello
The number of objects is the maximum value that can be used in a model in SQL data maker. I reverse engineered a scheme (see previous posts - thank you to all that helped) which contains 1000 + tables (a candidate for remanufacturing if ever I saw a!) but the Data Modeler is struggling to display them and performs very slowly. I can pull the same schema in the Oracle Designer and that works well, as ERwin-t - y at - it something I can do to improve the performance of the Data Modeler?
Or people would recommend cutting the model into smaller pieces, which will be a little difficult because it's a bit of a rat's nest.
John
Hi John,.
You can try to fix the memory usage - Re: problem of memory with large model
And you may have better performance if divide you large diagram in subviews.
Philippe
-
Create a simple query (SQL)
Hi experts,
I have a table with data as follows:
Database version: 10.2.0.4
Table name: TRANSACTION_HIST_TAB
and I want to create a single query (SQL) which can get data grouped by LOT_NO and only the first transaction by LOT_NOTRANS_ID LOT_NO PART_NO QTY TRANSACTION LOCATION_NO ROWVERSION --------- ------- -------- ---- ----------------- ------------ ---------------------- T00000X1 L001 ABC 10 CHANGE LOCATION WRH_1 01/01/13 08:00:00 AM T00000X2 L001 ABC 10 CHANGE LOCATION WRH_2 01/02/13 10:00:00 AM T00000X3 L002 XYZ 20 CHANGE LOCATION WRH_3 01/03/13 11:00:00 AM
Expected results:
Someone has an idea?TRANS_ID LOT_NO PART_NO QTY TRANSACTION LOCATION_NO ROWVERSION --------- ------- -------- ---- ----------------- ------------ ---------------------- T00000X1 L001 ABC 10 CHANGE LOCATION WRH_1 01/01/13 08:00:00 AM T00000X3 L002 XYZ 20 CHANGE LOCATION WRH_3 01/03/13 11:00:00 AM
Kind regards
RobHi, Rob.
Here's one way:
WITH got_r_num AS ( SELECT t.* -- or list columns you want , ROW_NUMBER () OVER ( PARTITION BY lot_no ORDER BY rowversion ) AS r_num FROM transaction_hist_tab t ) SELECT * -- or list all columns except r_num FROM got_r_num WHERE r_num = 1 ;
Depending on your data and your needs, match Sub like Manik suggested, might work. I think that you want to GROUP BY lot_no only, no transid.
I hope that answers your question.
If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
Explain, using specific examples, how you get these results from these data.
Always say what version of Oracle you are using (for example, 11.2.0.2.0).
See the FAQ forum {message identifier: = 9360002} -
Problem with the two EA DEVELOPER SQL DATA MODELING 3.0.0.665 and 3.1
I created a model of very large data using SQL Developer data 3.0.0.665 and 3.1 EA maker. Its having a lot of check constraints. Whenever I am the design of the fence and the DOF and reopening export to import the DDL file failure to import completely check constraints. It is important to check constraints, but without any range of values inside. Its very frustrating because whenever you open import ddl, you must manually add again all the details of data check range constraint.
OS: Windows XP.
Check in the two EA Developer SQL Data Modeler 3.0.0.665 and 3.1
-------------------------------------------
Here are the contents of the .dmd file.
-------------------------------------------
* <? XML version = "1.0" encoding = "UTF - 8"? > *.
* < OSDM_Design class = "oracle.dbtools.crest.model.design.Design" name = 'Admin_Panel' id = "9BE18B0A-6C67-2E5B-00DE-BD8312189ECB" version = "3.41" > * "
* < createdBy > administrator < / createdBy > *.
* < Createduserid > 2011-10-17 08:32:18 UTC < / Createduserid > *.
* < Admin_Panel ownerDesignName > < / ownerDesignName > *.
* < false capitalNames > < / capitalNames > *.
* < designId > 9BE18B0A-6C67-2E5B-00DE-BD8312189ECB < / designId > *.
* < / OSDM_Design > *.
-------------------------------------------------------------------------------
An example how the check constraints to get dirty.
-------------------------------------------------------------------------------
Initial check constraint is as below:
======================
ALTER TABLE test_table
ADD CONSTRAINT Active_Flag_ck
CHECK (Active_Flag IN ('A', 'I'))
*;*
Below how it occurs once I have imported the ddl and re-export:
============================================
ALTER TABLE test_table
ADD CONSTRAINT Active_Flag_ck
(CHECK)
*;*
I'm in trouble as I already in the middle of the my development using SQL Developer Data Modeler.
Please help me soon.
JeanHi John,.
Every time I'm fence design and export the ddl and reopening through the import of the DDL file
Why are you doing this? Once the DDL file is imported and then save the drawing and open simply saved design, no need to generate the DDL and import it every time that you start Modeler data.
On the list of values - forced as this CHECK (Active_Flag IN ('A', 'I')) are imported as constraint check plain and not as a list of values.
There are the more specific elements import of check constraint - they are defined as type database constraint that you select during the import. Accordingly if you import your DOF as Oracle 10 g DDL, then you will get forced correct check in DDL generated for Oracle 10 g and Oracle 11 g. Constraint of evil will be generated for Oracle 9i. You can move the constraint for Oracle 9i (in the check constraint dialog box) or generic if it can be treated as such constraint.I logged for DOF bad bug.
Philippe
-
Query SQL Report with condition (multiple settings) at the point of the apex?
Hi all
I have a small problem and cannot find a solution.
I need to create reports based on a query, SQL or I.R. Nothing hard here.
I need to add the WHERE clause dynamically with javascript to an element of the Apex.
Even once is not very difficult. I set the agenda of the Summit, put my query like this "SELECT * FROM MYTAB WHERE COL1 =: P1_SEARCH" then I call the page by setting the P1_SEARCH value. For example, COL1 is rowid. It works very well.
But here's my problem. Consider that P1_SEARCH contains several ROWID, and I don't know the number of these values,
(no I don't create a large number of items and create a query with so much GOLD!), I would sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (: P1_SEARCH) with something like: ROWID1, ROWID2 in P1_SEARCH."
I also tried: 'ROWID1, ROWID2' and 'ROWID1', 'ROWID2 '.
but I can't get anything else than the mistake of filter. It works with a value, but as soon as there are two values or more, it seems that the Apex is unable to read the string.
How can I do it please?
Thanks for your help.
Maxmnoscars wrote:
But here's my problem. Consider that P1_SEARCH contains several ROWID, and I don't know the number of these values,
(no I don't create a large number of items and create a query with so much GOLD!), I would sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (: P1_SEARCH) with something like: ROWID1, ROWID2 in P1_SEARCH."I also tried: 'ROWID1, ROWID2' and 'ROWID1', 'ROWID2 '.
but I can't get anything else than the mistake of filter. It works with a value, but as soon as there are two values or more, it seems that the Apex is unable to read the string.For a standard report, see + {message identifier: = 9609120} +.
For an IR - and improve safety by avoiding the risk of SQL Injection, use a collection containing the values in a column instead of a CSV list:
{code}
SELECT * FROM MYTAB WHERE ROWID IN (SELECT c001 FROM apex_collections WHERE collection_name = "P1_SEARCH")
{code}
(Please close duplicate threads spawned by your original question.) -
I have a date component. MinValue named Id2 and the following code is to run a class cast exception indicating that the string value cannot be cast to a date sql
java.sql.Date dateNeeded = (java.sql.Date) this.getId2 () .getValue ();
can someone help me to overcome this problem.
Thanks and greetings
Janak
Published by: new_to_ORACLE on February 18, 2011 16:56
Published by: new_to_ORACLE on February 18, 2011 16:58the Date attribute is of type object oracle.jbo.domain.Date
so, first try to cast to oracle.jbo.domain.Date. then to java.sql.Date objectIf you need to cast to another Date object, see this site:
http://www.ecotronics.ch/webdesign/javadate.htmPublished by: M.Jabr on February 19, 2011 11:53
-
Validation of a region defined as a QUERY SQL type (updated report)
Hello
I am trying to perform validation on a region defined as type of QUERY SQL (editable report). The report has two columns.
One of the columns is a Select list and I want to make sure that the user can select the same value twice
in the report. For example, if the selection list has 5 values A, B, C, D, E, I don't want a user to be able to select
B twice in the report. Will it use javascript to perform validation? If Yes, could someone provide some guidance on
where to embed the javascript? Are there other alternatives than javascript? I create an element that came from a sql query
counts the number of lines where the value of the column is the same. I then used the item in my validation logic. The problem with this logic
is that a user can enter the same value and it is not until the 3rd attempt to select the same value that the validation works using the number of lines which is why I think that I need to somehow capture the value of the selection list when a user selects and then compare it to what is already in the database column Select.
I hope that my question and explanations are clear.
Thanks in advance for your help,
MichaelHello
This can be managed using javascript or a validation of the page. Here is an example of use of javascript: [http://htmldb.oracle.com/pls/otn/f?p=267:7]
To do this, I have:
1 - a model of button which does not send the page but just runs javascript. The model will depend on your theme, but should include:
<a href="#BUTTON_ATTRIBUTES#">#LABEL#</a>
If #BUTTON_ATTRIBUTES # appears on the template, delete it as we need it only once. You must create a new button model based on a copy of your existing across models, shared components. Normally, he would show href = "" #LINK # "-we do not want that this would become doSubmit('buttonname')." If your model does not use tags for buttons, you might need to create one from scratch.
2 - I have updated the button on my page to use this template and then assign the setting button attributes:
javascript:check();
3. in the header of the HTML page, I added:
<script type="text/javascript"> function check() { var e = 0; var f = document.getElementsByName("f02"); var k1; var k2; var v1; var v2; if (f) { for (k1 = 0; k1 < (f.length - 1); k1++) { v1 = f[k1].value; for (k2 = (k1 + 1); k2 < f.length; k2++) { v2 = f[k2].value; if (v1 == v2) { e = 1; } } } } if (e > 0) { alert("Duplicates found!"); } else { doSubmit("SUBMIT"); } } </script>
In this example, SUBMIT is the name of the button and "f02" is the name attribute of the select list items that we want to check - change these needs by your page.
Now, when the Submit button is clicked, instead of directly submit the page, the javascript function is called. This function loops through each selection list and gets its value. Then, he compared it to the remaining items. If there is a match, the e flag is set to 1. After all the items have been verified, if e is not 0, then a message appears. Otherwise, the page is sent.
Andy
-
Help to extract data Clob to a column in a table that has several lines in a table
Help to extract data Clob to a column in a table that has several lines in a table
It works for only the first line
CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';
Grant read, write on DIRECTORY XMLDIR to the public;
() dbms_xslprocessor.clob2file
beef in CLOB,
XMLDIR IN VARCHAR2,
"testfile2.txt" IN VARCHAR2);
DECLARE
buf CLOB.
BEGIN
SELECT H15_DOC
IN buf
OF H15TEST. H15_STAGE
where rownum = 1;
dbms_xslprocessor.clob2file (buf, 'XMLDIR', 'testfile2.txt');
END;
/
-This error code
CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';
Grant read, write on DIRECTORY XMLDIR to the public;
() dbms_xslprocessor.clob2file
XData in CLOB,
XMLDIR IN VARCHAR2,
"testfile2.txt" IN VARCHAR2,
CSID in NUMBER: = 0);
DECLARE
CURSOR xmlmycur IS SELECT H15_DOC
OF H15TEST. H15_STAGE
where rownum = 102140;
l_clob CLOB.
XData CLOB.
BEGIN
DBMS_LOB.CREATETEMPORARY (l_clob, true);
DBMS_LOB.CREATETEMPORARY (xdata, true);
OPEN xmlmycur.
LOOP
SEEK xmlmycur INTO xdata;
dbms_xslprocessor.clob2file (xdata, 'XMLDIR', 'testfile2.txt');
EXIT WHEN xmlmycur % notfound;
END LOOP;
CLOSE Xmlmycur;
END;
/
ORA-21560: 3 argument is null, invalid or out of range
ORA-06512: at "SYS." DBMS_LOB", line 991
ORA-06512: at "XDB". DBMS_XSLPROCESSOR', line 324
ORA-06512: at line 15 level
FYI, it seems that the file being created will exceed 5 gig
Yes, it is a known issue with DBMS_XSLPROCESSOR.clob2file with big files.
Here is a slightly modified version of the code that I posted earlier, fixing WRITE_ERROR except:
DECLARE
v_file utl_file.file_type;
-write a unique to clob
procedure write_clob (p_content in clob) is
v_buffer varchar2 (32767).
V_POSITION pls_integer: = 1;
v_amount pls_integer: = 32767;
Start
loop
Start
DBMS_LOB. Read (p_content, v_amount, v_position, v_buffer);
exception
When no_data_found then exit;
end;
UTL_FILE.put_raw (v_file, utl_raw.cast_to_raw (v_buffer), true);
V_POSITION: = v_position + v_amount;
end loop;
end;
BEGIN
-Open the file
v_file: = utl_file.fopen ('TEST_DIR', 'testfile2.txt', 'wb', 32767);
-loops through the lines
for r in)
Select h15_doc
of h15test.h15_stage
)
loop
write_clob (r.h15_doc);
end loop;
UTL_FILE.fclose (v_file);
END;
/
-
Does not not for java.sql.Date sort field
Hi Experts ADF,
JDev version 11.1.1.7.0
I use a POJO based datacontrol, who is dragged like a table on page JSFF. One of the field is a java.sql.Date data type in POJO.
So for example in the table 4 values are there to this date field as
2.2.2014
3.2.2014
31.1.2014
to 31.12.2013
So while sorting in ascending order, it should come as below
to 31.12.2013
31.1.2014
2.2.2014
3.2.2014
And vice-versa.
But if I click on sort it sorts by the first 2 digits only, and I'm under results for sorting (ascending)
2.2.2014
3.2.2014
31.1.2014
to 31.12.2013
Please suggest on this. Thanks in advance.
Thank you
Animesh
Hi This sorting has been solved by changing of java.util.Date.
Yes his watch to the client as an outputText inside the table. Sorting option is there for af:column.
Thank you
Roy
Maybe you are looking for
-
Skype keeps disconnecting (PC and phone)
2 hours watching TV, my phone began to me, I thought it was an update, but it kept logging out me a few seconds after the connection. So I tried to uninstall and reinstall it, but does the same thing, so I tried with my PC and its been exactly the sa
-
Hello Please help, I am about to condemn an excellent environment 2010 iMac 27 inches as it is slow so if. I read a few other posts and software clashes seem to be the problem but I have no idea with mine. It takes forever to launch an application an
-
Hello I was wondering what updates (if there is one) I can do for my laptop. The model is a PC HP Pavilion laptop g6-1210sa. It is running on windows 7, it has a 600 GB HDD and 6 GB of ram, so these components are all very well. I really wonder on th
-
SOMEONE CAN ME SAY PLEASE HOW DO I SOLVE THIS PROBLEM Problem event name: APPCRASHApplication name: CVHSVC. EXEApplication version: 14.0.4750.1000Application timestamp: 4b8a36d5Fault Module name: MSVCR90.dllFault Module Version: 9.0.30729.4148Timesta
-
Is it possible to get a lost vista drive?
I lost my disk of vista