如何在VSCODE上调试SQLite
我试图使用SQLite对Vscode上的查询(见下文)求值。 它返回一个错误,这不是很有帮助(见下文)。我想知道我是否可以进行更深入的调试?老实说,我不知道如何开始调试。 许多tk 代码:如何在VSCODE上调试SQLite,sql,sqlite,debugging,visual-studio-code,Sql,Sqlite,Debugging,Visual Studio Code,我试图使用SQLite对Vscode上的查询(见下文)求值。 它返回一个错误,这不是很有帮助(见下文)。我想知道我是否可以进行更深入的调试?老实说,我不知道如何开始调试。 许多tk 代码: WITH processed_users AS ( SELECT LEFT (u.phone_country, 2) AS short_phone_country, u.id FROM users u ) SELECT t.user_id
WITH processed_users AS (
SELECT
LEFT (u.phone_country, 2) AS short_phone_country,
u.id
FROM
users u
)
SELECT
t.user_id,
t.merchant_country,
Sum (
t.amount / fx.rate / Power (10, cd.exponent)
) AS amount
FROM
transactions t
JOIN fx_rates fx ON (
fx.ccy = t.currency
AND fx.base_ccy = 'EUR'
)
JOIN currency_details cd ON cd.currency = t.currency
JOIN processed_users pu ON pu.id = t.user_id
WHERE
t.source = 'GAIA'
AND pu.short_phone_country = t.merchant_country
GROUP BY
t.user_id,
t.merchant_country
ORDER BY
amount DESC;
[5:21:43 PM][vscode-sqlite][ERROR] near "(": syntax error
错误:
WITH processed_users AS (
SELECT
LEFT (u.phone_country, 2) AS short_phone_country,
u.id
FROM
users u
)
SELECT
t.user_id,
t.merchant_country,
Sum (
t.amount / fx.rate / Power (10, cd.exponent)
) AS amount
FROM
transactions t
JOIN fx_rates fx ON (
fx.ccy = t.currency
AND fx.base_ccy = 'EUR'
)
JOIN currency_details cd ON cd.currency = t.currency
JOIN processed_users pu ON pu.id = t.user_id
WHERE
t.source = 'GAIA'
AND pu.short_phone_country = t.merchant_country
GROUP BY
t.user_id,
t.merchant_country
ORDER BY
amount DESC;
[5:21:43 PM][vscode-sqlite][ERROR] near "(": syntax error
SQLite中没有LEFT()函数。使用SUBSTR()。此外,没有Power()函数。