I am trying to replicate an example from the Help information on the jdbc command. The example is:
and the result when I execute this is:
I don't have a delimiter set up and I am bemused as to what is going on. My best guess is that Stata is not accepting three forward slashes /// as a line continuation. But why? I have restarted Stata several times. I am using Stata 18.5.
The result from concatenating the local command to a single line is:
I have all of the drivers, etc required by PostgreSQL set up and I know they are working properly from other runs.
Code:
local sql /// "CREATE TEMPORARY TABLE t(a INT, b INT); /// INSERT INTO t VALUES (1,2); /// SELECT * FROM t;" jdbc load, exec("`sql'")
Code:
. local sql /// > "CREATE TEMPORARY TABLE t(a INT, b INT); /// invalid syntax r(198);
The result from concatenating the local command to a single line is:
Code:
local sql "CREATE TEMPORARY TABLE t(a INT, b INT); INSERT INTO t VALUES (1,2); SELECT * FROM > t;" . jdbc load, exec("`sql'") failed to load resultset No results were returned by the query.
Comment