473,241 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Newbie with basic question about formatting

1
Here is my query:

Expand|Select|Wrap|Line Numbers
  1. SELECT departments.department_name AS "Department name", locations.STREET_ADDRESS AS "Mailing address", locations.city, locations.state_province, locations.postal_code
  2. FROM departments, locations
  3. WHERE departments.location_id = locations.location_id
  4. AND locations.country_id = 'US'
  5. ORDER BY department_name;
and here is what the output is like:

Expand|Select|Wrap|Line Numbers
  1. Department name                Mailing address
  2. ------------------------------ ----------------------------------------
  3. CITY                           STATE_PROVINCE            POSTAL_CODE
  4. ------------------------------ ------------------------- ------------
  5. Administration                 2004 Charade Rd
  6. Seattle                        Washington                98199
  7. IT                            2014 Jabberwocky Rd
  8. Southlake                      Texas                     26192
  9.  
  10.  
my query needs to list department names and mailing addresses of the departments located in the U.S. My current query accomplishes the result fine but the formatting is wrong because I need it to look like this (it's an sql excercise, I'm a newbie):

Expand|Select|Wrap|Line Numbers
  1. Department Name                Mailing Address
  2. ----------------------                -----------------------------------------------------
  3. Administration                     2004 Charade Rd, Seattle, Washington 98199
  4. IT                                2014 Jabberwocky Rd, Southlake, Texas 26192
  5.  
How can I do this?

Thanks for your time.

PS: it doesn't matter if the displayed data is folded because of the number of lines allowed.
Aug 5 '07 #1
2 1087
Mala232
16
Hi,

Use set linesize 100 or more number to fit in the screen

SQL> SET LINESIZE 100;
SQL> type your query here
Aug 5 '07 #2
debasisdas
8,127 Expert 4TB
SQL*PLUS has some default setting , as per that it can display 80 chars per line and 14 lines per page . After the specified value the display will move to next line / page. to change the default values

ex
--------

set line 120

(maximun 32767)

set pages 50
(maximum 50000)

u can also do the same from the menu by changing the environment variables.
Aug 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ray | last post by:
Date problem. Using non American date formats with Microsoft Access and Visual Basic. I set my regional settings to English(Ireland) or English(United Kingdom) and my date appears in Access as...
2
by: | last post by:
Hi All, I am sending an email containing the string data for eg . string subject ="New client"; from my web service. I want that string data to be appearted as bold in the email. I know this...
2
by: notAclueabouthtml | last post by:
Hi all, Well, I think that I have bit off more than I can chew. I believe that I would benefit from a private tutor of sorts. but here goes. I am in charge of my kids middle school "giving fund"....
0
by: dokmanc | last post by:
I've reproduced the same simple example shown in this MS KB article. http://support.microsoft.com/kb/307021/ The example shows how to use an XLS file to appy formatting to an XML dataset and...
8
by: Markus Pitha | last post by:
Hello, first of all I have a question about types: When I have a method like this... TYPE getStringValue() { string str = "test"; return str; }
0
by: Rauf Sarwar | last post by:
Originally posted by dreimer You have to use ODBC/ADO etc to connect to the database. I don't know the exact syntax but you can search in comp.lang.visual.basic NG. Another suggestion.... dump...
6
by: raylopez99 | last post by:
Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? Subject: Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? My...
3
Lokean
by: Lokean | last post by:
Sorry for this newbie question, this is not my realm of expertese. I have searched google, tried several applications that claim they can do this, such as Mapforce, which I found confusing, to...
24
by: cplxphil | last post by:
Hi, Does anyone know if it's possible to post to a page without using a form? For example, if I want to pass a variable to another page without using a cookie, is there a way to pass it using...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.