Window Functions not Working in MySQL Workbench 8.0 - subquery

I recently updated MySQL to Workbench 8.0. I am attempting to use the WINDOWS FUNCTIONS; however, I continually receive an error: "Is not valid at this point expecting EOF". Here is my code
select category_id, sum(list_price) over (partition by category_id) as total_price from products;
I have removed the space after over and I still receive the same error message. I greatly appreciate your help!
Below is my dataset:

Related

Push in existing local table failure (windows): InvalidRegionNumberException then IllegalArgumentException

I want to push data into an already existing table, single column family, no records.
I am using shc-core:1.1.1-2.1-s_2.11 on a windows machine. I have hbase 1.2.6 installed and use scala 2.11.8.
When I try to push data I got first the following error: org.apache.spark.sql.execution.datasources.hbase.InvalidRegionNumberException: Number of regions specified for new table must be greater than 3.
After following the advice of this link https://github.com/hortonworks-spark/shc/issues/249#issue-318285217, I added: HBaseTableCatalog.newTable -> "5" to my options.
It still failed but with: java.lang.IllegalArgumentException: Can not create a Path from a null string.
Following this link: https://github.com/hortonworks-spark/shc/issues/151#issuecomment-313800739, I added to my catalog: , "tableCoder":"PrimitiveType".
Still facing the same error.
I saw people are expecting some clarification about this issue (https://github.com/hortonworks-spark/shc/issues/249#issuecomment-463528032).
It is known issue and apparently it seems fixed (https://github.com/hortonworks-spark/shc/issues/155#issuecomment-315236736).
I do not know what to do next.
Is there a solution about this?

SqlState 24000, Invalid cursor state

I am trying to help one of our developers resolve an Azure SQL DB error. He has attempted to run a script, connecting using sqlcmd and (I presume) ODBC. It seems no matter what he does he receives the error message "SqlState 24000, Invalid cursor state".
His script consists of roughly 80 "insert into table where not exists sub-select" statements. Some of the sub-selects return zero records.
I read this post which is admittedly almost a year old now. The short version seems to be "this is a known Azure SQL DB bug".
sqlcmd on Azure SQL Data Warehouse - SqlState 24000, Invalid cursor state after INSERT statement
I know for certain my developer has been able to run these statements previously. Is that just the nature of a bug - sometimes it occurs and sometimes it doesn't? Does he need to use a different ODBC driver? Any other suggestions?
Please make sure you are using ODBC driver 13.1 or later. You can download it from here.

pyodbc fetchall() returns no results when a column returned by the query contains too much data

Setup:I am using Python 3.3 on a Windows 2012 client.
I have a select query running using pyodbc which is not returning any results via fetchall(). I know the query works fine because i can take it out and run it from Microsoft SQL Management Studio without any issues.
I can also remove one column from the select list and the query will return results. For the database row in question, this column contains a large amount of XML data (> 10,000 characters), so it seems as though there is some buffer overflow issue going on causing fetchall() to fail, though it doesn't throw any exceptions. I have tried googling around and i have seen rumors of a config option to raise the buffer size, but i haven't been able to nail down exactly how to do it, or what a workaround would be.
Is there a configuration option that I can use, or any alternative to pyodbc.
Disclaimer: I have only been using python for about 2 weeks now so i
am still quite the noob, though i have made every attempt to research
my problems thoroughly this one has proven to be elusive:
On a side note, i tried using odbc instead of pyodbc but the same query throws this oddball error which google isn't helping me solve either
[ERROR] An exception while executing the Select query: [][Negative size passed to PyBytes_FromStringAndSize]
It seems this issue was resolved by changing my SQL connection string
FROM:
DRIVER={SQL Server Native Client 11.0}
TO:
DRIVER={SQL Server}

Exception while retrieving schema from Informix database using Db2Client DB2Connection.GetSchema("Tables")

I am getting this error when entity framework trying to get schema from Informix database:
IBM.Data.DB2.DB2Exception (0x80004005): ERROR [IX000] [IBM][IDS/UNIX64] SQL0969N
There is no message text corresponding to SQL error "-23103" in the message fi
le on this workstation. The error was returned from module "IFX11500" with orig
inal tokens "". SQLSTATE=IX000
Please help.
Probably you have some LOCALE misconfiguration between the client and server or some problem with the client installation.
Try confirm the locale used at the database and set the CLIENT_LOCALE with compatible value.
-23103 Code-set conversion function failed due to an illegal sequence or invalid value.
Illegal or invalid characters occur in the character string. The
program could not execute the code-set conversion on the characters
that this string contains. Reexamine the input string for illegal or
invalid characters and reexecute the program.
If you have an alternative way to connect at the database , run this SQL :
select * from sysmaster:sysdbslocale
You will get a information like this..
dbs_dbsname sysmaster
dbs_collate en_US.819
dbs_dbsname sysha
dbs_collate en_US.819
dbs_dbsname sysuser
dbs_collate en_US.819
dbs_dbsname onpload
dbs_collate en_US.819
This links maybe can help you : dbaccess info , database locale
This problem temporarily solved by recycle the database service.
Still trying to find root cause of the problem as this may not be solution for every time.
Thanks
Phani
The above problem got solves after installing a patch. The problem is not exist in newer versions of Informix.

EF5, Model-First, Generate Migration T-SQL.xaml seems to be not installed in Visual Studio 2012

I am trying to get Model First DBGen working especially when one changes the model and one wishes to retain any data in the DB. VS2012 complains about a missing , "Generate Migration T-SQL.xaml" in "Entity Framework Tools \DBGen" where only "TablePerTypeStrategy.xaml" exists.
I did try to copy in this file from the VS2010 install, but this did not work.
I am a bit puzzled why I am getting an incomplete EF5 install since I have just installed VS2012 as of yesterday.
Any thoughts?
Many thanks,
Ed
P.S I did try this in VS2010, got a lot further, but when I executed the edmx.sql I got
"Msg 50000, Level 16, State 127, Line 6
Rows were detected. The schema update is terminating because data loss might occur.
** An error was encountered during execution of batch. Exiting."

Resources