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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,278
Community Members
 
Community Events
177
Community Groups

How to apply SQL code to a certain row, Table transformer

Good day!

I have a table and would like to apply a code only to 2d row, and all further rows without code. 

My current code is below 

SELECT *,
(T1.'SC' - "120d")::Date->toLocaleDateString("en-AU") AS 'Verg specials',
FROM T1

 

when i publish it, all other rows get result invalid date 

Knipsel.PNG

2 comments

Hi @Ksenia Potroklova ,

Try to use conditions to exclude other rows - for example, here I exclude empty cells:

SELECT *,
CASE WHEN T1.'SC' IS NOT NULL
THEN (T1.'Date' - "120d")::Date->toLocaleDateString("en-AU")
END
AS 'Verg specials'
FROM T1

I also see that your third row is meant to contain text - maybe it will be better to rethink the table structure? The Table Transformer macro works with columns, not with rows. So, you may split your table into two tables, work with the part that contains dates (wrap it into the Table Transformer macro) and then with the help of another outer Table Transformer macro combine the tables back with the help of the standard Merge preset?

Like # people like this

Hi there,

As this question mentions our Table Filter and Charts for Confluence app, we are happy to introduce its new macro – Table Spreadsheet.

This new macro allows you to work with fully functional Excel spreadsheets right in Confluence. You’ll be able to use cells’ formulas, filters, conditional formatting, etc., create pivot tables and charts from the page view and edit modes.

The Table Spreadsheet macro is available for Cloud and Server/Data Center.

Like # people like this

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events