Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Add Column in Table in SQL in confluence

Dhiraj Kr_ Gupta February 14, 2024

I want to add a column in SQL(made from table transformer) using Alter Table

I have written the code

ALTER TABLE Table1 ADD STATUS varchar(255)

But it is giving error like Parse error Expecting 'COLUMN' got 'LITERAl'


Can you solve the problem

If you help me also to apply condition like when and then

1 answer

3 votes
Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2024

Hi @Dhiraj Kr_ Gupta ,

The Table Transformer macro is based on the AlaSQL library, you can find plenty of different code examples in our documentation.

What concerns statuses that are inserted using a condition (it is a "CASE WHEN" statement for the macro), you may check this example:

It should help your case.

If somehow you are still stuck, please refer to our support. Attach the page storage format (upper right corner -> menu ... -> View storage format) to the ticket: we'll be able to recreate your source table and your macro and help you with the query.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events