cancel
Showing results for 
Search instead for 
Did you mean: 

How to format sv for variable usage??

planefan
Contributor
Hey Everyone, 
I'm trying to retrieve a trade table from path location built using sv.

I want to use symbol variable "name" to complete the path.

e.g:
path:` sv `:C:/q/start/tick`name`trades;

I get a type error when running the above.

When I try to cast "name" as a symbol:

path:` sv `:C:/q/start/tick`$ name`trades;

I get ` error with the symbol value of the variable "name" printed out. 

Any help is appreciated!
2 REPLIES 2

19craigdn
New Contributor
Hi ticktick,
In your first statement, you're putting name in as a literal instead of as the variable you defined. I would do something like:
path:` sv `:C:/q/start/tick,name,`trades;
where name refers to the symbol variable now and is just joined to the other two symbols with commas. If you have:
name:`a
the first line will give you:
`:C:/q/start/tick/a/trades
as a result.
Hope this helps,
Craig

That did it, thanks!