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

Clarification on a SQL Query

Former Member
0 Likes
929

Hi Gurus,

Can anybody explain me the below query. what does it actually do.

SELECT SINGLE INCPO INTO TVLK-INCPO

FROM TVLK

WHERE LFART = 'EL'.

thanks,

Ram.

7 REPLIES 7
Read only

Former Member
0 Likes
856

Hi Ram,

The following query is fetching INCPO(Field) into TVLK-INCPO ( internal table field) from table TVLK where LFART = 'EL'.

Regards

Sourabh

Read only

0 Likes
856

Hi saurabh,

here, is TVLK intenal table or database table.

Read only

Former Member
0 Likes
856

Hi

SELECT SINGLE INCPO INTO TVLK-INCPO

FROM TVLK

WHERE LFART = 'EL'.

this will select single record of INCPO from TVLK table by checking the condition LFART = 'EL'.

Read only

Former Member
0 Likes
856

hi,

this 'single' will fetch one record depending upon the where condition

it is updating the incpo field with the value where LFART = 'EL'

regards,

pavan t.

Read only

Former Member
0 Likes
856

Ram,

SELECT SINGLE INCPO INTO TVLK-INCPO

FROM TVLK

WHERE LFART = 'EL'.

When you declare the TAbles statement it will allocate some memory(work area) to that table

TABLES :TVLK--database table.

selecting the data based on condition and putting into work area of table TVLK.

Read only

Former Member
0 Likes
856

Hi Ram,

If you define a statement TABLES followed by TVLK ..

It will create a WorkArea with the Structure of TVLK.

If this is your SELECT query..

SELECT SINGLE INCPO INTO TVLK-INCPO

FROM TVLK

WHERE LFART = 'EL'.

It will Fetch INCPO Value from the database table TVLK Where LFART equals to EL.

Regards.

Prabhu.

Read only

Former Member
0 Likes
856

Hi,

SELECT SINGLE INCPO INTO TVLK-INCPO

FROM TVLK

WHERE LFART = 'EL'.

In the above query , INCPO value which is related to LFART = 'EL', will be replaced in the internal table field TVLK_INCPO.

REgards,

kavitha