C
Csaba Gabor
I'd like to be able to loop through all the entries in a semicolon
separated list in a single string. How should I do it?
Specifically, I have an sqlite database where one of the fields is
a semicolon separated list of entries. I can easily get the nonempty
fields like so (and boy those line continuation characters (^) are picky):
FOR /F "tokens=1,* delims=:" %%G ^
IN ('c:\sqlite.exe c:\Mydb^
"SELECT Id||':'||myList FROM myTable;"')^
DO @ECHO %%G-^>%%H
But what I really need to be able to do is to loop through that
semicolon separated list in %%H (and stuff each element from
it into another variable, call it %%K). For my purposes it
would probably be sufficient if you could show me how to print
out individually each item in %%H on a separate line.
Thanks,
Csaba Gabor (a batch file newbie)
separated list in a single string. How should I do it?
Specifically, I have an sqlite database where one of the fields is
a semicolon separated list of entries. I can easily get the nonempty
fields like so (and boy those line continuation characters (^) are picky):
FOR /F "tokens=1,* delims=:" %%G ^
IN ('c:\sqlite.exe c:\Mydb^
"SELECT Id||':'||myList FROM myTable;"')^
DO @ECHO %%G-^>%%H
But what I really need to be able to do is to loop through that
semicolon separated list in %%H (and stuff each element from
it into another variable, call it %%K). For my purposes it
would probably be sufficient if you could show me how to print
out individually each item in %%H on a separate line.
Thanks,
Csaba Gabor (a batch file newbie)