show the number if impacted rows instead of returning nothing
This commit is contained in:
parent
9e381f7d78
commit
08cba77728
@ -1,4 +1,4 @@
|
||||
# execure the sql for scale which builds the sql and inserts into a table
|
||||
#$PG -f ./routes/scale/gen_scale.sql
|
||||
psql -h hptrow.me -p 54329 -d ubm -U ptrowbridge -f ./setup_sql/05_gen_scale.sql
|
||||
# pull the sql out of the table and write it to route directory
|
||||
psql -h hptrow.me -p 54329 -d ubm -U ptrowbridge -c "SELECT t FROM fc.sql WHERE cmd = 'scale'" -t -A -o ./routes/scale/scale.sql
|
||||
|
@ -140,6 +140,7 @@ FROM
|
||||
WHERE
|
||||
pscale.factor <> 0 or pscale.mod_price <> 0
|
||||
)
|
||||
,ins AS (
|
||||
INSERT INTO
|
||||
fc.dcard
|
||||
SELECT
|
||||
@ -151,4 +152,8 @@ SELECT
|
||||
*
|
||||
FROM
|
||||
pricing
|
||||
RETURNING *
|
||||
)
|
||||
SELECT count(*) num_rows FROM ins
|
||||
|
||||
|
||||
|
@ -245,6 +245,7 @@ FROM
|
||||
WHERE
|
||||
pscale.factor <> 0 or pscale.mod_price <> 0
|
||||
)
|
||||
,ins AS (
|
||||
INSERT INTO
|
||||
$$||_target_table||$$
|
||||
SELECT
|
||||
@ -256,6 +257,10 @@ SELECT
|
||||
*
|
||||
FROM
|
||||
pricing
|
||||
RETURNING *
|
||||
)
|
||||
SELECT count(*) num_rows FROM ins
|
||||
|
||||
$$
|
||||
INTO
|
||||
_sql;
|
||||
|
Loading…
Reference in New Issue
Block a user