• No results found

IPF SQL Interface

10.4. Query Result Output

10.4.2. Using SQL Full-Screen Mode

In IPF line mode, some SQL queries produce too much information for you to use. For example

• Results can scroll off the screen faster than you can read.

• Results might be too wide to fit on a single line of the screen, making them hard to understand.

• Sometimes you may need to abort the output from a query because the amount of information it produces is just too large. For example, if you have a large database, you can have thousands of rows of data coming from a query.

In these cases, you can direct the output to a file, as described in 9.4.1. But if all you need is to slow the query results and make the output easier to read, you may find the SQL full-screen mode helpful.

SQL full-screen mode is not the same as IPF screen mode. IPF screen mode does keep output from scrolling off the screen so fast that you cannot read it, and it lets you abort long output listings. But if the output from a query produces rows too wide to fit on one line on the screen, IPF screen mode does nothing to make them more readable.

SQL full-screen mode, an enhancement to the IPF screen mode, provides for SQL query output that is too wide and too lengthy for line mode or IPF screen mode.

Format

To use SQL full-screen mode, first enter IPF screen mode by entering MODE SCREEN

For more information on using IPF in full-screen mode, see the IPF Command Language User’s Guide.

Note: You can use the IPF OUT command to redirect output to a file in IPF screen mode if $SQLSCREEN is FALSE. If $SQLSCREEN is TRUE, IPF ignores the OUT command.

After entering MODE SCREEN, you are in IPF screen mode. Now enter the following on the command line to use SQL full-screen mode:

The screen looks the same as before; however, SQL queries now receive special handling as discussed in the rest of this subsection.

Notes:

1. The default value of $SQLSCREEN is FALSE. To use the SQL full-screen mode feature, you must set $SQLSCREEN to TRUE.

2. For SQL queries to receive special handling, both $SQLSCREEN must be TRUE and you must execute a MODE SCREEN command.

3. When you have both MODE SCREEN set and $SQLSCREEN is TRUE, only SQL queries are affected. All other IPF operations function as they normally do in IPF screen mode.

4. When $SQLSCREEN is set to TRUE, the maximum character size of a retrieved row is 2800. When $SQLSCREEN is set to FALSE, the maximum character size of a retrieved row is 12000.

In SQL full-screen mode, you see one screen at a time. You control when the next screen is presented. And if the output is too wide for one line, you can shift the output to the left and back to the right as needed. Use the fields at the bottom of the screen to specify whether you want the next screen of output or a shift to the right or left. You can specify the number of characters to shift using the right or left fields, or you can let the IPF SQL Interface shift a screen width automatically. You can also put the number of lines to scroll forward in the go field. You cannot scroll backwards.

When you have seen all the output, or if you want to discard unwanted output, transmit from the done field.

Example

In this example, which includes eight screens, the SQL statement was intentionally designed to produce too much output for line mode to handle conveniently.

STOREN at VINTNU UM---- ---name--- ---address--- ---city---e- -zip- M----

1 trumpetvine wines trumpetvine court berkeley ca 94704 1

1 trumpetvine wines trumpetvine court berkeley ca 94704 2

1 trumpetvine wines trumpetvine court berkeley ca 94704 3

1 trumpetvine wines trumpetvine court berkeley ca 94704 4

1 trumpetvine wines trumpetvine court berkeley ca 94704 5

1 trumpetvine wines trumpetvine court berkeley ca 94704 6

1 trumpetvine wines trumpetvine court berkeley ca 94704 7

1 trumpetvine wines trumpetvine court berkeley ca 94704 8

1 trumpetvine wines trumpetvine court berkeley ca 94704 9

2 freds market 1940 university ave. berkeley ca 94704 1

2 freds market 1940 university ave. berkeley ca 94704 2

2 freds market 1940 university ave. berkeley ca 94704 3

2 freds market 1940 university ave. berkeley ca 94704 4

2 freds market 1940 university ave. berkeley ca 94704 5

2 freds market 1940 university ave. berkeley ca 94704 6

2 freds market 1940 university ave. berkeley ca 94704 7

2 freds market 1940 university ave. berkeley ca 94704 8

2 freds market 1940 university ave. berkeley ca 94704 9

3 college ave. liquor 1300 college ave. oakland ca 94577 1

3 college ave. liquor 1300 college ave. oakland ca 94577 2

go ____ left ____ right ____ done __

To shift the screen a screen width to the right, transmit from the right field:

---NAME--- ---LOCATION--- joseph phelps vineyards st. helena ca

long vineyards st. helena ca almaden vineyard san jose ca beringer vineyards st. helena ca geyser peak vineyards geyserville ca fetzer vineyards redwood city ca beaulieu vineyard rutherford ca grgich hills cellar rutherford ca inglenook vineyards san francisco ca joseph phelps vineyards st. helena ca long vineyards st. helena ca almaden vineyard san jose ca beringer vineyards st. helena ca geyser peak vineyards geyserville ca fetzer vineyards redwood city ca beaulieu vineyard rutherford ca grgich hills cellar rutherford ca inglenook vineyards san francisco ca joseph phelps vineyards st. helena ca long vineyards st. helena ca

Transmit from the left field to get back to column 1, and then transmit from the go field to get the next screen:

STOREN at VINTNU UM---- ---name--- ---address--- ---city--- e- -zip- M---

3 college ave. liquor 1300 college ave. oakland ca 94577 3

3 college ave. liquor 1300 college ave. oakland ca 94577 4

3 college ave. liquor 1300 college ave. oakland ca 94577 5

3 college ave. liquor 1300 college ave. oakland ca 94577 6

3 college ave. liquor 1300 college ave. oakland ca 94577 7

3 college ave. liquor 1300 college ave. oakland ca 94577 8

3 college ave. liquor 1300 college ave. oakland ca 94577 9

4 the wine shoppe 105 university walk berkeley ca 94704 1

4 the wine shoppe 105 university walk berkeley ca 94704 2

4 the wine shoppe 105 university walk berkeley ca 94704 3

4 the wine shoppe 105 university walk berkeley ca 94704 4

4 the wine shoppe 105 university walk berkeley ca 94704 5

4 the wine shoppe 105 university walk berkeley ca 94704 6

4 the wine shoppe 105 university walk berkeley ca 94704 7

4 the wine shoppe 105 university walk berkeley ca 94704 8

4 the wine shoppe 105 university walk berkeley ca 94704 9

5 epstein wine vine 1000 liquor lane richmond ca 94777 1

5 epstein wine vine 1000 liquor lane richmond ca 94777 2

5 epstein wine vine 1000 liquor lane richmond ca 94777 3

5 epstein wine vine 1000 liquor lane richmond ca 94777 4

go ____ left ____ right ____ done __

To shift the screen a screen width to the right, transmit from the right field:

---NAME--- ---LOCATION--- almaden vineyard san jose ca

beringer vineyards st. helena ca geyser peak vineyards geyserville ca fetzer vineyards redwood city ca beaulieu vineyard rutherford ca grgich hills cellar rutherford ca inglenook vineyards san francisco ca joseph phelps vineyards st. helena ca long vineyards st. helena ca almaden vineyard san jose ca beringer vineyards st. helena ca geyser peak vineyards geyserville ca fetzer vineyards redwood city ca beaulieu vineyard rutherford ca grgich hills cellar rutherford ca inglenook vineyards san francisco ca joseph phelps vineyards st. helena ca long vineyards st. helena ca almaden vineyard san jose ca beringer vineyards st. helena ca

Transmit from the left field to get back to column 1, and then transmit from the go field to get the next screen:

STOREN at VINTNU UM---- ---name--- ---address--- ---city--- e- -zip- M---

5 epstein wine vine 1000 liquor lane richmond ca 94777 5

5 epstein wine vine 1000 liquor lane richmond ca 94777 6

5 epstein wine vine 1000 liquor lane richmond ca 94777 7

5 epstein wine vine 1000 liquor lane richmond ca 94777 8

5 epstein wine vine 1000 liquor lane richmond ca 94777 9

6 northside wines 130 euclid ave. berkeley ca 94711 1

6 northside wines 130 euclid ave. berkeley ca 94711 2

6 northside wines 130 euclid ave. berkeley ca 94711 3

6 northside wines 130 euclid ave. berkeley ca 94711 4

6 northside wines 130 euclid ave. berkeley ca 94711 5

6 northside wines 130 euclid ave. berkeley ca 94711 6

6 northside wines 130 euclid ave. berkeley ca 94711 7

6 northside wines 130 euclid ave. berkeley ca 94711 8

6 northside wines 130 euclid ave. berkeley ca 94711 9

7 j.v. liquor 1614 university ave. berkeley ca 94706 1

7 j.v. liquor 1614 university ave. berkeley ca 94706 2

7 j.v. liquor 1614 university ave. berkeley ca 94706 3

7 j.v. liquor 1614 university ave. berkeley ca 94706 4

7 j.v. liquor 1614 university ave. berkeley ca 94706 5

7 j.v. liquor 1614 university ave. berkeley ca 94706 6

To shift the screen a screen width to the right, transmit from the right field:

---NAME--- ---LOCATION--- geyser peak vineyards geyserville ca

fetzer vineyards redwood city ca beaulieu vineyard rutherford ca grgich hills cellar rutherford ca inglenook vineyards san francisco ca joseph phelps vineyards st. helena ca long vineyards st. helena ca almaden vineyard san jose ca beringer vineyards st. helena ca geyser peak vineyards geyserville ca fetzer vineyards redwood city ca beaulieu vineyard rutherford ca grgich hills cellar rutherford ca inglenook vineyards san francisco ca joseph phelps vineyards st. helena ca long vineyards st. helena ca almaden vineyard san jose ca beringer vineyards st. helena ca geyser peak vineyards geyserville ca fetzer vineyards redwood city ca

go ____ left ____ right ____ done __

Transmit from the left field to get back to column 1, and then transmit from the go field to get the next screen:

STOREN at VINTNU UM---- ---name--- ---address--- ---city--- e- -zip- M--- 7 j.v. liquor 1614 university ave.berkeley ca 94706 7 7 j.v. liquor 1614 university ave.berkeley ca 94706 8 7 j.v. liquor 1614 university ave.berkeley ca 94706 9 63 records selected

Note the 23 entered in the right field on the preceding screen. Entering 23 and

transmitting from that position causes the IPF SQL Interface to shift the next screen only 23 columns to the right instead of the default screen width and results in the following screen:

st

at VINTNU

--- ---address--- ---city--- e- -zip- M--- ---NAME--- 1614 university ave. berkeley ca 94706 7 beaulieu vineyard 1614 university ave. berkeley ca 94706 8 grgich hills cellar 1614 university ave. berkeley ca 94706 9 inglenook vineyards

go ____ left ____ right ____ done __

Related documents