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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
43 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: ...
user avatar
  • 8,377
6 votes
0 answers
85 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 ...
user avatar
  • 303
1 vote
0 answers
43 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 ...
user avatar
0 votes
1 answer
59 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 ...
user avatar
0 votes
0 answers
59 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 ...
user avatar
0 votes
0 answers
69 views

How to connect to MSSQL 2019 from Mathematica 12?

I have MS SQL Server Version 2019 (select @@version gives Microsoft SQL Server 2019 (RTM-GDR) (KB4583458) - 15.0.2080.9 (X64) Nov 6 2020 16:50:01 Copyright (C) 2019 Microsoft Corporation ...
user avatar
2 votes
1 answer
94 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[] ...
user avatar
  • 477
0 votes
0 answers
71 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 ...
user avatar
4 votes
2 answers
201 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: ...
user avatar
  • 659
9 votes
1 answer
193 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 ...
user avatar
  • 25.5k
0 votes
0 answers
104 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 ...
user avatar
  • 29.5k
5 votes
0 answers
111 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 ...
user avatar
  • 30.5k
2 votes
0 answers
63 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: ...
user avatar
6 votes
1 answer
217 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 ...
user avatar
  • 453
8 votes
1 answer
242 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 ...
user avatar
  • 9,909
2 votes
0 answers
61 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, ...
user avatar
  • 39.5k
4 votes
1 answer
124 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 ...
user avatar
  • 39.5k
2 votes
0 answers
73 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: ...
user avatar
  • 161
1 vote
2 answers
69 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. ...
user avatar
  • 1,389
6 votes
0 answers
193 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 ...
user avatar
  • 8,377
12 votes
2 answers
905 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, ...
user avatar
  • 2,379
4 votes
3 answers
642 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/ ...
user avatar
  • 839
1 vote
3 answers
130 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+ ...
user avatar
  • 445
1 vote
0 answers
76 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 ...
user avatar
  • 2,410
1 vote
1 answer
104 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 ...
user avatar
  • 25
3 votes
1 answer
327 views

Maintaining SQLConnections

I'm using SQLConnection to database in repetitive ScheduledTask. To prevent creation of new connections, and to maintain binding ...
user avatar
  • 900
3 votes
3 answers
378 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 ...
user avatar
  • 1,783
0 votes
0 answers
97 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 .....
user avatar
  • 8,377
3 votes
1 answer
5k 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 ...
user avatar
4 votes
0 answers
99 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 ...
user avatar
  • 8,377
0 votes
0 answers
385 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 ...
user avatar
1 vote
0 answers
40 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 ...
user avatar
  • 23
1 vote
0 answers
34 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 ...
user avatar
  • 8,377
0 votes
0 answers
104 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: ...
user avatar
  • 703
8 votes
1 answer
165 views

Why has this SQLInsert behaviour changed?

Using Mathematica 11.1 to insert into a MySQL table with this schema... ...
user avatar
  • 29.5k
2 votes
1 answer
185 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 ...
user avatar
  • 703
2 votes
0 answers
100 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 ...
user avatar
0 votes
2 answers
61 views

SQLInsert SQLExpr not working in V11

This worked fine in Mathematica 7. Any ideas how to fix it for version 11? ...
user avatar
  • 29.5k
1 vote
0 answers
43 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. ...
user avatar
  • 14.4k
11 votes
3 answers
2k 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 ...
user avatar
2 votes
1 answer
93 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 ...
user avatar
2 votes
0 answers
70 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
user avatar
2 votes
1 answer
397 views

I have a communications link failure with JDBC MySQL(Connector/J)

I am unable to connect to my local mysql server using Mathematica. ...
user avatar
1 vote
0 answers
75 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: ...
user avatar
  • 8,377
1 vote
0 answers
84 views

Using MemberQ or Contains* in a query fails

Using MemberQ or Contains* in a query fails: ...
user avatar
  • 30.5k
4 votes
1 answer
283 views

How do I insert Unicode into a MySQL database?

I'm having trouble transferring Unicode strings from one MySQL database to another using DatabaseLink` functions. Here is my failed attempt to read a string from ...
user avatar
  • 141
2 votes
0 answers
67 views

ParallelDo issue with SQLExecute (SQLite) [closed]

This code run as expected if I use Do[...], but if I use instead ParallelDo[...], as in the code bellow, the SQL INSERT statements seems to be completely ignored. In both cases, the filename is ...
user avatar
  • 405
2 votes
0 answers
188 views

Random sample from sql database uniformly over time [closed]

I'd like to sample rows from a table uniformly over time, here is the naive way to do this: SELECT * FROM table ORDER BY RAND() LIMIT 10000 Unfortunately, ...
user avatar
  • 30.5k
4 votes
0 answers
74 views

Mathematica 10.3 on Windows 10 Home Premium Connection to SQL Server 2016 [duplicate]

Having installed sql server 2016 evaluation copy. I have setup a sample database using sql server management studio. Typed the following in mathematica ...
user avatar
  • 8,377
7 votes
1 answer
948 views

MySQL insert statement over remote server is extremely slow. How can I speed it up?

I need to insert values to a remote MySQL server. However it is extremely slow compared to a local MySQL server. This is my timing for the local MySQL server ...
user avatar
  • 1,569