Questions tagged [sql]
Tag for all questions about getting a connection to, setting up, or accessing a SQL database using Mathematica, particularly (but not restricted to) using Mathematica's DatabaseLink package.
108 questions
4
votes
0
answers
287
views
How to connect Tabular to SQL Server?
I have a Microsoft SQL Server database running and I am able to connect to it using:
...
0
votes
0
answers
250
views
How to specify NULL when inserting data into SQL Server using SQLExecute
I have an Microsoft SQL Server connection using:
...
3
votes
1
answer
405
views
How can I use older JDBC driver(s) to connect with old mySQL databases?
I got a new Mac at work, fresh install of Mathematica v13.3 (old 2015 Mac is dying and has v11.3).
Problem: In v13.3 I cannot connect to older mySQL databases, using v13's JDBC driver (...
4
votes
0
answers
130
views
Entity Framework for Relational Databases is compiling `If` and `Which` statement incorrectly
Suppose I have an SQLite Database with a table name myTable. Then running the following query:
...
3
votes
1
answer
706
views
Java error NoSuchFieldException: usr_paths with OpenSQLConnection after installing 13.2
I performed a fresh install of Mathematica 13.2. The first code that I tried worked just fine under 13.0. It opens an SQL server connection using single sign-on (SSO) for my credentials. However, in ...
1
vote
1
answer
635
views
JDBC::error when connecting to MySQL database
I'm trying to connect to a MySQL database. I've seen quite a few different methods (some of which are conflicting and seem to be outdated) of connecting but haven't managed to get any to work so far.
...
1
vote
0
answers
190
views
How to specify table names in DatabaseLink for access database that have spaces in the names?
I am able to establish the connection with the access database as follows:
...
6
votes
0
answers
184
views
Who broke the JDBC?
For the last 10 years or so, I have been accessing the tables of a PostgreSQL database successfully. Suddenly, having upgraded to Version 13.0, I get error messages in the simplest of queries, such as ...
3
votes
1
answer
115
views
Are Experimental Functions like DatabaseReference not available on Mathematica for Raspberry Pi?
I tried calling DatabaseReference and RelationalDatabase on version 12.3.1.0 for the Raspberry Pi, and found that the functions were not defined. I see in the documentation that they are Experimental ...
1
vote
1
answer
133
views
Querying ( e.g. ) Google Trends Data with Mathematica front-end
Mathematica has some excellent data query and analysis methods, but can also perform as a front-end to an SQL database.
Having worked as an SQL DBA in the past I would like to investigate further what ...
0
votes
0
answers
123
views
Failure connecting local MySQL server
I have locally installed and run the latest version of Oracle MySQL Community Server 8.0 on port 3306. I successfully established connections to it from locally installed Oracle MySQL Workbench 8.0 ...
2
votes
1
answer
231
views
OpenSQLConnection fails - due to some Java problem?
After upgrading to 12.3, I can no longer connect to an MS SQL Server using OpenSQLConnection. Apparently due to some problem with Java(?). I tried to reinstall JRE 8, but no change.
DatabaseExplorer[] ...
0
votes
0
answers
174
views
Wolfram Mathematica 11 and MS SQLServer 2019
I'm trying to connect with Wolfram Mathematica 11 to Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)(Build 19042: ).
I'm unable to do it, and I don't find the documentation for that task.
I tried ...
4
votes
2
answers
320
views
Problems with OpenSQLConnection on Mathematica 12.2 (Linux)
I used Mathematica to access the data of a MariaDB MySQL database. Within the version 12.0 it worked well on linux using the following code:
...
9
votes
1
answer
340
views
Generating Google BigQuery API Access Token in Wolfram Language
I'm working on a Wolfram Language Package to connect into Google Bigquery (that I'll make public available). In order to finish It, I need to solve a last step, that is how to get an authentication ...
0
votes
0
answers
218
views
How to write to a VARBINARY field using a stored procedure
Is it possible to write a binary file (e.g. an EMF) to a VARBINARY field using a stored procedure?
Creating an example EMF
...
5
votes
0
answers
201
views
Speeding up postgres queries in v12.1?
New in v12.1 is the ability to connect to Postgres. I have a Postgresql database with a few million images (stored as byte data). Each image retrieval is ~10 seconds, so I need to speed it up! But how ...
2
votes
0
answers
211
views
subquery doesn't work with SQLExecute
I want to select, say, rows 6 through 12 of a sqlite database. So I tried a subquery, but it does not work:
...
6
votes
1
answer
354
views
How to connect to MSSQL 2017 from Mathematica 12?
I'm wondering if it's possible to how to connect to MSSQL 2017?
I am running Mathematic 12 on Windows 10 x64.
Verified MSSQL was working perfectly using SSMS. Everything worked perfectly (as it has ...
8
votes
1
answer
331
views
How to do a database query on substrings?
With the package DatabaseLink I can open a connection to my MYSQL database. Then I can use SQL commands like
...
2
votes
0
answers
101
views
How to use SPARQLExecute for SPARQLSelect on Entities?
When using SPARQLSelect on Entity Types the entire entity store is downloaded to the local cache.
For example,
...
4
votes
1
answer
295
views
How to use SPARQLSelect filter (SPARQLEvaluation["CONTAINS"]) on two named graphs?
I would like to match triplets from two graphs in a RDFStores on the string value of one containing the string value of the other. To test this I made the ...
2
votes
0
answers
115
views
SQLSelect - Bit (true/false) as condition
I have a table in a MySQL-DB which is of datatype "bit". The name of this column is "abk".
If I write the following statement:
...
1
vote
2
answers
129
views
Insert a DateObject into MySQL database?
I want to use Mathematica to do some SQL tasks like insert. However, I have difficulty in inserting date into SQL. Here is an example.
...
7
votes
0
answers
277
views
Benefits of using the high level entity framework over raw SQL
Has anyone that has used both SQL particularly TSQL used in Microsoft SQL Server and Wolfram Database integration into its Entity framework, provide some particular examples where the high level ...
12
votes
2
answers
2k
views
How to extract Bitmap image from SQL records?
I'm trying to extract image from records of the MSSQL demo database NorthWind with this codes,
...
4
votes
3
answers
847
views
how to set up mySQL 8.0 J/ Connector drive in Mathematica?
I have upgraded my MySQL database to 8.0. I downloaded its java connector, and moved mysql-connector-java-8.0.12.jar to :
/Applications/Mathematica.app/Contents/SystemFiles/Links/DatabaseLink/Java/
...
1
vote
3
answers
258
views
How to convert DateList format to standard SQL format?
I have a date in standard SQL format YYYY-MM-DD HH:MM:SS.xx, where the xx are hundredths of seconds:
x = 2016-05-30 11:58:46.84
I have a file with 200,000+ ...
1
vote
0
answers
151
views
Probable Bug in SQLColumn condition < upper limit for SQLSelect
I have a perfectly good SQLSelect query that doesn't work if and only if it contains an extra < condition on a column already used. Details follow...
This SQLselect shows that the expected data ...
1
vote
1
answer
176
views
How do I visualize images stored in SQL?
here is the background:
I have a SQL database that (among other data) contains images
I connect to the database, extract and store the relevant data in variable picData like so
...
3
votes
1
answer
414
views
Maintaining SQLConnections
I'm using SQLConnection to database in repetitive ScheduledTask. To prevent creation of new connections, and to maintain binding ...
3
votes
3
answers
595
views
Conditional selection of rows from a dataset
How can one select rows "a" and "b" from the following dataset where "b" values are larger ...
0
votes
0
answers
151
views
SQL export data
I have data imported from excel file into mathematica but mathematica automatically converts large number into scientific form and when transferring this data to sql string field i get the following .....
3
votes
1
answer
7k
views
JDBC with "autoReconnect=True"
I sometimes leave long computations running overnight and return in the morning to find that my database connection has timed out. I typically have to kill the kernel and launch a new database ...
4
votes
0
answers
134
views
Mathematica not releasing RAM
The following code is supposed to sequentially read data from a large CSV file and put it row by row into an SQL server. Although I thought RAM consumption should be constant the system keeps asking ...
0
votes
0
answers
393
views
Is it possible when creating an exe file from Mathematica code to include functions that create windows? [duplicate]
I'm building a program that uses SQL code to import live data, and uses said data to calculate basic SPC limits. This data is then graphed in a separate window. My final goal is to be able to turn ...
1
vote
0
answers
58
views
Oracle XML data select in SQLExecute Statement
Following query is returning null in Mathematica.
t = "select xmlelement(\"test\",1) as test from dual";
SQLExecute[conn, t]
It should retrun 1 as result but it is returing NUll value.
How can I ...
1
vote
0
answers
64
views
How to export result from SQLResultSet into a csv
I have a sql query which produces very large data from a remote server but the data is too large to fit into memory all at once. So i want to read and export it sequentially into a csv. I am using the ...
0
votes
0
answers
176
views
Query SQL database from within Manipulate in cdf?
As example, the following very simple code works fine when I run it from Mathematica .nb, but fails to get the data from SQL when I create an (Enterprise) cdf from it:
...
8
votes
1
answer
244
views
Why has this SQLInsert behaviour changed?
Using Mathematica 11.1 to insert into a MySQL table with this schema...
...
2
votes
1
answer
266
views
Connection to SQL server - Failed
I have a test database created by the colleagues from IT department and I can also access / see it using MS SQL Server Management Studio 2016. However, I cannot establish a connection to it from ...
2
votes
0
answers
144
views
SQL Group By using SQLSelect
I would like to use the SQLSelect[] function in Mathematica 11 to get aggregated data from a large database. Is using SQLExecute ...
0
votes
2
answers
131
views
SQLInsert SQLExpr not working in V11
This worked fine in Mathematica 7. Any ideas how to fix it for version 11?
...
1
vote
0
answers
82
views
Integer data type mapping problem with SQLInsert in DatabaseLink package
I am working with a following SQL table named "ticket". Now let's see the data types for the columns.
...
11
votes
3
answers
3k
views
JDBC-to-ODBC bridge gone. How to connect to SQL Server now in case of Windows Authentication?
Connecting to our corporate SQL servers using JDBC never worked for me, perhaps related to the Windows Authentication method that is necessary in our network. However, I found out that configuring the ...
2
votes
1
answer
142
views
Skip iteration when SQL JDBC issues an error due to huge data fetching
I have a loop which performs SQLConnections and fetches data. Sometimes, I get an error due to overhead limit with a message saying ...
2
votes
0
answers
107
views
Mathematica: change x^y to power(x,y) [closed]
MySql does not understand the operator "^", i.e., we must use power(x,y) instead of x^y. How to translate x^y to power(x,y)?.
Thanks
César Lozada
2
votes
1
answer
495
views
I have a communications link failure with JDBC MySQL(Connector/J)
I am unable to connect to my local mysql server using Mathematica.
...
1
vote
1
answer
188
views
Running the Mathematica script in SQL Server
Hi i am trying to learn mathematica.
I am following instruction in one of the questions asked before and did the following:
In SQL Server a stored procedure is created as follows:
...
1
vote
0
answers
124
views
Using MemberQ or Contains* in a query fails
Using MemberQ or Contains* in a query fails:
...