Yong Scott
asked on
put the output into new column in the table
I want put the output into new column in the table but error
#1136 - Column count doesn't match value count at row 1
INSERT INTO nov (ingb)
select disk_space_size,
CAST(left(disk_space_size, locate(' ', disk_space_size)) AS DECIMAL(10,2))
*
CASE WHEN RIGHT(disk_space_size, 2) = 'GB' then 1.0
when RIGHT(disk_space_size, 2) = 'TB' then 1024.0
when RIGHT(disk_space_size, 2) = 'MB' then 1.0/1024
else 1.0
end
inGB
from nov;
#1136 - Column count doesn't match value count at row 1
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you , you help me alot :)
Remove the disk_space_size column from the query, like this (not sure if the rest of the query is correct though...)
Open in new window
»bp