Sure this has been asked before but I need help! My developer left me hanging with this error and I don't know how to fix it. Any help is greatly appreciated.
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from products_options where language_id = \'1\' order by products_optio' at line 1
select count(select * from products_options where language_id = \'1\' order by products_options_id) as total 1
[TEP STOP]
I get similar 1064 errors when I click on these links under catalog in the admin area below:
-Products Attributes
-Manufacturers
-Reviews
-Specials
-Featured Products
-Products Expected
-tags
SELECT Count(*) AS total_1
FROM Products_Options
WHERE language_id = 1
Related
Query1:
select 1 from (select count(*),col1 from table1);
O/P:
1
Version: 11g
Query2:
select * from (select count(*),col1 from table1);
O/P:
Error:
Execution (1: 32): ORA-00937: not a single-group group function
Version: 11g
As, we are in same version,
1. For Query2, why we are getting error?
2. With out group by how query1 is returning result?
In Version 12C, both queries are returning error as shared above.
You should be getting the error for query 1 in 11g too. The fact that you don't may be down to bug 16989676, which affected 11gR2 and was fixed in 12cR1. You'll need a support account and contract to see the details - which I can't reproduce here. Suffice to say that it looks very similar; but mentions you can get the wrong results too (e.g. using select count(*) instead of select 1) - if you ignore the syntax being invalid, that is, since there is no correct result really.
I am using Joomla 3.7.5. if I do some changes in configuration in some component in administration and want to save those changes it write me this:
error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY group_id DESC LIMIT 1' at line 1
I tried fix database (in Extension > Manage > Database), but it didn't help. I think there is some mistake in database with group_id table, but I am not sure where or how to fix it.
I tried it also on some old backup and it write something similar:
error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY group_id DESC LIMIT 1' at line 1 SQL=select group_id from #__user_usergroup_map where user_id = ORDER BY group_id DESC LIMIT 1
I haven't needed to change some settings in component configuration until now. So I am not sure for how long it is not able to save it without error 1064.
Any suggestions what to fix to repair this issue? I am not sure what is that mentioned Line 1 - is it line 1 in database or in some php file?
Thank you very much!
I know nothing about joomla but looking carefully at this part of your error message
select group_id from #__user_usergroup_map where user_id = ORDER BY group_id DESC LIMIT 1
leads me to suspect your problem is that the predicate in your where clause user_id = is incomplete. A proper where clause would look something like user_id = X where X is a constant or some other expression.
Also, this sort of question may be more appropriate for Server Fault
I have a view, which created (ORACLE)
CREATE OR REPLACE FORCE VIEW "OPS$DTEPROD"."DTE_BLMB_TRD_ACCT_VW"
("BB_TRD_ACCT", "DESCRIPTION", "ICI_TRD_ACCT") AS
select rtrim(STRBK_BOOK_NAME) bb_trd_acct,
rtrim(STRBK_DESCRIPTION) description,
trading_acct ici_trd_acct
from spider.sp_struct_books#spdn b1
, dte_trading_acct
where substr(rtrim(STRBK_BOOK_NAME),1,2)=ltrim(rtrim(fits_trading_Acct))
and strbk_last_update_date =
(select max(strbk_last_update_date)
from spider.sp_struct_books#spdn b2
where b2.strbk_book_number = b1.strbk_book_number)
In the package, when I compile it shows me an error
328/117 PL/SQL: ORA-04063: view "OPS$DTEPROD.DTE_BLMB_TRD_ACCT_VW" has
errors
Could you please help me to find the reason?
Thanks
Errors for PACKAGE BODY RATES_2DTE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
328/1 PL/SQL: SQL Statement ignored
328/117 PL/SQL: ORA-04063: view "OPS$DTEPROD.DTE_BLMB_TRD_ACCT_VW" has
errors
Please execute following query with same user which get the outlined error:
Select * from user_errors where name like 'OPS$DTEPROD.DTE_BLMB_TRD_ACCT_VW';
This will give you errors in the view. You can post output for further investigations.
Regards
Abhi
In order to solve such problem I have to work with our DBA. Only they can give access to this database from development server. On production we have everything done.
Thank you all for trying to help me
Their are two probabilities :
1) As another member (#xQbert) suggested - user who is used to created view do not have accesses to table over dB link.
2) Database, used in database link, is not accessible.
Solution:
1) Please execute following statement by same user which is trying to select from view:
Select count(*) from spider.sp_struct_books#spdn ;
This should give same error as original error.
We want to check is read access to destination table is in place.
2) From server/command prompt on database host, where view is created, execute following :
tnsping spdn (or tnsping <database name usec by db link>)
OR
sqlplus <Username>/<Password>#spdn (or <database name usec by db link>)
We want to check if destination database on dBlink is reachable.
Abhi
I've just recently started trying to learn SQL and I cannot seem to figure out my syntax error is. MS Access 2013 keeps telling me that there's an error after the NOT EXISTS query. All I am trying to do is display results from one table (table A or PILOT)that do not exist in another table (table B or FLIGHT). Here are my SQL statements (the lot)
SELECT A.LIC_NUM
FROM PILOT AS A
WHERE NOT EXISTS [
SELECT *
FROM FLIGHT AS B
WHERE A.LIC_NUM = B.FLIGHT_PILOT
];
It bugs me that something so simple could be causing this much of a problem. Any help would be greatly appreciated.
You are using bracket but you have to use parenthesis
SELECT A.LIC_NUM
FROM PILOT AS A
WHERE NOT EXISTS (
SELECT *
FROM FLIGHT AS B
WHERE A.LIC_NUM = B.FLIGHT_PILOT
);
Please "Mark as Answer" if a post has answered the question
I am moving from Postgres to Oracle and I am getting the ORA-00907 error for the following statement:
UPDATE investigations SET
team=(SELECT team FROM assigned WHERE parent_id=investigations.id LIMIT 1);
Please help with my Oracle syntax.
Thanks in advance!
As far as I know oracle doesn't have LIMIT clause. Take a look at this topic
you can try using rownum
SELECT team FROM assigned WHERE parent_id=investigations.id and rownum =1