Skip to content

Commit 46b3c02

Browse files
kafka1991nwoolmer
andauthored
fix update example. (#190)
fix update example. Co-authored-by: Nick Woolmer <29717167+nwoolmer@users.noreply.github.com>
1 parent f801797 commit 46b3c02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/reference/sql/update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ UPDATE spreads s SET s.spread = p.ask - p.bid FROM prices p WHERE s.symbol = p.s
3939

4040
```questdb-sql title="Update with multiple joins"
4141
WITH up AS (
42-
SELECT p.ask - p.bid AS spread, s.timestamp
42+
SELECT p.ask - p.bid AS spread, p.timestamp
4343
FROM prices p
4444
JOIN instruments i ON p.symbol = i.symbol
4545
WHERE i.type = 'BOND'
4646
)
4747
UPDATE spreads s
48-
SET s.spread = up.spread
48+
SET spread = up.spread
4949
FROM up
5050
WHERE s.timestamp = up.timestamp;
5151
```

0 commit comments

Comments
 (0)