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

SELECT COUNT( ) gives warning in ECC6.0.

Former Member
0 Likes
481

Hi,

The following query is giving syntax error in ECC6.0, where as it worked absolutely fine in 3.1i server.

SELECT COUNT( OBOX_CNTNO ) FROM ZT2OB

INTO W_COUNT

WHERE SUPPL_CD = W_SUPPL_CD

AND INVC_NO = W_INVC_NO

AND INVC_LN_NO = T_SCR_ITEMS-INVC_LN_NO.

Error: "COUNT( OBOX_CNTNO )" is only valid in the extended form "COUNT( DIS

OBOX_CNTNO )" . . .

The query seems obsolete in ECC6.0. Can anybody help me to give valid query for this in ECC6.0?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
436

Hi,

<b>Count</b> functionality is to be used along with <b>Distinct</b> functionality.

COUNT( DISTINCT col )

<b>Reward points if this helps,</b>

Kiran

Hi,

The following query is giving syntax error in ECC6.0, where as it worked absolutely fine in 3.1i server.

SELECT COUNT( OBOX_CNTNO ) FROM ZT2OB

INTO W_COUNT

WHERE SUPPL_CD = W_SUPPL_CD

AND INVC_NO = W_INVC_NO

AND INVC_LN_NO = T_SCR_ITEMS-INVC_LN_NO.

Error: "COUNT( OBOX_CNTNO )" is only valid in the extended form "COUNT( DIS

OBOX_CNTNO )" . . .

The query seems obsolete in ECC6.0. Can anybody help me to give valid query for this in ECC6.0?

2 REPLIES 2
Read only

Former Member
0 Likes
436

The eroor is : "COUNT( OBOX_CNTNO )" is only valid in the extended form "COUNT( DISTINCT OBOX_CNTNO )" . . .

Read only

Former Member
0 Likes
437

Hi,

<b>Count</b> functionality is to be used along with <b>Distinct</b> functionality.

COUNT( DISTINCT col )

<b>Reward points if this helps,</b>

Kiran