Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table Fetching

Former Member
0 Likes
869

Without using SELECT *, is there any way to pick all the fields of a table?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
849

hi,

there is no other way to pick other than select*

7 REPLIES 7
Read only

Former Member
0 Likes
850

hi,

there is no other way to pick other than select*

Read only

former_member404244
Active Contributor
0 Likes
849

Hi,

If u want all the fields from the data base table then SELECT * is the best way..Thre is no other way...else u have to spcify all the fields.

Regards,

nagaraj

Read only

Former Member
0 Likes
849

Tx

Read only

Former Member
0 Likes
849

Tx

Read only

0 Likes
849

Hi santo,

U didn't give points to both of us??

Reagrds,

Nagaraj

Read only

RemiKaimal
Active Contributor
0 Likes
849

Hello,

You can, without explicitly writing a select statement using Logical databases.

As you must be knowing your LDB name can be specified in Goto->attributes in Attributes group :

Specify F1S (for BC: Planned flights, flights and bookings)

save and activate your report pgm.

Check out this sample code :


NODES: spfli, sflight.

FIELD-GROUPS: header, flight_info, flight_date.

START-OF-SELECTION.
  INSERT: spfli-carrid spfli-connid sflight-fldate
          INTO header,
          spfli-cityfrom spfli-cityto
          INTO flight_info.

GET spfli.
  EXTRACT flight_info.

GET sflight.
  EXTRACT flight_date.

END-OF-SELECTION.
  SORT STABLE.
  LOOP.
    AT FIRST.
      WRITE / 'Flight list'.
      ULINE.
    ENDAT.
    AT flight_info WITH flight_date.
      WRITE: / spfli-carrid , spfli-connid, sflight-fldate,
               spfli-cityfrom, spfli-cityto.
    ENDAT.
    AT flight_date.
      WRITE: / spfli-carrid , spfli-connid, sflight-fldate.
    ENDAT.
    AT LAST.
      ULINE.
      WRITE: cnt(spfli-carrid), 'Airlines'.
      ULINE.
    ENDAT.
  ENDLOOP.

Also note usage of LDB has slower performance than a normal select statement

Regards,

Remi

Read only

Former Member
0 Likes
849

select * is the best way. else you have to specify all the fields in your select statement.

Kishore.