Ahh I think I see what you're trying to do. Because you have multiple
filenames I think you'd have to strip each one. I haven't tested this code,
just winging it, but something like this might work. This would load each
filename into the table. The only problem you might have is if the filenames
contain spaces.
set var vloop int = 1
while 1 = 1 then
set var vtext = (ssub(.vfilename,.vloop))
if vtext is null then
break
endif
insert into tfilename (filen) values (.vtext)
set var vloop = (.vloop + 1)
endwhile
Karen
-----Original Message-----
From: Claudine Robbins <[email protected]>
To: rbase-l <[email protected]>
Sent: Wed, Aug 1, 2018 2:04 pm
Subject: RE: [RBASE-L] - Picking and Renaming Windows Files
Karen,
I tried at least half a dozen combinations including:
R>INSERT INTO tfilename SELECT ALL FROM &vfilename
-ERROR- Syntax error (2367)
And get syntax errors…
Claudine
From: karentellef via RBASE-L [mailto:[email protected]]
Sent: Wednesday, August 01, 2018 1:10 PM
To: [email protected]
Subject: Re: [RBASE-L] - Picking and Renaming Windows Files
Claudine: This syntax doesn't look right. Either you would use VALUES or
SELECT, but not both
INSERT INTO tfilename (FILEN) VALUES (FILEN) SELECT ALL FROM &vfilename
Karen
-----Original Message-----
From: Buddy Walker <[email protected]>
To: rbase-l <[email protected]>
Sent: Wed, Aug 1, 2018 1:03 pm
Subject: RE: [RBASE-L] - Picking and Renaming Windows Files
Claudine
Since you have commas in the file I would think you have to load the table
instead of insert.
Buddy
From: [email protected] <[email protected]>On Behalf Of Claudine
Robbins
Sent: Wednesday, August 1, 2018 1:21 PM
To: [email protected]
Subject: [RBASE-L] - Picking and Renaming Windows Files
Hi all,
I’m trying to capture multiple file names to rename them. The following code
gives me the error: “ERROR-Incorrect number of values for this table (118)”.
It appears I may need quotes around each value. Any easy way to do this?
TIA,
Claudine
PLUGINS LoadFileNamePlus vFileName +
|INITIAL_DIR C:\iex_x\CHRISPREP +
|TITLE 'Select file' +
|FULLPATH ON +
|NO_CHANGE_DIR ON +
|FILTER PDF Files (*.PDF)#*.PDF +
|HIDE_READ_ONLY ON +
|MULTISELECT ON +
|SHOW_HIDDEN OFF +
|ENABLE_SIZING ON +
|VIEW_MODE LIST
SET VAR vfilename = ( '('+.vfilename+')' )
SET ERROR MESSAGE 2058 OFF
DROP TABLE `tFileName` NOCHECK
SET ERROR MESSAGE 2058 ON
CREATE TEMP TABLE `tFileName` (`FILEN` TEXT (40))
R>INSERT INTO tfilename (FILEN) VALUES (FILEN) SELECT ALL FROM &vfilename
-ERROR- Incorrect number of values for this table ( 118)
R>sho v vfilename
(C:\IEX_X\CHRISPREP\ACME-54572
05-BU-0702181107AU.pdf,C:\IEX_
X\CHRISPREP\ACME-5457205-07021
81107AU.pdf,C:\IEX_X\CHRISPREP
\ACME-5457205-INV-0702181107AU
.pdf)
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
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
[email protected].
For more options, visit https://groups.google.com/d/optout.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
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
[email protected].
For more options, visit https://groups.google.com/d/optout.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
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
[email protected].
For more options, visit https://groups.google.com/d/optout.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
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.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
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.