I want to CREATE table from another table I tried below code
CREATE TABLE AS tbl_01
As
SELECT a.col1 c1, a.col2 c2, MAX(a.col3 c3)
FROM tbl a
WHERE flag= 2
GROUP BY col1, col2
This query run, but When I am going to expand column in datatabse explorer it gives error Conversion from type DBNULL to type Integer is not valid
Put alias outside braces in max function and try. Also you use as
twice. COrrected that.
CREATE TABLE tbl_01
As
SELECT a.col1 c1, a.col2 c2, MAX(a.col3) c3
FROM tbl a
WHERE flag= 2
GROUP BY col1, col2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With