I want to know the difference between Days column and Day1 Column

Hi All,
I used this query:
SELECT to_char(return_date_time,'dd/mon/yyyy hh24:mi:ss') Test,
DECODE ('I', 'I', DECODE (1, NULL, NULL, 0, NULL, SYSDATE + 1)) Days,
DECODE ('I', 'I', SYSDATE + 1) Day1
FROM fm_curr_locn
WHERE patient_id = 'DU00002765'
output: 
Test
Days
Day1
26/oct/2013 00:00:00
26-OCT-13
10/26/2013 3:06:59 PM
I want to know the difference between Days column and Day1 column and why the days column didnt show the time
Please anyone help.....
Regards
Shagar M

Pleiadian wrote:
It is the decode statement that is doing this.
The format of decode is:
decode(expression, search1, result1, search2, result2, searchn, resultn, default)
All result fields must be of the same datatype and will be of the datatype of the first result (result1 in this example)
In your example (the decode for the field Days) the first result is a NULL. I suspect (gurus? anyone?) that Oracle will use the varchar2 overload of the decode statement, and the date field will be converted to varchar2 using your NLS_DATE_FORMAT settings.
In the second decode statment (Day1) the first result is of datatype date, so the result of the decode statement will be a date field (and will be parsed as such by your sql development tool)
I agree, as NULL is the first result returned the datatype is undetermined, so Oracle is picking VARCHAR2 over others, and causing an implicit datatype conversion on the resultant date value, whereas the other which is returned as a date will use the local settings of the client tool being used.
I can replicate the 'issue' in Toad, and it's rectified if we cast the first returned value of the decode statement...
SELECT DECODE ('I', 'I', DECODE (1, NULL, CAST(NULL AS DATE), 0, NULL, SYSDATE + 1)) Days,
       DECODE ('I', 'I', SYSDATE + 1) Day1
FROM dual

Similar Messages

  • I want to know the difference between iphoto master folder and previews folder

    I want to know the difference between iphoto library master folder and previews folder.. my pictures is stored in master but part of them is also copied into previews.. it occupied too much space.. if I can't change anything in iphoto library, any way to save the space for iphoto? 70G for almost 15,000 pictures, is it reasonable?
    i use mac book pro, ilife 11..

    70GB for 15,000 photos is reasonable, yes, if the photo files are large.
    DO NOT meddle with the contents of your iPhoto Library in any other way than using the commands available in the iPhoto application. What appear to be duplicate files stored in different parts of the library are NOT duplicates, and if you attempt to save space by deleting things in the Finder, you will wreck your library and land in a world of trouble.

  • I do video productions for a small local TV station. I use Final Cut Express to edit. I need a new video camera but am at a loss as to what to buy. I know I will get a digital camera but do not know the difference between just digital and digital HD.

    I do video productions for a small local TV station. I use Final Cut Express to edit. I need a new video camera but am at a loss as to what to buy. I know I will get a digital camera but do not know the difference between just digital and digital HD. Also, I can not afford an expensive camera and need some advice on which of the available cameras would be best and also work well with a Mac. One last issue, I currently use a Panasonic #CCD camera that takes a tape. When I load video to Final Cut the audio and video are out of sinc. Go figure. Can anyone help with these questions. Karen

    Hello Karen,
    If you are using Final Cut Express, then look for camcorders that are AVCHD camcorders.  Look especially for the AVCHD logo and specific mention of AVCHD in the specs.  Most of the major manufacturers produce good quality camdcorders - Canon, Sony, etc.
    Also, be aware that there are a lot of "not quite AVCHD" camcorders on the market (sometimes they say they record video as MPEG4-H.264/AVC) - buyer beware!
    Most everything you are going to find on the market today is HD, which stands for "high-def".
    Regarding your question about the Panasonic camcorder, it's best if you post that as a separate question, and please identify the specific model camcorder and the Easy Setup you are using in FCE.

  • I need to know the difference between planned SKF and Actual SKF from business view and when I can use one of them ?

    I need just to know the difference between plan SKF and Actual SKF in business example and when I use one of them.
    thanks

    Hi Salaam,
    Statistical Key Figure (SKF) is a base to allocate the cost between cost centers. Usually, common cost centers cost should allocate to respective department cost centers on monthly basis.
    Some of SKFs are: Calculating floor rent on SFT, Telephone charges on No. of units, and employees head count is with "Each" in SAP.
    Apart from Ajay's reply, you can consider the Canteen exp in an organization. Assume Admin, Fin and Mfg departments are getting food services from Canteen. Here, total monthly cost of Canteen exp should be allocated to respective departments. Here, we use SKF as total head count of each department and distribute the cost.
    Planned SKF is what you planned on the beginning of a period. (Assume head count was planned as 30 in the month beginning)
    Actual SKF is what exactly you consumed over the period. (Actual employees provided canteen services during the month is 25)
    BR, Srinivas Salpala

  • Hi I want to know the difference between the type of internal tables.

    I know the types of internal table but i dont know the difference between them can any one explain me in simple sentence.

    Hi,
    <b>Standard Internal Tables</b>
    Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.
    This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command). The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to
    the number of table entries.
    <b>Sorted Internal Tables</b>
    Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique, or non-unique, and you must specify either UNIQUE or NON-UNIQUE in the table definition. Standard tables and sorted tables both belong to the generic group index tables.
    This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of
    table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.
    <b>Hashed Internal Tables</b>
    Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.
    This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and
    using internal tables that are similar to database tables.

  • I am wanting to buy and Ipad.. but I would like to know the difference between having wifi and a simcard..if someone could explain this to me.. and the benefits of both I would appreciate it.

    Good Morning:
    I have been looking at the Ipads for a while now.  I have some concerns though.  First, I am NOT a techy of any kind!!  So my question is;  What is the difference between wifi and a simcard(?)   What I understand about wifi is...if you are in an area with free internet.. you can excess it.  If not, then you can't.  What is a simcard?  Is this what you would use like a turbo stick..such as internet on the go... or is this a data plan for the Ipad, like I have for my phone?  If so, I take it that it would mean a monthly bill of what or however I set it up...  Please be kind with your responces.. I am a older person who wants a new gadget.   
    Thank you

    Hi, Sarah,
    You don't really compare a SIM card directly with WiFi. What a SIM card indicates is that a device is designed to connect to cellphone service, in the case of an iPad a data-only service for connection to the Internet. The SIM card works with a technology called GSM (don't worry about what that means); the SIM card is just how the iPad is identified to the cell carrier (in the US, that would be AT&T).
    Your choices of connecting an iPad to the Internet are therefore:
    WiFi - wireless network connection which uses a device referred to as a "hotspot" or "access point" (and sometimes a "wireless router") with an Internet service provided by some other company. You may have this at home, with your own WiFi router and Internet service, or it may be found by some other location, such as a coffee shop. Cost of WiFi at home would only be the cost of the router and the fee you pay to your Internet provider. Other locations may or many not involve a cost. The advantage of a WiFi connection is speed (compared to a cellular data service) and cost (no monthly fee other than your Internet provider).  The disadvantage is that you have to be in range of a WiFi service; that range is usually on the order of 100 feet or so.
    Cellular - this is a service provide by a cellphone carrier. This allows you to have your iPad connected to the Internet wherever the carrier offers service, which may be in buildings, parks, while driving, etc. just as with a cellphone. You pay a monthly fee to the cell carrier for this service. The advange is of course that it's available in many places. The primary disadvantages are the monthly cost and slower speed in the connection to the Internet.
    You can have both with an iPad if you purchase your iPad with both systems included; iPads are sold WiFi-only or WiFi+3G ("3G" refers to being capable of connecting to a cell network) You are not obligated to sign up with a cell carrier if you buy the iPad with that technology; most carriers allow you to sign up month-by-month, and in some countries the carrier has a pay-as-you-go service. If you tell us what country you're in, someone can tell you more about the available cell plans, if you're interested.
    I hope this helps. Feel free to post back if you need further clarification or have additional questions.
    Regards.

  • I want to know the difference between row.REFRESH_UNDO_CHANGES | row.REFRES

    I want to under stand this statement
    row.refresh(row.REFRESH_UNDO_CHANGES | row.REFRESH_FORGET_NEW_ROWS);I know that refresh method take int
    I want to know what is the meaning of this int
    and what if I used
    row.refresh(row.REFRESH_UNDO_CHANGES);Or
    row.refresh(row.REFRESH_FORGET_NEW_ROWS);and When I use the Both what is the meaning of this and how this is executed.

    When I searched for Java Bitwise OR " |" I Found that
    a | b >>     Means 1 if either bit is 1.
    This means this is like boolean operations and 0 means false and 1 means true and it makes logical or.I don't know if this true or no.
    but when I tried to make
    system.out.println();
    I found that
            System.out.println("row.REFRESH_UNDO_CHANGES> "+row.REFRESH_UNDO_CHANGES);
            the result is > 10
            System.out.println("row.REFRESH_FORGET_NEW_ROWS> "+row.REFRESH_FORGET_NEW_ROWS);
            the result is >> 8192
            System.out.println("(row.REFRESH_UNDO_CHANGES | row.REFRESH_FORGET_NEW_ROWS)> "+(row.REFRESH_UNDO_CHANGES | row.REFRESH_FORGET_NEW_ROWS));
            the result is >> 8202
            this means this makes addition operation
    If I make something like this
            row.refresh(8202);
            is this will make the same operation like
            row.refresh("(row.REFRESH_UNDO_CHANGES | row.REFRESH_FORGET_NEW_ROWS)> "+(row.REFRESH_UNDO_CHANGES | row.REFRESH_FORGET_NEW_ROWS));and is it takes the number and make the operation depends on this number. like 10 means row.REFRESH_UNDO_CHANGES.
    and is this statement
    row.refresh(row.REFRESH_UNDO_CHANGES | row.REFRESH_FORGET_NEW_ROWS);equals to
    row.refresh(row.REFRESH_UNDO_CHANGES);
    row.refresh(row.REFRESH_FORGET_NEW_ROWS);

  • Does anybody know the difference between extractors 0FI_GL_4 and 0FI_GL_10?

    BW experts:  I have to extract GL data into BW, and I was assuming I would use 0FI_GL_4 datasource.  However, I began looking around and see now 0FI_GL_10.  I am not knowledgable on the finance side at all in SAP, so I don't know which extractor makes sense to use.  Does anybody know what the difference is between these two extractors.
    Kind Regards,
    Chris

    these two datasources are different from each other.
    If you are still using the old GL - you need to use 0FI_GL_4
    If you are still using the NEW GL - you need to use 0FI_GL_10
    And one more thing to keep in mind id 4 extractor is meant for line items and 10 is for totals. And there is no std line item DS for NEW GL. You need to create ur own.

  • Need to know the difference between SRM workflow and Normal Ecc 6.0 Worflow

    Hi All,
    I have worked on Ecc 6.0 worflow, just wanted to know how is SRM workflow going to be different than the ECC6.0 worflows.
    Incase if someone can suggest some links for tutorials for SRM workflow basics.
    Thanks to all in advance.
    Anu.

    Hi
    In addition to Masa
    For every business object we do have one or more  work flow templates are available.
    In SRM , you can approve via web browsers . very user friendly screens
    br
    muthu

  • I'd like to know the difference between Flat view and Threaded view in the forum.

    anyonw know?
    discussion view style and comment view style
    any difference? i have not noticed any

    threaded view will not display posts which are replys to other posts in the main view
    only when you click on the original post will you see them

  • Does anyone know the difference between KT2 Combo and K7N2G?

    I bought a KT2 combo (ms-6764) because my ms-6341 went bad,and msi sent me a k7n2g (ms-6341 v.1.1). Does anyone know which has more or better features? Thanks much

    KT2 Combo-L: VIAs KT266A Chipset onboard, SDR DIMM and DDR DIMM support, low price board, FSB266 support
    K7N2G: nVidias nForce2 IGP MCP Chipset onboard, high performance Chipset, FSB333 support, graphics onboard (comparable to the GF4 MX, if Dual Channel is used), Dual Channel DDR400 support
    The K7N2G is way better, than the KT2 Combo-L. But see yourself:
    KT2 Combo-L: http://www.msi.com.tw/program/products/mainboard/mbd/pro_mbd_detail.php?UID=408
    K7N2G: http://www.msi.com.tw/program/products/mainboard/mbd/pro_mbd_detail.php?UID=398
    greetz sj

  • Does Anybody know the difference between M9088G/A and M9089G/A?

    I have iMac G4 17" Flat Screen(800Mhz).
    I want to add more memory in it.
    Apple has two part number for 512MB PC133 144PIN module.
    One is M9088G/A the other one is M9089G/A.
    I am wondering whether both are compatible or not.
    iMac G4 17" Flat Screen(800MHz)   Mac OS X (10.4.6)  

    Welcome to the discussions!
    Do yourself a huge favor and take a look at OWC where that same RAM is almost half the price.
    Apple does not make RAM and they seriously overcharge for it. OWC guarantees their RAM is Mac compatible and have a lifetime replacement warrantee.

  • I know the difference between a theme and a ciomplete theme, but what is the difference between either of those and a personna?

    I have read all I could find on this site, and still it is not clear. Usually you guys are so good at explaining things.

    Persona is now the name for a different 'feature', so they had to come up with a different name and now call a persona a theme and what used to be called a theme is now a complete theme.
    *https://addons.mozilla.org/firefox/complete-themes/
    *https://addons.mozilla.org/firefox/themes/
    *https://support.mozilla.org/kb/what-is-persona-and-how-does-it-work
    *http://www.mozilla.org/en-US/persona/

  • What's the difference between UPK Professional  and UPK standard

    Hi
    I want to know the difference between UPK Professional and UPK standard.
    Thanks!

    Hi,
    In a nutshell, the primary difference is the use of Knowledge Center.
    UPK Std makes use of limited usage tracking and reporting, whereas UPK Pro allows full use of the Knowledge Center and related technologies.
    The Reports Management.pdf and User and Content Management.pdf documents highlight specifics as to what is only available in UPK Pro.
    You will find these docs as part of the installation media.
    Hope this helps.
    Regards,
    Greig

  • What is the difference between Mobile Engine and MI?

    hi all,
    i want to know the difference between Mobile Engine and MI and also what are the main advantages included in MI instead of ME.

    Hi Anusha,
    ME had MicroITS as UI.
    MI has JSP and AWT as UI programming.
    From the above discussion its clear that JSP is the best option for programming.
    PS: AWT was depricated by SUNMicro.
    I just thought of sharing the history of MI.
    just to share to you a "history" of mobile projects in SAP.
    the current MI was actually a merged project from two mobile
    projects - the old Mobile Engine and the unheard Mobile
    Development Framework (MDF). when these projects were
    restructured, the ME was extended with some functionalities
    such as the SmartSync which was actually the replication
    technology used in MDF. MDF client was based on C++ and
    uses the CEDB as the database. it was not chosen to be
    the client due to its platform-dependency. MDF was already
    a working product when the restructuring happened. and there
    were some client functionalities like xml based GUI and
    metadata/logic definition that the current MI client doesn't
    have.
    Hope this is helpful.
    Close the thread if your done with your clarification.
    Cheers,
    Karthick

Maybe you are looking for