Query fails if a TAB is the first character

Howdy,

In 13.2.0.86, I have this query:

	SELECT
		metric_name
	FROM 
		sysman.mgmt$metric_daily
	WHERE
		target_name = 'myfundb'
		AND target_type = 'oracle_database'
		AND rollup_timestamp > TRUNC(sysdate-7)

The above is tab-indented, as a subquery taken from a larger query for debugging. It runs with F5, but F9 produces:

ORA-00907: missing right parenthesis

If I remove the leading tab from the SELECT line or comment out the last “AND” line, F9 works fine.

Thanks!
Rich

Disclaimer: Please help me fight the injustice that is tabicide. For just pennies a day, you too can help discarded tabs find meaningful work with me and my organization, CHR9. Not a registered 501(c )(3) organization. Not registered anywhere, for that matter.

1 Like

This test is also repeatable in the brand-new .92. Spool shows that indeed, the trailing paren is removed prior to execution, even if a semi-colon is added to the SQL.

Thanks,
Rich

Tabs… :-1:

I’ve added this sample to an open Jira we have for this. A similar issue was reported by another user a few weeks back. On the bright side, there is a workaround! :laughing:

I suppose one could – gulp – remove the leading tab… :sob::sob::sob::-1:

Code misalignment
Tabs: efficient and compact
Spaces are evil

Thanks,
Rich

Disclaimer: There’s no retort like a Haiku retort.

2 Likes