Claudine,
The timing of your post couldn't have been better.
Yes, you can!
In your specific case ...
You will have to create an additional variable to
build the string which is the "values" part of the insert.
When you finally go to use that variable, use the
"&" prefix instead of the "." prefix.
Here is the key part of an example from one of my application ...
-- Predefined variables and logic is defined here ...
SET VAR vValue TEXT
WHILE vWorkingOn <> vLFNFileCount THEN
SET VAR vWorkingOn = (.vWorkingOn + 1)
SELECT (MAX(External_File_ID)+1) INTO
vExternal_File_ID INDIC iv1 FROM External_Files
-- Build the string with needed file names
set var vValue = ('(' + '.vExternal_File_ID')
set var vValue = (.vValue + ',' + '.vLFNFileNameS' + CTXT(.vWorkingOn))
set var vValue = (.vValue + ',' + '.vLFNFileExt'+(CTXT(.vWorkingOn)))
set var vValue = (.vValue + ',' + '.vLFNFileDateTime'+(CTXT(.vWorkingOn)))
set var vValue = (.vValue + ',' + '.vLFNFileSize'+(CTXT(.vWorkingOn)))
set var vValue = (.vValue + ',' +
'.vLFNFilePath'+(CTXT(.vWorkingOn)) + ')')
-- Now use this string for the value part of the insert
INSERT INTO External_Files +
(External_File_ID, +
External_File_Name, +
External_File_Extension, +
External_File_DateTime, +
External_File_Size, +
External_File_Original_Path) +
VALUES +
&vValue
ENDWHILE
RETURN
Hope that helps!
Very Best R:egards,
Razzak
At 09:05 PM 8/6/2017, Claudine Robbins wrote:
SET VAR VCOUNT = 1
SET VAR yylading TEXT = ('Vlad'+(CTXT(.VCOUNT)))----vlad1
SET VAR &yylading TEXT = NULL-----same as vlad1 = NULL
SELECT LADING INTO &yylading INDICATOR ivlad
FROM orders WHERE (dtg+split) = .ventry
R>sho v vlad1
LOAD FROM SEABOARD-CORPUS:
[1] 5-1/8" X 15 MANUAL VALVE,
BOLTS, RING GASKETS ***
LOAD FROM BASIC
ENERGY-CORPUS: [1] 5-1/8" X
15 MANUAL VALVE, BOLTS, RING
GASKETS
I’m trying to do something which is NOT in the
whitepaper dotted vs. ampersand variables.
I’m in a 4 count while loop, so as vcount is
incremented field vlad becomes vlad1, vlad2, vlad3, and vlad4.
My select correctly acquires the lading
value. Before I increment vcount = (.vcount
+1), I want to load vlad1 in a temporary table.
INSERT INTO tempTBL VALUES (????). I’ve tried
(&yylading), &yylading (error), '&yylading',and
'.yylading' . All I manage to get is &yylading,
.yylading or vlad1 but not the actual value contained in vlad1.
I don’t have any great hopes that this can be
done but what the heck, I thought I’d ask anyway…
--
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.