|
Hi Vern,
Thanks for your reply.
I tried...
CREATE OR REPLACE VARIABLE @rows INTEGER; <=== This works successfully
GET DIAGNOSTICS @rows = ROW_COUNT ;
But this errors on @rows with error message: Message: [SQL0104] Token
@ROWS was not valid.
Any suggestions
Don
From: "Vernon Hamberg" <vhamberg@xxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion"
<midrange-l@xxxxxxxxxxxxxxxxxx>
Date: 18/06/2020 08:30 AM
Subject: Re: ACS Run SQL Scripts - define a variable
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>
Hi Don
You should be able to - CREATE VARIABLE somename as datatype, then use
somename where you see :Rows = just don't use the semi-colon.
It's very cool!
To see the value, there is a tab at the bottom for global variables -
click on it and click on Refresh - Ba-Da-Boom!
For the longest time I didn't know at all how to do things with global
variables - got lucky one day just fooling around!
Regards
Vern
On 6/17/2020 5:27 PM, Don Brown via MIDRANGE-L wrote:
In a post from Jon Paris on a different thread Jon suggested usingreasonable precautions to ensure no viruses are present in this email, MSD
exec sql GET DIAGNOSTICS :Rows = ROW_COUNT ; to get the number of rows
returned by the previous select.
Is it possible to do this in the ACS run SQL Scrips - How can I define a
variable to receive the row count into ?
Thanks
Don
______________________________________________________________________
This email has been scanned for computer viruses. Although MSD has taken
cannot accept responsibility for any loss or damage arising from the use
of this email or attachments.
______________________________________________________________________
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.