Discussion:
#CHARFINDV :sqlout "0 row(s) selected"] |THEN|
(too old to reply)
z***@gmail.com
2020-11-05 09:09:20 UTC
Permalink
Hi ,
I'm new in Tandem, appreciate your expertise on how to output if ONLY there is a nos in the the result not "0 row(s) selected" . I try do some test but still the same . My simple script as below . Thanks in advance

#FRAME

#push sqlin sqlout

[#DEF :sqlin TEXT |BODY|
SET HEADINGS ON ;
SET PAGE_LENGTH ALL ;
SET LAYOUT SPACE 2 ;
SET LAYOUT RIGHT_MARGIN 80 ;
SET LIST_COUNT 0;
select CLASS, NAME
from =STUDENT
where NAME in
(Richard, Elissa, Adam)
Browse access;
List all;
]

SQLCI/NAME,INV :sqlin,OUTV :sqlout/
#OUTPUTV :sqlout
[#IF [#LINECOUNT :sqlout] > 0 |THEN| < --- if more than 0 then it will
run below command

RUN $STUD.RB.Study
]
#unframe
JShepherd
2020-11-05 17:42:09 UTC
Permalink
Post by z***@gmail.com
Hi ,
I'm new in Tandem, appreciate your expertise on how to output if ONLY there
is a
Post by z***@gmail.com
nos in the the result not "0 row(s) selected" . I try do some test but
still th
Post by z***@gmail.com
e same . My simple script as below . Thanks in advance
#FRAME
#push sqlin sqlout
[#DEF :sqlin TEXT |BODY|
SET HEADINGS ON ;
SET PAGE_LENGTH ALL ;
SET LAYOUT SPACE 2 ;
SET LAYOUT RIGHT_MARGIN 80 ;
SET LIST_COUNT 0;
select CLASS, NAME
from =STUDENT
where NAME in
(Richard, Elissa, Adam)
Browse access;
List all;
]
SQLCI/NAME,INV :sqlin,OUTV :sqlout/
#OUTPUTV :sqlout
[#IF [#LINECOUNT :sqlout] > 0 |THEN| < --- if more than 0 then it will
run below command
RUN $STUD.RB.Study
]
#unframe
#FRAME

#push sqlin sqlout
#set #inlineprefix +

[#if NOT [#empty [#inlineprocess] ] |then|
#inlineeof
]

sqlci /name, inline, outv sqlout/

+ SET HEADINGS ON ;
+ SET PAGE_LENGTH ALL ;
+ SET LAYOUT SPACE 2 ;
+ SET LAYOUT RIGHT_MARGIN 80 ;
+ SET LIST_COUNT 0;

== clear the output variable
#set sqlout

+ select CLASS, NAME
+ from =STUDENT
+ where (NAME = "Richard" OR
+ NAME = "Elissa" OR
+ NAME = "Adam")
+ Browse access;
+ List all;

== debug output text
[#output [sqlout]]

[#IF [#LINEFINDV sqlout 1 "-- 0 row(s)"] = 0 |THEN|
RUN $STUD.RB.Study
]

#inlineeof

#unframe

Loading...