on 03-21-2018 2:01 AM
Hi all,
I'm working on a Sybase IQ 16 database that partitions data in distinct tables for each day, e.g:
my_table_20180320
my_table_20180319
my_table_20180318
....
Every day a new table is created and the oldest table is dropped.
I was wondering if it is possible to create a view that always selects everything from all tables with the name like "my_table_***"
I know this can be archieved with stored procedures, but I specifically need to create a View.
Any help is appreciated.
Could you instead partition by day of the month and instead of dropping and creating tables, truncate and repopulate?
The view could then union tables my_table_01 ... my_table_31. The selects for days 29, 30, and 31 would include
a where clause so it would only produce results in the appropriate months (don't forget leap years!).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wildcard tables are not currently supported in SAP IQ.
Your view definition must include all of the tables that you wish to include in the view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.