Member since
04-25-2018
5
Posts
1
Kudos Received
0
Solutions
09-21-2022
10:50 PM
Try using length function where length(company name ) >1
... View more
05-01-2020
12:23 AM
2 Kudos
This is old thread, but I have found a workaround, so would like to share here. Assuming I have a table with with a few partitions: SHOW PARTITIONS partitioned_table; +------------+--+ | partition | +------------+--+ | p=1 | | p=2 | | p=3 | | p=4 | | p=5 | +------------+--+ 1. create a macro: CREATE TEMPORARY MACRO partition_value() '1'; 2. create view using the macro: CREATE VIEW view_test AS SELECT * FROM partitioned_table WHERE p = partition_value(); 3. query the view: SELECT * FROM view_test; 4. if you want to update the value returned by the Macro, you need to DROP and CREATE it again: DROP TEMPORARY MACRO partition_value; CREATE TEMPORARY MACRO partition_value() '4'; 5. If you exit the session, also need to create it again in the next login, as Macro will be destroyed after session ends.
... View more