can any one advise how I would run a db Maintenance step on a hdb to update
a table where column called "true" holds boolean values 1b 0b.
I want to update to Y where column true =1b and N where 0b
Would fnCol we sufficient?
-
3What have you tried so far? StackOverflow expects you to try to solve your own problem first, as your attempts help us to better understand what you want. Please edit the question to show what you've tried, and show a specific roadblock you're running into with a minimal reproducible example. For more information, please see How to Ask.Toby Speight– Toby Speight2025-04-29 12:10:48 +00:00Commented Apr 29 at 12:10
Add a comment
|
1 Answer
Yes, fnCol will be sufficient. The exact command depends on whether you want the Y/N to be chars or symbols.
Either way in the fnCol function you can use a vector conditional to perform the update, e.g.:
?[0101b;`Y;`N] or ?[0101b;"Y";"N"]
If you are using symbols you will have to enumerate against the symfile, so your final fnCol function might look something like:
{(` sv x,`sym)? ?[y;`Y;`N]}[`:/path/hdb;]