-
How to add a column to the Partition table?
Hi, Masters:
Because a new field should be added to the Partition table. But it seems there’s problem that I met.
First of all, the trade table was paritioned by:
q)`:E:/testfolder/pdb/2023.06.01/trade/ set .Q.en[`:E:/testfolder/pdb;] ([] ti:09:30:00 09:31:00; s:`ibm`msft; p:101 33f);
q)`:E:/testfolder/pdb/2023.06.02/trade/ set .Q.en[`:E:/testfolder/pdb;] ([] ti:09:30:00 09:31:00; s:`ibm`msft; p:101.5 33.5);
q)l E:/testfolder/pdbIt works while I select data from the trade table. And secondly, I added a filed(rk) to the trade table:
q)`:E:/testfolder/pdb/2023.06.05/trade/ set .Q.en[`:E:/testfolder/pdb;] ([] rk:1 2; ti:09:30:00 09:31:00; s:“ibm`msft; p:108.6 26.2);
q)`:E:/testfolder/pdb/2023.06.06/trade/ set .Q.en[`:E:/testfolder/pdb;] ([] rk:1 2; ti:09:30:00 09:31:00; s:`ibm`msft; p:110.1 25.6);The new field(rk) can be input, but once I select from trade table with date specified, there’re different output:
1. q)select from trade where date within (2023.06.05, 2023.06.06)
It works fine.
2. q)select from trade where date = 2023.06.01
There’s error message:
‘./2023.06.01/trade/rk. OS reports: can’t find directory
[0] select from trade where date = 2023.06.01Do you konw the reason and how to fix it? Thanks!
Log in to reply.