Data without the select keyword

Can we get the table data wihtout using SELECT keyword in query?
Just a out of the box question, asked in interview.

Mangal9i wrote:
Can we get the table data wihtout using SELECT keyword in query?
Just a out of the box question, asked in interview.With consideration of Michaels nice example the answer would be:
It depends ...
on the database version. Also the interviewer should explain what he means with: "Get" table data. Which language should be used?
Second consideration would be: What is a query? in traditional (Oracle) SQL a query is always connected with a select statement. XQUERYs are different
Also in some frameworks (i.e.: .net) you can use some objects (ADO/DAO) to instantiate with a database table and then use a completely different syntax to print / show the table on the screen. internally all those frameworks work with some kind of select statement, but that is hidden from the programmer.
Another simple option would be to use some tool. Like Oracle Developer. Just click on user>tables>tablename and see the data.
Of cause the tool again does a select in the database. So what level of technical detail is the interviewer interested in?
Edited by: Sven W. on Sep 23, 2008 4:41 PM
Edited by: Sven W. on Sep 23, 2008 4:42 PM

Similar Messages

  • How can I get a date without the hour from sql server 2000 ?

    hellou!
    I have a JTable, and one of it's columns has to show a date. This date i have to show is specified as datetime on the Sql Server 2000 database where I have to take the data.
    the query of the dataset attached to the JTable is something like "select * from Table".
    The problem is that the JTable column that displays the date shows the date and the hour, for example:
    7/10/04 0:00:00
    and I need to show the date without the hour, only the 7/10/04. Can anyone tell me how to do that?
    thank you very much! : )

    The easiest way to format a date is with java.text.SimpleDateFormat. When creating it you pass a format string which can be used to parse or format date objects.
    SimpleDateFormat formater = new SimpleDateFormat( "MM/dd/yyyy" );
    // Get date objects directly from sql
    Date foundDate = result.getDate( 1 );  //where result is the ResultSet and 1 is the date column
    String formatedDate = formater.format( foundDate );Now the JTable's table model can be adjusted to store a formated String instead of a Date. If for some reason it is required to store the value as a Date overload the table model to return the formated string when getValueAt is called.

  • Deleted bridge cc. Now I need to reinstall but it shows up in my creative cloud app as up to date without the option to download. How do I access it to download and reinstall?

    In an effort to correct an issue with my creative cloud, I deleted bridge cc. Now I need to reinstall but it shows up in my creative cloud app as up to date without the option to download. How do I access it to download and reinstall?

    Bmullinax please see CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html for information on how to reinstall Bridge CC.

  • FISCAL year from Date  in the Selection Screen.

    Hi Folks,
    Is there any function module which returns the Fiscal year if we provide the date in ranges.
    I mean, I have a select option for date in the selection screen.So,if a user enters the date say 01042007 01042007 it should return the corresponding fiscal year.
    Kindly let me know if anyone here has any idea regarding this.
    Thanks,
    K.Kiran.

    Hello,
    Check these FM's
    FTIS
    FTI_FISCAL_YEAR_MONTH_GET
    KBPA                           Budget/Plan - application-specific
    KBPA_GET_START_FISCAL_YEAR     Determine Start Year for Funds Management
    KBPA_GET_START_FISCAL_YEAR_OPT
    Vasanth

  • Dynamic date in the selection according to fiscal year variant

    Hi
    Is it possible to set dynamic date input parameter from the fiscal year variant sap table (OB29 transaction).
    For example when I run valuation (F.05) I want the value date input field to be the last day of the previous period.
    Thanks
    Ofer

    Hi,
    The dynamic dates on the selection parameters may come from the variant.
    You need to create the variants accordingly to your requirements and specify how the date on the selection screen has to be calculated.
    You have different options for this purpose.
    T     T: Table Variable from TVARVC
    D     D: Dynamic date calculation

  • How can I Customise Firefox to Print the Date without the Time (Date/Time in Printing Defaults)?

    ''duplicate - https://support.mozilla.com/en-US/questions/834814''
    What is the custom print option within Firefox to print the date without the time?
    (e.g. 04/08/2010 instead of 04/08/2010 11:15, noting that using the custom print option "&D", also includes the time...)

    Firefox can have multiple home pages if you wish. Each home page that will open when starting Firefox is separated by the "|" character.
    See: http://support.mozilla.com/en-US/kb/How+to+set+the+home+page
    To have new tabs open a specific web site, add one of the following extensions:
    http://sogame.awardspace.com/newtaburl/
    https://addons.mozilla.org/en-US/firefox/addon/777

  • Determine previous date from the selection date

    Hi Guys,
    I need to get a previous date from the selection date mm/dd/yyyy
    Eg:
    Selection date is 02/28/2008
    Sol- -02/27/2008
    Selection date - 03/01/2008
    Sol- 02/29/2008
    Selection date - 04/02/2008
    Sol-04/01/2008
    If i do ofset -1 in query ....it goes -1 month. In Exit if i do Sys-datnum -1. It works but not in case for Feburary month. Since 2008 year has Feb (29 days) but for 2007 (28 days)
    Regards

    Hi,
    Problem is i have a 0Date restricted to a variable and if i do offset-1 to that variable it goes previous month not the date.
    I dont have 0CALDAY in my cube. Can i do in the UserExit.
    If i do sy-datum-1. Will it work?
    Because the FEb one is the main problem
    Regards

  • How to get only the date without the time in the footer of a printout?

    Is there a way to get only the date without the time in the footer of a printout?

    As far as I can tell, there's no built-in option to get the date printed without the time. It's hardcoded in a C++ file.
    As a workaround, you can enter custom text for the footer, but it would need to be updated every time the date changed. I can think of a couple ways to automate that:
    * An add-on (but I'm not aware of any add-on for this)
    * External process to push a new date into prefs.js, a settings file that stores your header/footer preferences, among others (but Firefox should be closed when you update this file, and it will be read when you restart)
    Not easy enough, I know.

  • Issue with Past Month data in the Select Statement

    Hi,
    I written the following query,
    SELECT   /*+NO_MERGE(A)*/
                CASE
                   WHEN snap_shot_date > a.q3
                   AND snap_shot_date <= a.q4
                      THEN q4char
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN q3char
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN q2char
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN q1char              
                END snap_shot_date,
                CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN 1
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN 2
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN 3
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN 4
                END sort_by,
                pillar3_exposure_class_code, pd_band_description,
                ROUND (SUM (p3.ead_post_sec_post_crm)),
                ROUND (SUM (notional_principle)),
                DECODE (SUM (notional_principle),
                        0, 0,
                        ROUND (  SUM (DECODE (exposure_type,
                                              'UNDRAW', ead_post_sec_post_crm,
                                              0
                               / SUM (notional_principle),
                               4
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (  SUM (pd_value * p3.ead_post_sec_post_crm)
                               / SUM (p3.ead_post_sec_post_crm),
                               2
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (SUM (rwa) / SUM (p3.ead_post_sec_post_crm), 4)
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (  SUM (lgd_rate * p3.ead_post_sec_post_crm)
                               / SUM (p3.ead_post_sec_post_crm),
                               2
                TO_CHAR (MAX (a.max_date), 'FMMonth DD, YYYY')
           FROM summary.pillar3 p3,
                (SELECT DISTINCT (month_end_date) max_date,
                                 LAST_DAY (month_end_date) q4,
                                 TO_CHAR (LAST_DAY (month_end_date),
                                          'MON YYYY'
                                         ) q4char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -3) q3,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -3),
                                     'MON YYYY'
                                    ) q3char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -6) q2,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -6),
                                     'MON YYYY'
                                    ) q2char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -9) q1,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -9),
                                     'MON YYYY'
                                    ) q1char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -12) q0
                            FROM rcdwstg.stg_bcar_detail) a
          WHERE snap_shot_date BETWEEN ADD_MONTHS (a.max_date, -12) AND a.max_date
       GROUP BY CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN q4char
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN q3char
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN q2char
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN q1char
                END,
                CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN 1
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN 2
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN 3
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN 4
                END,
                pillar3_exposure_class_code,
                pd_band_description
       ORDER BY 2 DESC;I have written the query to get the latest 12 months data from a table and split that into 4 quarter to show in the Cognos Report. But when the table having 13th or the past months data, the select statement is showing Empty values in the first two columns and fetching the 13 month data too.
    Can anyone help me in this to avoid the problem.
    Thanks
    Radha K

    WHERE snap_shot_date BETWEEN ADD_MONTHS(TRUNC(a.max_date, 'MM'), -11) AND  a.max_date
    ....

  • Is there a way to use 'GET PERNR' without the selection screens?

    I would like to use the GET PERNR event in a batch program without using the default selection screens.  I would like to be able to use my own selection screen and parameters, but only get them along with the default selection options for payroll period.  I've tried removing the screen number from the attributes screen, but still get these options.  Is this possible?

    hi Kiran,
    report Category is a Pushbutton on the Attributes popup, it only appears if you use PNP logical DB.
    this is from SAPHelp: "Report Category
    Category used for HR reports that use the PNP logical database. It controls the type and number of fields that appear on the selection screen of an evaluation report."
    hope this helps
    ec

  • Execute a clientListener of type selection without the selection (HELP)

    Hey everyboy, today i brought a difficult and challeging question for you. (I'm using JDeveloper 12.1.2.0.0 and the database given by oracle -> HR)
    Imagine the following scenario:
    - You have a adf read-only table with the department id and department name
    - You have a adf read-only table with the information of 3 tables together (join of department table, employee table and jobs table), i'm going to call it HUB table
    - You have a adf read-only table with the employee id and employee name
    - You can select one or more departments and the HUB table only shows the rows that are linked to the department that you choosed
    - You click on any element of the hub table and it highlights the rows in the employee table that match the rows in the HUB table
    My question is: How can i do the last part (the click on the hub table) without clicking it?
    I have this on my HUB table:
    <af:clientListener method="rowSelected" type="selection"/>
    <af:serverListener type="invokeMatcher" method="#{BeanControloTotal.matchEmFACTS}"/>
    This is the method rowSelected:
    <af:resource type="javascript">
              function rowSelected(evt) {
                var table = evt.getSource();
                AdfCustomEvent.queue(table, "invokeMatcher", {}, true);
                evt.cancel();
    </af:resource>
    If i try to move my clientListener and ServerListener, it says that i don't have the attributes that i need for the method in my bean (because i don't have the employeeID).
    I have the bean with the bindings for everytable (so i can access to them if i need) and my matchEmFACTS code is:
        public void matchEmFACTS(ClientEvent clientEvent) {
            matchEmFromJavaScriptEmployee(clientEvent);
            matchEmFromJavaScriptJobs(clientEvent);
            matchEmFromJavaScriptDepartments(clientEvent);
        public void matchEmFromJavaScriptEmployee(ClientEvent clientEvent) {
            // initialize and store previously selected values
            oldSelCoMap.putAll(selCoMap);   
            selCoMap.clear();
            newSelection.clear();
            String employee = "";
            RichTable factTable = (RichTable)clientEvent.getComponent();   
            // process selected rowkeys   
            RowKeySet rowKeySet = (RowKeySet)factTable.getSelectedRowKeys();   
            CollectionModel cm = (CollectionModel)factTable.getValue();
    Maybe there is a way that i can execute this clientListener automatically without the need of select any element of my hub table.
    Any ideas?
    My best regards,
    Frederico.

    Hey Jflack, how are you ?
    Actually i'm handling it with a managed bean, and i have a selectionListener but the method is called by a clientListener (the SelectionListener is for other purposes) but i can't pass the code to the selectionListener because it comes from a previous function, so he won't find the element i'm looking for).
    I'll put some parts of the code so you can understand what i'm saying:
    public void onDepartamentosTableSelect(SelectionEvent selectionEvent) {               (The department table selectionListener, where you choose one or more dep.)
            //variable to hold the string containing all selected row's departmentId value
            StringBuffer var_DepartmentID = new StringBuffer();
            //get access to the master table to read selected row keys
            RichTable rt = (RichTable) selectionEvent.getSource();
            RowKeySet rks = rt.getSelectedRowKeys();
            Iterator selectedRowsIterator = rks.iterator();
            onHubTableSelect(selectionEvent);
    public void matchEmFACTS(ClientEvent clientEvent) {                         (The function in the serverListener, in the HUB table)
            matchEmFromJavaScriptEmployee(clientEvent);
            matchEmFromJavaScriptJobs(clientEvent);
            matchEmFromJavaScriptDepartments(clientEvent);
    public void onHubTableSelect(SelectionEvent selectionEvent) {
            GenericTableSelectionHandler.makeCurrent(selectionEvent);
            DCIteratorBinding conIter = ADFUtils.findIterator("FactSalaryView1Iterator");
    As you can see, if i try to organize my code to the HubTableSelect (my selectionListener) i won't be able to get the proper information, since the selectionEvent already comes from another selectionListener, in this case, the department selectionListener.
    Your idea is simillar to what i have, am i right?
    Regards,
    Frederico.

  • End Date of the Selection Period defaults as tax year end date in P45

    Hi,
    We have recently implemented both HRSP'S and CLC'S. In addition to this, we have also applied the following SAP Notes:
    1. 1305238
    2. 1309852
    3. 1310431
    4. 1316197
    Despite this, we are still having the below problem with the P45 Program.
    The End Date of the Person Selection Period automatically defaults to the end of the tax year, we are now unable to overide the date suggested by the system.
    Can anyone suggest the cause of this issue.
    Rgds
    Sandy

    Hi,
    With the Inyear movement legal changes ,HMRC have now introduced a check where in P45 cannot be produced for leavers who have a future leaving date 30 days from the current date.
    In line with the above changes,the chance of issuing P45 for future leavers is now checked by the P45 program even though the person selection end date is the tax year end date . So that's why the date is getting defaulted from the tax year.
    Hope this could solve your issue.
    Regards
    Roop

  • Problem getting the Table Data with the selection listener

    Hi All,
    I am working on a tree and table components. I wrote a logic in the backing bean in such a way that when I expand a node the child nodes for the tree are getting added dynamically and also getting the data in the table for the node expanded in the tree using the same Toplink Query . I added the selection listener for the table and when I am selecting a row in the table I am getting the Null Pointer Exception as the RowKeySet Value for the row selected is coming null.
    Can any one please help me out with this problem
    I will be very thankful
    Regards,
    Madhavi.

    Hi All,
    I am working on a tree and table components. I wrote a logic in the backing bean in such a way that when I expand a node the child nodes for the tree are getting added dynamically and also getting the data in the table for the node expanded in the tree using the same Toplink Query . I added the selection listener for the table and when I am selecting a row in the table I am getting the Null Pointer Exception as the RowKeySet Value for the row selected is coming null.
    Can any one please help me out with this problem
    I will be very thankful
    Regards,
    Madhavi.

  • Last date of the selected quarter

    hi all - I have been struggling to figure out how to get the last date of selected quarter. for example, if the user has selected 2014 Q1 from the date hierarchy, I want to show 2014-03-31.
    any idea how to accomplish this? thanks in advance

    Hi Sam,
    There are several ways to do this in MDX.  
    One way is to use LastChild a few times.  For example, if your hierarchy had Period, Week, and Day below Quarter, and you were sure the user had selected a Quarter (the MDX could check) try this assuming your date hierarchy is calle [Date].[Fiscal
    Calendar].    [Date].[Fiscal Calendar].lastchild.lastchild.lastchild
      The first lastchild will get the last Period in the Quarter, the second lastchild the last week in that Period and the third lastchild will get the last day of that week.
    Another way, which will work for any level they selected would be something like; assuming the Day level is called [TheDate].   Tail(Descendants([Date].[Fiscal Calendar],[Date].[Fiscal Calendar].[TheDate]),1).item(0)  The descendants
    gets all the days in the selected period, the tail gets a set including just the last day, and Item(0) gets that particular day.
    Of course, the MDX snippets above could be used in larger MDX expressions.
    Hope that helps.  It really is worthwhile to learn a little MDX.  Remember, anything is possible in MDX if the cube has the data.
    Richard

  • HT1766 Is there way of accessing your back up data without the use of an i-phone?

    Is there a way of accessing your back up data from the computor without the use of an i-phone?

    If it wasnt activated prior icloud wont help now. Did you ever use the save and print option to "send it itunes"?  I did that all the time prior to icloud to back up my docs. Then you can "copy from itunes" in the new document dialog.
    I still recommend doing the export to iTunes to create a local back up copy on ocassion.
    For future reference, To activate icloud for documents, go into the main settings app, tap icloud, then documents and data, and turn it on. Then go to the app (maybe numbers) further down the main settings list, tap it and turn on "use icloud".
    Jason

Maybe you are looking for