Highlighted

ORA-00933: statement not ended proplerly

LEGEND ,
Sep 12, 2019

Copy link to clipboard

Copied

Hello, all,

 

Despite my derision for this "new platform", I don't have a choice if I need support, so here goes.

 

Using pseudo-code, I've got a query like:

SELECT col1 col1, col2 col2, col3 col3, col4 col4
FROM tableA
ORDER BY col4 DESC

UNION

SELECT col5 col1, col6 col2, col7 col3, col8 col4
FROM tableB
ORDER BY col4 DESC

 

And I'm getting the error message that the query isn't properly ended.  I've tried with semi-colon, without semi-colon, can't seem to see why this errors in CF, but it works fine in SQL Developer.  (Oracle db).  Any ideas?

 

V/r,

 

^ _ ^

Views

145

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ORA-00933: statement not ended proplerly

LEGEND ,
Sep 12, 2019

Copy link to clipboard

Copied

Hello, all,

 

Despite my derision for this "new platform", I don't have a choice if I need support, so here goes.

 

Using pseudo-code, I've got a query like:

SELECT col1 col1, col2 col2, col3 col3, col4 col4
FROM tableA
ORDER BY col4 DESC

UNION

SELECT col5 col1, col6 col2, col7 col3, col8 col4
FROM tableB
ORDER BY col4 DESC

 

And I'm getting the error message that the query isn't properly ended.  I've tried with semi-colon, without semi-colon, can't seem to see why this errors in CF, but it works fine in SQL Developer.  (Oracle db).  Any ideas?

 

V/r,

 

^ _ ^

Views

146

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 12, 2019 0
Explorer ,
Sep 12, 2019

Copy link to clipboard

Copied

You should remove the first order by statmenet. The second one will cover both of them.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 12, 2019 1
LEGEND ,
Sep 12, 2019

Copy link to clipboard

Copied

Thanks, Drew! That got me past the error.. and introduced a new one. LOL. Trying to create a SOLR collection for the database. I thought action="fullImport" would create it, but apparently not.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 12, 2019 0
Adobe Community Professional ,
Sep 12, 2019

Copy link to clipboard

Copied

You really ought to open a new thread for this new problem. As for action=fullimport, that is only for the dih (data import handler) feature, which is in Enterprise only. Notice how in the docs page for cfsearch, it lists this action under "When type="dih", these actions are used:". Are you running CF Enterprise? If so, and still a problem, do open a new thread on it.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 12, 2019 0
LEGEND ,
Sep 13, 2019

Copy link to clipboard

Copied

Hi, Charlie. Yes, I am running Enterprise CF2016. I'll start a new thread. Thanks, ^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 13, 2019 0
Adobe Community Professional ,
Sep 12, 2019

Copy link to clipboard

Copied

What about using brackets, like this:

 

(select bla, bla, bla)

union

(select bla, bla, bla)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 12, 2019 0
LEGEND ,
Sep 13, 2019

Copy link to clipboard

Copied

Sorry for the multiple replies; they aren't showing up immediately. Something else that sucks about this "new platform". And, hey, guys.. how about a PROPER textarea for replies instead of a text input??? BKBK, I tried your suggestion, and it didn't work, unfortunately. As soon as I saw what you suggested, I thought, "Hey, maybe?" But it didn't work out. Thank you, though. V/r, ^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 13, 2019 0
Adobe Community Professional ,
Sep 13, 2019

Copy link to clipboard

Copied

But to be clear, your sql problem is solved, right? With Drew's solution yesterday? As for the forum concern, no one from Adobe is likely to see this comment. You really ought to open a new thread on it, and/or file a tracker bug report. (I agree that this tiny text input for replies to replies does suck.)

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 13, 2019 0
LEGEND ,
Sep 13, 2019

Copy link to clipboard

Copied

Hi, Charlie. Yes, the SQL has been solved; removing the first ORDER BY did fix it, even though it means that the sorting isn't what I want. I can live with it. V/r, ^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 13, 2019 0
LEGEND ,
Sep 13, 2019

Copy link to clipboard

Copied

BTW.. how do I mark an answer as correct? I'm not seeing a link next to @Drew_Nathanson's reply. V/r, ^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 13, 2019 0