Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Using SQL Select – PB Docs 2018 – PowerBuilder Library

Using SQL Select – PB Docs 2018

Using SQL Select

In specifying data for a DataWindow object, you have more options
for specifying complex SQL statements when you use SQL Select as the
data source. When you choose SQL Select, you go to the SQL Select
painter, where you can paint a SELECT statement that includes the
following:

  • More than one table

  • Selection criteria (WHERE clause)

  • Sorting criteria (ORDER BY clause)

  • Grouping criteria (GROUP BY and HAVING clauses)

  • Computed columns

  • One or more arguments to be supplied at runtime

Saving your work as a query

While in the SQL Select painter, you can save the current SELECT
statement as a query by selecting File>Save As from the menu bar.
Doing so allows you to easily use this data specification again in
other DataWindows.

For more information about queries, see Defining queries.

To define the data using SQL Select:

  1. Click SQL Select in the Choose Data Source dialog box in the
    wizard and click Next.

    The Select Tables dialog box displays.

  2. Select the tables and/or views that you will use in the
    DataWindow object.

    For more information, see Selecting tables and
    views
    .

  3. Select the columns to be retrieved from the database.

    For more information, see Selecting
    columns
    .

  4. Join the tables if you have selected more than one.

    For more information, see Joining
    tables
    .

  5. Select retrieval arguments if appropriate.

    For more information, see Using retrieval
    arguments
    .

  6. Limit the retrieved rows with WHERE, ORDER BY, GROUP BY, and
    HAVING criteria, if appropriate.

    For more information, see Specifying
    selection, sorting, and grouping criteria
    .

  7. If you want to eliminate duplicate rows, select Distinct from
    the Design menu. This adds the DISTINCT keyword to the SELECT
    statement.

  8. Click the Return button on the PainterBar.

    You return to the wizard to complete the definition of the
    DataWindow object.

  9. Click OK.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x