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
0
votes
0answers
42 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 ...
0
votes
0answers
64 views

No suitable driver found for JDBC:PostgreSQL

I cannot establish connection between Mathematica 11.0 and PostgreSQL base. ...
0
votes
0answers
35 views

Where is data stored in HSQLDB Mathematica

Where is data stored in HSQLDB in mathematica. I have to move the database file to another computer with data.
5
votes
0answers
73 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
0answers
34 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: ...
5
votes
1answer
110 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 ...
7
votes
1answer
150 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
0answers
63 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
2answers
51 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. ...
6
votes
0answers
161 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
2answers
470 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
3answers
407 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
3answers
117 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
0answers
68 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
1answer
80 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
1answer
326 views

Maintaining SQLConnections

I'm using SQLConnection to database in repetitive ScheduledTask. To prevent creation of new connections, and to maintain binding ...
2
votes
3answers
219 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
0answers
83 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
1answer
4k 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
0answers
90 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
0answers
365 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
0answers
39 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
0answers
32 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
0answers
100 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
1answer
147 views

Why has this SQLInsert behaviour changed?

Using Mathematica 11.1 to insert into a MySQL table with this schema... ...
2
votes
1answer
168 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
0answers
93 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
2answers
59 views

SQLInsert SQLExpr not working in V11

This worked fine in Mathematica 7. Any ideas how to fix it for version 11? ...
1
vote
0answers
41 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
3answers
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 ...
2
votes
1answer
76 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
0answers
68 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
1answer
338 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
0answers
74 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
0answers
78 views

Using MemberQ or Contains* in a query fails

Using MemberQ or Contains* in a query fails: ...
4
votes
1answer
230 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 ...
2
votes
0answers
63 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 ...
2
votes
0answers
156 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, ...
4
votes
0answers
73 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 ...
7
votes
1answer
786 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 ...
1
vote
0answers
84 views

Login failed with Windows account into sql server using mathemcatica

I am trying to make a connection from WOLFRAM- MATHEMATICA to an SQL server database. When I tried with my windows authentication, I am getting an error saying login failed for user, but when I tried ...
4
votes
1answer
190 views

Connection to SQL server databases from Mathematica

I am an SQL developer and very new to Mathematica. As per my requirement I need to make a connection from Mathematica to my sql server database, after which my client will do some analysis with the ...
19
votes
1answer
1k views

best practices for saving Datasets and TemporalData to a SQL database

I have been working with a simulation tool that generates large volumes of data, and it's time to start saving this to a proper database. Is there an established mechanism for saving TemporalData ...
3
votes
2answers
185 views

Working with CDF Deployment

I've been working with FreeCDFs in Mathematica 10 and it has been going fine as long as I do not pull from a database or access local files. I recently purchased the Mathematica 10.2 Enterprise ...
5
votes
1answer
239 views

SQLInsert'ing Null into a table (not SQLite)

Is it possible to insert Null values using DatabaseLink, without formatting the query string manually? Hans found (below) that this works for SQLite, so it appears ...
5
votes
2answers
246 views

Importing SQL view vs table

I am trying to import a SQL view not a table in Mathematica. The command: SQLSelect[conn, "DataByYear"] This will correctly bring in the table. However using the ...
1
vote
0answers
224 views

Awkward DatabaseLink JDBC Error [closed]

I've created a GUI application (a database editor) that uses DatabaseLink and it is currently working fine on my PC (M10.02, Windows 7) and on a clients's PC (CDF Player Pro 10.02, Windiws 8). While ...
1
vote
1answer
189 views

OrientDB JDBC OpenSQLConnection : Execution of SQL failed

I am testing JDBC connection of OrientDB v2.0.13 from Wolfram Language. ...
1
vote
1answer
88 views

How to specify the number of precision digits for columns using DatabaseLink functions and options

Some databases (e.g. MySQL) does not store decimal places for seconds unless the number of digits needed is directly specified (e.g. DATETIME(4) for 4 digits) when creating the table in the database. ...
2
votes
0answers
97 views

OpenSQLConnection SSPI Library Not Loaded [duplicate]

I am attempting to open a connection to SQL Server with Windows Authentication (SSPI) using OpenSQLConnection and JDBC. ...