Re: SQL statements




"colmkav" <colmjkav@xxxxxxxxxxx> a écrit dans le message de news: 1182877344.598359.81440@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
| Can anyone explain why when I run the first statement in Oracle XE I
| get lots of records where sourceid = 3 and the riskdate is 18-JUN-07,
| however when I run the 2nd statement I get the result 0 returned?
| Surely I should get no records with a date of 18-jun-07 if the second
| statement returns 0?
|
|
| select * from ta_sma where sourceid = 3 order by riskdate desc
|
| select * from ta_sma where sourceid = 3 and riskdate = '18-jun-07'
|

'18-jun-07' is not a date it is a string.

Regards
Michel Cadot


.



Relevant Pages

  • Re: Removing a default value
    ... |> In Oracle, to remove a default value you set the default to null. ... Or is it just a bug of SQL Developer? ... In this case the dictionary contains the string "'null'" (without the " ... Michel Cadot ...
    (comp.databases.oracle.misc)
  • Re: Query Oracle from Excel
    ... You will need the Oracle client sofware installed on the PC you're running ... What exactly is DBDataProvider and DBDataSource? ... Global prmUsername As String ... Dim adoConn As New ADODB.Connection ...
    (microsoft.public.excel.programming)
  • RE: Query Oracle from Excel
    ... Ron, thanks for your help...this is REALLY helping me!!!! ... Now, let's say that Oracle resides on the LAN/WAN somewhere, and I don't ... Global prmUsername As String ... Dim adoConn As New ADODB.Connection ...
    (microsoft.public.excel.programming)
  • Re: Storing time values via jdbc thin driver
    ... In Oracle you don't have just time anyway. ... Java knows Time and Date, ... There is a date data type which has a time ... string or character value. ...
    (comp.databases.oracle.server)
  • Re: Re-logging into An Oracle Database
    ... I've done it in MS SQL but never in Oracle. ... My connection string seems to work, but the app seems to keep the old userid so I can't see the tables I need to see. ... What I prefer to do is use PTQs is to run updates via VBA, something like this. ... 'no error handling included here for this post, but error procs can be included to return a false for this function of the query does not execute. ...
    (comp.databases.ms-access)