Display the field in a table as markdown link #595
castlekaybee
started this conversation in
General
Replies: 3 comments 2 replies
|
Hi, Here is an example of how I do that : SELECT
'table' as component,
'action' as markdown,
1 as sort,
1 as search;
SELECT
s.Name as Saison,
co.Name as Nom,
to_char(co.StartDate,'DD/MM/YYYY') as "Date de début",
to_char(co.EndDate,'DD/MM/YYYY') as "Date de fin",
to_char(co.DeliveryDate,'DD/MM/YYYY') as "Date de livraison",
'[Mettre à jour](./Campaign.sql?id=' || CampagnOrderId ||')' ||
' - [Voir les commandes](/order/Orders.sql?coid=' || CampagnOrderId ||')'
as Action
FROM CampagnOrder co
JOIN Season s on co.SeasonId=s.SeasonId
WHERE s.StartDate<=CURRENT_TIMESTAMP AND CURRENT_TIMESTAMP<=s.EndDate
ORDER BY co.StartDate DESC, co.Name; |
0 replies
|
Hello ! What you say you tried seems syntactically correct, bit logically a bit usual. If you need to include data from another table, then what you probably want is a join. |
0 replies
|
In order to keep it general, let's stick with the sqlpage example: select 'table' as component, 'action' as markdown;
select *, format('[Edit](edit.sql?id=%s)', id) as action from users;What I want is instead of the Text "Edit" I want to include a select statement select 'table' as component, 'action' as markdown;
select *, format('[' || (SELECT someTextColumn FROM someTable WHERE textID = 2) || '](edit.sql?id=%s)', id) as action from users; |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
From the examples:
How to display instead of the static text "Edit" the value from an SQL (SQLite) query?
I tried:
All reactions