How to get an array of SQL data

Hello

I need to get a say DBMS output output of a SQL SELECT query say * OF EMP in the form of a table (with borders and titles).

Is this possible in Oracle to return a table with borders and titles?

user13410062 wrote:

Hi all

I don't know what am I missing in my question, which is confusing. The only thing I'm looking for is invoking a procedure/function of TOAD/SQLPLUS that can turn a TABLE formatting based on a query (SELECT * from insert_table where insert_table is-)
CREATE TABLE insert_table
(
Number of S_No
Varchar2 (128) of the player.
Number of Ranking_Points
Country varchar2 (128)
);
Now the output is visible in the result of the query or DBMS_OUTPUT as

>> > >

S_NO PLAYERNAME RANKING_POINTS COUNTRY
1 Rafael Nadal 12390 Spain
2 Roger Federer 7965 Switzerland
3 Novak Djokovic 7880 Serbia

To add to what anton said...

When you submit a SQL query to the database, the statement is executed and the data is returned to the calling program.  The database has no awareness of what this program is, or how this program can restore the data on the screen, and the database itself is not any output device to display data.

Thus, the data can be returned to various programs for example

SQL * Plus - a terminal/command line screen, which usually uses a font to fixed width and standard characterset

TOAD - a windows based application that has a "data grid" to display the data, you get

SQL * Developer - windows-based application

Oracle APEX - one based on web front end that makes HTML given to it, or can take the data and rendered in the HTML form for you.

PowerBuilder - an application environment that could choose to display the data in DataWindow, store the data in data warehouses, be an intermediary providing data as a web service or be rendered web pages with data, etc..

.NET - like PowerBuilder, it might choose to make the data are however required.

Java - like Powerbuilder and .NET, it might choose to make the data are however required.

etc.

Thus, each of these environment renders data on the screen but he wants and will do it in a style that suits.  Some methods that work in an environment do not work in another environment, for example, you could provide data with the tab character included in the data and SQL * Plus can restore data with tags in it, but something like TOAD, perhaps will not and displays a character box indicating an "unprintable" character etc..

That's why you can't just ask a question say you want to provide a query and get a table with headings etc. displayed, because the table with headings etc. depends entirely on the final user interface until you choose to use.

Tags: Database

Similar Questions

  • How to get an array of integers to user in the User Interface

    Hi all. I'm not a very experienced user of the CVI. I have almost exclusively coding in LabVIEW but have a client who wants all of their work in the CVI.

    I've been very fruitful so far (set up a Modbus API from scratch that supports all types of connection) but am confused on how I can get the integer multiples of the user without limiting the number of integers I can get. Essentially, I need to be able to get an array of integers to the user.

    General information, I am building a user interface to test my Modbus API. There are Modbus functions to 'Write multiple registers' and 'write multiple coils. I want the user to be able to enter all the values they want to write in one command.

    What is the best way to get an array of integers through the user interface?

    The easiest way is probably to allow user input in a textbox control numbers: items can be separated by spaces, commas, or even a line break (using ctrl + Enter). You will then need to extract the string from the TextBox and analyzed for numeric values using any non-digit character as a separator: strspn (string, '0123456789'); can be used for this.

    More complex, another possibility is to use a table control to receive user input: you Dresses an empty table with a reasonable number of roews, or you need some codes to add new lines as long as the user fills all those already existing. On the other hand, it will be easier since data recovery in a simple statement, you will all return values: GetTableCellRangeVals (panelHandle, PANEL_TABLE, VAL_TABLE_COLUMN_RANGE (1), table, VAL_COLUMN_MAJOR);

  • How to get the difference of two dates in months

    Dear friends,

    I have 4 items on my page.

    2 entered message text (value of loan, monthly deduction)

    2 are message style fields (start date, end date)

    I need to get the difference from above 2 dates in no.. of months. (for example say N)

    So with N, loanvalue should be divided and populated as monthly deduction.

    I tried this way, but not able to get the difference of dates

    {if ("populateMonthlyDeduction". Equals (PageContext.GetParameter (EVENT_PARAM)))}

    System.out.println ("enter populateMonthlyDeduction loop1");

    String xxDeductionStartDate = vo.getCurrentRow ().getAttribute("DeducStartDt").toString ();

    System.out.println ("xxDeductionStartDate is:" + xxDeductionStartDate);

    TXN OADBTransaction = am.getOADBTransaction ();

    java.sql.Date DeductionSDate = null;

    java.sql.Date DeductionEDate = null;

    if(xxDeductionStartDate!=null)

    {

    java.sql.Date startDate = txn.getOANLSServices () .stringToDate (xxDeductionStartDate);

    DeductionSDate = startDate;

    System.out.println ("DeductionSDate is:" + DeductionSDate);

    }

    String xxDeductionEndDate = vo.getCurrentRow ().getAttribute("DedEndDt").toString ();

    if(xxDeductionEndDate!=null)

    {

    java.sql.Date endDate = txn.getOANLSServices () .stringToDate (xxDeductionEndDate);

    DeductionEDate = endDate;

    System.out.println ("DeductionEDate is:" + DeductionEDate);

    }

    int difInDays = xxDeductionEndDate-xxDeductionStartDate; -Please correct me

    How reach it .plz help.

    Thank you

    Aravinda

    I used a custom like this method and calls this method daysBetween PFR.

    I got it. Thanks to you all.

    public int daysBetween(As Date, Date etDate)

    {

    return (int) ((etDate.getTime () - stDate.getTime (()) / (1000 * 60 * 60 * 24));

    }

    If ("populateMonthlyDeduction". Equals (PageContext.GetParameter (EVENT_PARAM)))

    {

    System.out.println ("enter populateMonthlyDeduction loop1");

    String dedStDt = vo.getCurrentRow ().getAttribute("DeducStartDt").toString ();

    String dedEndDt = vo.getCurrentRow ().getAttribute("DedEndDt").toString ();

    If (! dedStDt.Equals (null) &! dedEndDt.equals (null))

    {

    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

    Date sdate = new Date();

    Date edate = new Date();

    String sdate1 = null;

    String edate1 = null;

    try {}

    sdate = dateFormat.parse (dedStDt);

    EDATE = dateFormat.parse (dedEndDt);

    SimpleDateFormat dateFormat1 = new SimpleDateFormat("dd-MMM-yyyy");

    sdate1 = dateFormat1.format (sdate);

    edate1 = dateFormat1.format (edate);

    int days = daysBetween(sdate, edate);

    int diffInMonths = days/30;

    System.out.println ("days is:" + days);

    System.out.println ("diffInMonths is:" + diffInMonths);

    String sTotValueTuitionFees = vom.getCurrentRow ().getAttribute("TotValueTuitionFees").toString ();//pageContext.getParameter("LoanValue").toString();

    int iTotValueTuitionFees = Integer.parseInt (sTotValueTuitionFees);

    int iMonthlyDeduction = iTotValueTuitionFees/diffInMonths;

    String sMonthlyDeduction = String.valueOf (iMonthlyDeduction);

    System.out.println ("iMonthlyDeduction is:" + sMonthlyDeduction);

    OAMessageStyledTextBean bMonthlyDeduction = (OAMessageStyledTextBean) webBean.findChildRecursive ("MonthlyDeduction");

    bMonthlyDeduction.setValue (pageContext, sMonthlyDeduction);

    }

    catch (ParseException exception) e

    {

    }

    }

    }

  • How to get the hang of sql

    Hi all

    I can view the blocked sql using sql_txt to this:

    Select distinct s1.username | » @'|| S1.machine | "(INST =' | s1.inst_id |) ' SID = ' | S1.SID |')

    blocks ' | S2. UserName | '@' || S2.machine | ' (INST =' | s1.inst_id |') SID =' | S2.SID |') '

    LIKE blocking_status, s2.program, s3.sql_id, s3.sql_text gv$ lock l1, gv$ session s1, gv$ lock l2, gv$ session s2, s3 in v$ sql

    where s1.sid = l1.sid

    and s2.sid = l2.sid

    and l1.block = 1

    and l2.request > 0

    and l1.id1 = l2.id1

    and l2.id2 = l2.id2

    and s2.sql_id = s3.sql_id;

    But I can view the blocker sql

    Can you help me how to get the sql_txt hang?

    I try to review the program that is:

    Select s1.sid, s1.serial #, s1.inst_id, s1. SQL_ID gv$ lock l1, gv$ session s1, gv$ lock l2, gv$ session s2, s3 in v$ sql

    where s1.sid = l1.sid

    and s2.sid = l2.sid

    and l1.block = 1

    and l2.request > 0

    and l1.id1 = l2.id1

    and l2.id2 = l2.id2

    and s2.sql_id = s3.sql_id;

    INST_ID SELECT SQL_ID SID, SERIAL #.

    ---------- ---------- ---------- -------------

    1-148-88

    But s1.sql_id is null. where do I get it?

    Thank you

    It occurred in the past.  You can't find it in the past.

    If you enable this, you might find the SQL code in the future.

    Hemant K Collette

  • How to get more space to store data

    Hello

    I am newbie to ESXi 4.1. Recently I setup an ESXi 4.1 with the data store total 267 GB (146GBx3, RAID5), created 1 Win2008 Std 64 bit thick provisioned VM size 180 GB of disk & partition as C:\80GB, D:\100GB under Win2008, currently only 20,57 GB free data store space.

    (1) I try to create an another VM Win2008 standard 64-bit using typical/custom but max only allow 40 GB, how to get about 100 GB? (C:\60GB, D:\40GB)

    2) can I change existing VM thick to thin to follow steps of http://www.righteoushack.net/?p=419? what a C:\80GB, D:\100GB under Win2008? would it automatically resize so? or can I reduce existing 180 provided thick GB?

    (3) why there are 3 hard files created for a single virtual machine? how hard to remove? (see photo datastore.jpg)

    (4) as the system comes with Quard core 6 GB RAM & CPU, existing VM use 2 CPU4 GB of RAM, can I put a new virtual machine to use 2CPU4 GB RAM?

    Sorry, so many questions.

    Thank you and best regards,

    Kelvin

    Welcome to the VMware forums communities.  Your message has been moved to the forum of the Virtual Machine and the guest operating system.

    Dave

    VMware communities user moderator

    Now available - vSphere Quick Start Guide

    You have a system or a PCI with VMDirectPath?  Submit your specifications to Officieux VMDirectPath HCL.

  • How to get the multiple layers of data

    Hello

    I imported two jpg files into a single composition. Please follow this procedure...

    1 created a composition, say his name testCompo

    2 imported a file1.jpg in the file-> Import-> file draft

    3 imported a file2.jpg in the file-> Import-> file draft

    4. drag the two files, file1.jpg and file2.jpg, in the testCompo

    Now, I have two layers (it is file1.jpg and nested are file2.jpg) in my testCompo. How can I get the information in pixels or pixel data of the

    the two images (IE, I mean layers).

    I knew that params [0]-> u.ld is the first data layer in

    () EntryPointFunc
    PF_Cmd cmd,
    PF_InData * in_data,
    PF_OutData * out_data,.
    PF_ParamDef * params [],.
    PF_LayerDef * output,
    void * extra)

    So what about other data layer? Then, finally how can we get the multiple images/layers data in AE?

    Thanks in advance!

    It's the thing.

    You must have a param layer (let's say it's param number 3).

    Use this param to select any layer of the model.

    Now you checkout param 3.

    what you get is a paramDef structure containing the pixels of the layer 3 Advanced param to.

    you will find this information at:

    paramDef-> u.ld.data (or something close to that. I do not have in front of me)

    This way the jpg1 affect can get jpg2 pixels and jpg3. any layer in the comp.

  • How to get the create view sql statement

    I have a technical problem

    There is a view in the database, for example "topstudentsview" and sql statement is ' select * student where scores > 90;

    My question is how to get the sql statement of the view. I want to get the sql statement in the topstudentsview

    Is the equivalent in MS Sql

    sp_helptext 'topstudentsview '.

    How in Oracle?

    Thank you

    user10182401 wrote:
    My question is how to get the sql statement of the view.

    Simple answer: use a tool. Almost every development tool will give you an option for this requirement.

    In Oracle SQL Developer (free), it's as simple as:

    Connect to the database with the user and click on "views".
    Select the appropriate view, and then click the SQL tab.

  • How to get an hour on average data DAQ 6009

    I am a researcher. I ' am doing a job that requires constant tension of the DAQ 6009 map reading. Now all that his giving is very (for my work) fluctuating. So I need a medium-sized data from it during an interval of 100 ms or something. I can do through VI daq assistant or outside I do or is there a way solv EThis problem please reply.

    Hi perumpadapu.

    Yo did set sampling rate and size of block to get blocks of 100ms of data? Really?

    So why have the value "1 k"? This way you will get data every second...

    So I told you to use the average function to calc averages. You even tried it?

  • How to get the reconciliation AD event data using the SQL query.

    Hi all
    I was trying to get all the recon data to target AD Recon of IOM db, but it seems that at the OIM 11 g we have recon not given in the tables: UCR, CRE, etc.. Use tables "RECON_"... ', my question is all no bady has example query to extract data from recon tables?
    The best
    MP

    It should be a matter of linking your reconciliation table of user AD (early RA_) with the RECON_EVENTS of RE_KEY table.

    In my case, I have user OID reconciliation (so my RA_ table will be different to yours) and can use something like:

    SELECT RECON_EVENTS. RE_STATUS, RECON_EVENTS RA_OIDUSER5.*, RA_OIDUSER5 WHERE RECON_EVENTS. RE_KEY = RA_OIDUSER5. RE_KEY;

    Of course, then depends on what information you want to filter and recover.

  • How to get these settings in sql developer

    According to this link, when I chose my lines in sql developer I don't get all the options illustrated in the screenshot of the binding,

    My sql developer is Version 3.2.20.09 64-bit windows, to use this options I need to make all the settings?

    http://www.thatjeffsmith.com/archive/2013/02/how-to-copy-only-column-headers-from-query-results-in-Oracle-SQL-Developer?

    When I select and click right make me only

    (a) in respect of grid
    (b) single record view
    (c) number of lines
    (d) fInd / highlight
    (e) export

    Once you have identified the column headers desired by highlighting one or more related data cells in the results grid, place your cursor on any column heading, and right-click for the shortcut menu shown in the blog of Jeff Smith.

  • How to get a manufactured HARD drive date?

    How to decode a serial number of the HARD drive to get the correct manufacturing date?

    I found some information, see the attachment below, but the HARD drive in question is SATA and serial number decodes to Feb 1997 which may not be correct.
    SN in question is 27MJFxxxx. Instructions below, 7 = 1997 - which would be 2007?

    Thanks for any help.

    -------------------------------------------------------------------------------------
    How to encode a Toshiba hard drive serial number?

    Toshiba serial number (S/N) includes the date of manufacture. The first digit of the serial number indicates the month of manufacture and the 2nd digit is the year.

    Example:
    M Y x x x x x x x
    M = month
    Y = year

    Data for the month goes from 1, for January, by 9 in September, then X, Y and Z, for October, November and December.

    Examples:
    2 8 1 7 0 0 0 1
    2 = February
    8 = 1998

    3 0 5 4 4 3 0 6 T
    3 = March
    0 = 2000

    X 9 7 8 3 3 1 T
    X = October
    9 = 1999

    The remaining digits contain information about the plant and the production line, and some numbers are reserved for a continuously running serial number.

    Hello

    I googled a bit and there are a lot of people that suggests how to read a serial number, I have no idea if he of right, but for example if you have a serial number: X7TO234534, then the product data would be October 2007 (X 7)
    X = 10 = October, Y = November, Z = Dec
    The first number is the month and the second digit is one year.

    So in your case, the serial number 27MJFxxxx should mean Feb 2007

    However, these are only some gossip on the internet and who knows if it of good or bad

  • How to get the Organizer"and"Accepted"data from a BlackBerryEvent

    Hi all

    -J' I send an invitation to the device of BB from Outlook
    -Once received, accept the appt to the BB email application

    When I view the appointment in the native calendar of BB, I can see the "Organizer" fields and "accepted."

    How can we get these data "Organizer" and "Accepted" to a BlackBerryEvent we will get only the PARTICIPANTSin an event.

    Using String email is event.getString(BlackBerryEvent.ATTENDEES,i);.

    any help in this please.

    Thank you

    Gerard

    No, you can get a list of the names of the participants, but not their status.

  • How to get out of deletion of data in the Editfield while moving on the text?

    Hello

    In my app, that I made as many sons to cause the HttpConnection.By using the Http call I get my data in string format, and I see in EditField.Each n each HTTP request, obtaining new channels and view in the new with EditField.Now page when I roll over the text or focus on the text , the text will be deleted means that the user cannot see once it is finished on that roll.

    That is, if the string is 'BlackBerry Support' and if I roll on the 'Support' and then it will be deleted.

    So, can someone give me the solution for this and how should I go out there with a proper resolution. ?

    Give all extracted code or any useful links or any other resolution for the same thing.

    Thank you

    Mishal

    Well,.

    I think that its problem of invalidate().

    First take the RichTextField EditField instead. You can display several data using RichTextField.RichTextField are more appropriate for this type of data.

    Second, invaqidate() Manager/fields within a method such as navigationMovement() of the screen. So then when you try to move to the up/down or left/right while the fields will be invalidate() and will update the entire data with the data.

    If that still do not work correctly then you can do using the vector. It's going to be a little hectic, but it will definitely solve your problem.

  • How to get the names of all data centers in vSphere

    Hello

    The following code retrieves the path of ful of VMDK files.

    How can I get this info to all the domain controllers in my environment instead of questioning a DC at a time?

    CODE:

    Get-data center $DC | Get-Datastore. Where-Object {$_.} {Name - notlike "DataStore1 *"} |
    Sort-Object-property name.
    Select-Object - property name,
    @{Name = "CapacityGB"; Expression = {[Math]: tour ($_.)} (CapacityGB, 0)}},
    @{Name = "UsedSpaceGB"; Expression = {[Math]: tour ($_.)} CapacityGB-$_. (FreeSpaceGB, 0)}},
    @{Name = "FreeSpaceGB"; Expression = {[Math]: tour ($_.)} (FreeSpaceGB, 0)}},
    @{Name = "UncommittedSpaceGB"; Expression = {}
    If (-not $_.) ExtensionData.Summary.Uncommitted) {}
    0
    }
    else {}
    [Math]: tour ($_.) ExtensionData.Summary.Uncommitted/1GB,0)
    }
    }},
    @{Name = "ProvisionedSpaceGB"; Expression = {}
    $Summary = $_. ExtensionData.Summary
    If (-not of $Summary.Uncommitted) {}
    [Math]: round (($Summary.Capacity-$Summary.FreeSpace)/1GB,0)
    }
    else {}
    [Math]: round (($Summary.Capacity-$Summary.FreeSpace + $Summary.Uncommitted) / 1 GB, 0)
    }
    }},
    @{Name = "PercentageUsed"; Expression = {[Math]: round (100 *($_.)} CapacityGB-$_. FreeSpaceGB) / $_. (CapacityGB, 0)}},
    @{Name = "PercentageFreeSpace"; Expression = {[Math]: round (100 * $_.)} FreeSpaceGB / $_. (CapacityGB, 0)}},
    @{Name = "PercentageProvisioned"; Expression = {}
    $Summary = $_. ExtensionData.Summary
    If (-not of $Summary.Uncommitted) {}
    [Math]: round (100 * ($Summary.Capacity-$Summary.FreeSpace)/$Summary.Capacity,0))
    }
    else {}
    [Math]: round (100 * ($Summary.Capacity - $Summary.FreeSpace + $Summary.Uncommitted)/$Summary.Capacity,0))
    }
    }},
    @{Name = 'MV'; Expression = {[string]: join (';', ($_.))} ExtensionData.Vm | ForEach-Object {Get-View-Id $_}). Name)}}.
    @{Name = "VMDK"; Expression = {[string]: Join (';', (& {}}
    $Datastore = $_
    $Datastore.ExtensionData.Vm |
    {ForEach-Object
    Notice-EEG-Id $_.
    Get-VIObjectByVIView |
    Get-hard drive |
    Where-Object {$_.} FileName-like "* $($Datastore.Name) *"} ".
    }
    }). File name)

    }} | Export-CSV $FileName - NoTypeInformation - UseCulture

    The easiest way is to make equal $DC to ' *'.

  • How to get the required connection pool data source?

    Hi we have created two pools of connections with two different userid to restrict access to the database. now I have 2 pools. so if I want to get the connection to a specific pool how to do this?

    Use the JNDI string. When you created your pools you created the jndi names. So when connecting to the data source, you specify jndi. That's how.

    Your postal code if you have a problem.

Maybe you are looking for

  • 7525 HP: PRINTING ENVELOPES WITH MACBOOK PRO USING HP7525

    I'm trying to print envelopes of invitation with my HP using MacBook Pro 7525.  I tried the main tray, but I get an error message about the Photo tray.  I'll cancel the print job, and then try the Photo tray, but the envelope comes out without printi

  • OfficeJet 4630 does not print on the network

    My printer print is no longer on a network connection, a USB connection. For example, when I try printer in MS Word, the menu of the printer displays "Unable connect", even though I'm perfectly connected to my printer. I've had this printer for about

  • HP Photosmart all-in-one scan button does not work - Windows 7

    "After you have reinstalled C4750 all-in-one software on my desk, I am constant flashes of" Windows configuration... TryApp ". In addition, the printer Scan to PC button does more work. Scans can only be initiated from PC. It would seem that the scan

  • Windows live photo gallery error code

    When I try to open my Gallery of photos that I receive wlxphotolibrarymain.dll error 0x800736b1

  • Processor upgrade: 8199-54U A30 for Pentium 4 Celeron

    Does anyone have experience upgrading a Thinkcentre A30 or any model of a Celeron Pentium 4 processor Thinkcentre?  For the A30 8199, the motherboard for the different models is identical - FRU 88P 8477.  So I guess I can run a Celeron or Pentium 4.