Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在VSCODE上调试SQLite_Sql_Sqlite_Debugging_Visual Studio Code - Fatal编程技术网

如何在VSCODE上调试SQLite

如何在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

我试图使用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,
    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()函数。