Problem with selecting from timestamp field for a particular date
We're running 10g and we have a timestamp field whose values look like this:
SQL> select timeinserted from files where rownum < 3;
TIMEINSERTED
16-APR-05 01.08.35.97634 PM
16-APR-05 01.16.10.00419 PM
SQL>
I'm trying to run this query, but it returns no rows even though I know there should be some:
select timeinserted from files where timeinserted = '27-MAY-05';
I know I just need to somehow tell it to convert the timestamp to date or something like that. How should I rewrite this query? Thanks...
select timeinserted from files where timeinserted = '27-MAY-05';
this is poor coding, you compare a date with a varchar2. Not to mention using 2 digits years...
try something like
select timeinserted from files where timeinserted >= to_timestamp('27-MAY-2005', 'DD-MON-YYYY') and timeinserted<to_timestamp('28-MAY-2005', 'DD-MON-YYYY');
Similar Messages
-
PROBLEM WITH Select * from table_name with JDBC
Hello,
I am using thin driver. The problem that i am having is as
follows.
when i execute select * from any_table_name from within java
code i only get FIRST row back. I am using Employee.java example.
Is there something else i should do?
Alex
nullHi Alex,
I am writing a client application with Java. Everything works
really well, but - same problem as you had (I know, you solved it
- that's why I'm writing :) - reading only first column. Actually
it works fine on its own, but when embedded in my java app -
that's when I get the first column displayed.
Also executing "select * from emp;" gives me a sequence of
numbers (displayed in columns) 20, 30, 30 etc, which are in fact
present as one of the columns when running this query without
java.
I appreciate your help!
Malgosia
Alex Korneyev (guest) wrote:
: Hello,
: I am using thin driver. The problem that i am having is as
: follows.
: when i execute select * from any_table_name from within java
: code i only get FIRST row back. I am using Employee.java
example.
: Is there something else i should do?
: Alex
null -
Performance problem with select from _DIFF view
Hi,
we have a versioned table with more then one million records. We use the DBMS_WM.SetDiffVersions procedure and select from DIFF view to get data differences between two workspaces. The problem is that the select from the DIFF view is very slow. I takes more than 15 minutes. Has anybody an idea why it consumes so much time? Is there any way how to improve it?
Thanks and regards
OndrejHi,
This can be due to any number of things, but is typically caused by an inefficient optimizer plan. Make sure that statistics on the _LT table have been recently analyzed.
Also the following information would be useful:
1. What is the relationship of the workspaces that you are trying to compare (parent/child, children of the same parent, etc) ?
2. How many and of what type dml are being performed in the workspaces ?
3. What version of Workspace Manager are you using and what is the version of the database ?
4. What is the time needed to select from the _DIFF view based on the primary key ?
Regards,
Ben -
Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
Statements in called form (Form name: FORM_CHILD):
go_block('display_block') ;
do_key('execute_query') ;
-- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
-- from TABLE_A.
-- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
-- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
if user_choice = 'YES' then
commit ;
else
rollback ;
end if ;
Statements in calling forms:
There are two calling forms having following statements and it is going to call the above said called form.
CALLING FORM 1
Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...; Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
CALLING FORM 2:
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...;
insert into table_b ...;
Our understanding:
Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
Actual happenings or Mis-behavior:
Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
Our mail ID: [email protected]
Thanks a lot in advance.You have several problems:
1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics. -
Problem with: select 'c' as X from dual
Problem with 'select 'c' as X from dual'
I get 2 different results when I execute the above with SQLPlus (or java) depending on the instance I am connected to. For one instance the result is a single character and for the other the character is padded with blanks to 32 chars in the SQLPlus window (and java). Does anyone know what database setting causes this to happen? Is it a version issue ?
Test #1: Oracle 9.2.0.6 - SQLPlus result is padded with blanks
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:27:58 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.6.0 - Production
SQL> select 'c' as X from dual;
X
c
SQL>
Test #2 Oracle 9.2.0.1 SQLPlus result is a single character.
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:29:27 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> select 'c' as X from dual;
X
c
SQL>Using 9.2.0.6 On AIX 5.2 I get the single byte result:
UT1 > select 'c' as X from dual;
X
c
If the databases are on different Oracle Homes you may want to check the sqlplus global logon files for any set commands.
If you executed the two sql statements from different OS directories you may also want to check your sqlpath for sqlplus .logon files.
Try issueing clear columns and repeating the statement. Are the results the same?
HTH -- Mark D Powell -- -
Problem with flow of expandable fields
Hi everyone,
I have important problem with flow of expandable fields in table in dynamic PDF form. The issue I am talking about you can see at the top of column 3 on page 2 in PDF in link below.
Here is uploaded PDF form and sample XML data (form has import button and is ReaderExtended that you can easily test it and see my problem):
http://www.speedyshare.com/718224676.html
Generally I have created table with 3 columns using Table object (each field has allow multiple lines selected and expand to fit). It is closed in FormBody subform which is flowed subform.
Row in table is repeatable and has “is allow to break page” setting set on.
Sometimes when there is a lot of text and row page break there is problem with flow.
For example text from one rows overlaps on text from next row.
I tried to solve this problem by changing row height, indents, font size, line spacing but always when I thought that I have fixed it I got another data which generated the same flow problem.
Did anyone met this problem earlier and found solution to this issue? This is really important for me and I am really in dead end so any hints would be really helpful.
I am using Adobe Livecycle Designer 8.1 and PDF form target is 8.
I really appreciate any help in this problem.
Thanks,
Kamil DłutowskiI posted link to my form in my first post.
Here it is: http://www.speedyshare.com/718224676.html -
Problem with selecting text in Adobe Reader XI
Hi all, I am encountering a problem with Adobe Reader XI and it is very strange I could not find an alike issue on the internet so I guess I have to submit a question with it.
So here it is, I am using Adobe Reader XI Version 11.0.2, operating system: Windows 7. I do not know it starts from when but it has the problem with selecting text - to be copied in pdf documents. I ensure that the documents are not scanned documents but word-based documents (or whatever you call it, sorry I cannot think of a proper name for it).
Normally, you will select the text/paragraph you want to copy and the text/paragraph will be highlighted, but the problem in this case that I cannot select the text/paragraph, the blinking pointer (| <-- blinking pointer) will just stays at the same location so I cannot select/highlight anything to be copied. It happens oftenly, not all the time but 90%.
This is very annoying as my work involves very much with copying text from pdf documents, I have to close the pdf file and then open it again so I can select the text but then after the first copying or second (if I am lucky), the problem happens again. For a few text I have to type it myself, for a paragraph I have to close all opening pdf documents and open again so I could select the paragraph to copy. I ran out of my patience for this, it causes trouble and extra time for me just to copying those texts from pdf documents. Does this problem happen to anyone and do you have a solution for this? I would much appreciate if you could help me out, thank you!Yeah, I totally agree, this is very strange. I have always been using Adobe Reader but this problem only occurred ~three months ago. It must be that some software newly installed I think. But I have no idea.
About your additional question, after selecting the texts and Ctrl + C, the texts are copied and nothing strange happens. It's just that right after I managed to copy the texts, it takes me a while to be able to select the texts again. For your information, I just tested to select the texts and then pressed Ctrl, the problem happened. And then I tried pressing C and then others letters, it all led to the problem.
I guess I have to stick with left-clicked + Copy until I/someone figure the source of this problem. Thanks a lot for your help! -
Is anyone else having problems with the new software update for macbook? I get random clicking and flicker an movement of the pointer!
OS X 10.7 Lion, 10.8 Mountain Lion & 10.9 Mavericks
Reset Password starting from Recovery HD
Start the computer,then press and hold down command and R keys to start into recovery partition.
When you see the Apple logo, release the keys.
Wait until OS X Utilities window shows up.
Move the mouse to the menubar at the top and click "Utilities", then select "Terminal"
from the drop down.
Terminal window will appear.
Type in resetpassword and press enter on the keyboard.
Leave the Terminal window open.
Reset Password Utility window will open with Macintosh HD selected.
Select the user account from the popup menu box.
Enter a new password.
Reenter the new password for the user.
Enter a hint.
Click the "Save" button.
Click in the menubar and select Restart.
Log in.
If Keychain dialog box appears, select “Create New Keychain”. -
Windows 8.1 Problem with games from windows store.
I've got a problem with games from windows store. The installation is going well without any problems, however when I try to open it it's loading and then it turns off. The same problem happens when I try to use Games for Windows. I've use a sfc scan and
it shows some errors but unfortunately it cannot fix them. Should I share the CBS log or find the solution somewhere else? I hope you help, best regards.Hi,
According to my experience, the problem like store game app open failed probably caused by hardware driver. such as Audio and Graphic driver. So, first of all, please try to reinstall these two driver to fix this problem for test.
In addition, for SFC scan failed problem, it can be caused by many reasons, I would suggest you use another command to fix your system for test.
Dism /Online /Cleanup-Image /ScanHealth
Also you can test SFC command in Windows 8.1 safe mode.
Thirdly, if problem persists, please check Event Viewer, generally speaking, it would record the app open failed events.
Roger Lu
TechNet Community Support -
I had problem with my apps,they open for a while and closes with in seconds i cant acess them
i had problem with my apps,they open for a while and closes with in seconds i cant acess them and i had this with all apss,expect apple apps
Do you have a lot of apps? Did you use a lot of apps recently? If so, many of them may still be resident in memory even if you aren't currently using them. Double-tap the home key and you should see the app tray with a list of most recently used programs. Press and hold the icons in the tray and remove the ones you don't use often to remove them from memory. Powering off and then back on might also help.
My wife's iPod does that sometimes, and it's usually because we run out of memory due to apps remaining in memory even when not used. The suggestion above is how we normally fix the problems. -
I have problem with buying from iTunes Store
I have problem with buying from iTunes ??!!
I've put all of my info cards
What can i do ?!Are you trying to spam the forum with 6 the same posts?
Please give more details of your problem and answer the question below:
Is the app available in your country?
Are you using the App Store for your country? -
Selecting a document field for a field in a condition table/access
Hello
I created a pricing condition table using field WGHIE from the standard field catalog.
Img/SD/Basic Functions/Pricing/Pricing Control/Define Access Seq
I can assign the table to a access, but when I try to do the field assigment it give's me the message "<i>Select a document field for WGHIE</i>" at the field assignment part.
In the fields display the WGHIE field has nothing listed in the Doc Field and it's grayed out so you cant change it. Also in the I/0 field its red lighted
Any ideals as to how I can fix this.
ThanksRudy,
For more information, see Transaction SPRO via the path 'Sales and Distribution -> System Modifications -> Create New Fields (Using Condition Technique) -> New Fields for Pricing' and OSS Note 21040
REWARD IF U FINDS THIS AS USEFUL...
Regds
MM -
I am getting a pop up box saying that there is a problem with the plug in container for firefox. It keeps saying do I want windows to find a fix for it and close it or do I just want to close the program. What is this plug in container for firefox and why am I constantly getting this message? It has been happening for the past month or two.
It means either you have a faulty/out of date plugin, or your firewall/antivirus is causing problems with Firefox.
Make sure you update all your plugins and disable unwanted ones.
https://www.mozilla.org/en-US/plugincheck/
https://support.mozilla.org/en-US/kb/disable-or-remove-add-ons
Also, make sure your firewall/antivirus is not blocking plugincontainer.exe from the Firefox folder in your computer. How you make sure that's not the case will depend on your firewall/antivirus. -
ERROR: Select Currency/UoM field for the selected analyzed fields
Hi all
I am currently creating Business Rules in GRC PC 10.0 for the Automated Monitoring Framework.
After completing the Basic Information page, I click [Next] and get to the Data for Analysis page.
If ever I select any field that contains a value for Currency or Unit of Measure, I receive the following error and cannot proceed with creating the Business Rule:
Select Currency/UoM field for the selected analyzed fields
Does anyone have any information/SAP Notes/documentation on what this error is and how to solve it?
Any help will be gratefully accepted.
Kind regards
Gregory Huddlehttp://service.sap.com/sap/support/notes/1904313
-
Problems with sources of supply determination for external requirements.
Hi gurus...
My scenario is SRM Classic Extended.
We have a problems with sources of supply determination for external
requirements comes from ECC. The shopping cart is created with successful
based in the purchase requisition at ECC, but when i try to make the
determination of sources of supply the system doesnt find any source of
supply.
There are a lot sources of supply creates for these parameters. The
contracts were already replicated to ECC.
This problem only occurs with external requirements comes from ECC, if i
created a shopping cart directly at SRM, using the same parameters, the
system propose the sources of supply correctly.
Is there something that we can do?? This is the normal comportment for the souces of supply?
Tks,
Gustavo NogueiraHello Gustavo Nogueira
Then it is an issue.
How are you searching the source of supply in sourcing cockpit.
Can you replicate the issue?
Let me know step by step,
as per standard SAP , source of supply data must be available for shopping carts so that buyer can assign the source of supply.
please share what source of supply you have there .
Maybe you are looking for
-
Smart Album not so smart?
Hi. A few months ago I upgraded from iPhoto to aperture. It's all rather confusing but I've been willing to overlook it because of the usefulness of aperture as an advanced photo editor. Now however all sorts of weird things are showing up. The Smart
-
My iphone will not ring when calls come in. I have it set to ring and vibrate. The Do not disturb is turned off and I have reset it but still it will not ring. What can I do?
-
CAT2 for Time Entry (single and multiple)
Hello all, We have been using CATW for time entry and CAT2 for multiple time entry and have security set up accordingly. We're thinking of moving to CAT2 for all time entry but need to make sure we can configure to allow single time entry for those r
-
Formula in SAP BPC dimension with father
Hi, I have a problem with dimension's formula. I have,for example, the DimName.h1.A1+DimName.h1.A2 formula, where A1 is a father member. Do you konw how I can write this formula? Thanks Claudia
-
SPM - Firefighter ID valid to 12/31/9999 - Can this default date be changed
We are using the SPM module of AC 5.3. When we create a request for superuser access and select a firefighter ID, the VALID TO date defaults to 12/31/9999. Since we only want a user to have a firefighter ID for usually 1 day, is there anyway to cha