This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-06
Channels
- # babashka (31)
- # beginners (108)
- # calva (6)
- # clj-kondo (62)
- # cljsrn (5)
- # clojure (29)
- # clojure-australia (2)
- # clojure-europe (17)
- # clojure-nl (2)
- # clojure-spec (5)
- # clojure-uk (7)
- # clojurescript (25)
- # code-reviews (1)
- # datomic (13)
- # deps-new (7)
- # editors (1)
- # emacs (31)
- # figwheel-main (3)
- # garden (4)
- # graalvm (18)
- # helix (10)
- # improve-getting-started (12)
- # jobs (3)
- # lsp (20)
- # malli (12)
- # off-topic (7)
- # polylith (30)
- # re-frame (10)
- # remote-jobs (2)
- # shadow-cljs (18)
- # spacemacs (5)
- # sql (11)
- # tools-deps (10)
- # vim (9)
- # xtdb (1)
Hi all, I have a table called portal and it is having a column called status_id.
seq_id | segment | exp
-------------+--------+-----------
20 | 1 | -1
25 | 1 | -1
23 | 1 | -1
22 | 1 | -1
19 | 1 | -1
26 | 1 | -2
21 | 1 | -1
24 | 1 | -1
Now there is another table called info, and it is having a JSONB column called experience.
id | seg_id | experience
----+--------+--------------------
20 | 1 | {"work": 0}
25 | 1 | {"work": 0}
23 | 1 | {"work": 0}
22 | 1 | {"work": 0}
19 | 1 | {"work": 0}
26 | 1 | {"work": 0}
21 | 1 | {"work": 0}
24 | 1 | {"work": 0}
Here, I am trying to update the value of `work` inside experience by taking the values of exp
based on the `seq_id = id` in one query
I tried:
UPDATE info SET experience = '{"work": (portal.exp)}' FROM portal WHERE exp IS NOT NULL AND seq_id = info.id;
But it's not working
What am I missing?
Postgres
Any one?
Hi I'm a beginner to making web apps and I'm really interested in learning more about databases. I'd love to have more general knowledge & understanding of a broad range of DB topics. I've been googling lots of things, but I think a book might include interesting topics I wouldn't have thought to research. What beginner books/blogs/websites do you recommend?
This might be a helpful read @bradj4333 https://mariadb.com/kb/en/introduction-to-relational-databases/ (it seems to cover a lot of the basics in bite-size chunks).
@seancorfield thank you I'll look into that, sounds like just what i'm looking for!