DatabaseLink is a toolkit for working with SQL databases built into Mathematica.

learn more… | top users | synonyms

0
votes
0answers
15 views

How to pass a table type parameter to SQLExecute?

In MS SQL Server 2016 I have a table type parameter: CREATE TYPE dbo.Ids AS TABLE (Id INTEGER NOT NULL); and a stored procedure: ...
7
votes
2answers
512 views

How to speed up interpreting numbers from strings?

In processing a large text file I have batches from ReadList of 100,000 Records of the form. ...
1
vote
0answers
47 views

Using MemberQ or Contains* in a query fails

Using MemberQ or Contains* in a query fails: ...
3
votes
0answers
45 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 ...
0
votes
1answer
112 views

Error Using Mysql In Mathematica

I'm using Mathematica, and accessing mysql through mysql (Connector/J). When I try to update a field in my table using WHERE statement, all the rows get updated <...
4
votes
3answers
816 views

Working with a database

I just started to work with a database through Mathematica. I have a large data set. I use an .mx file to store my data. Now I have to store the data in a database, ...
2
votes
0answers
56 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, ...
2
votes
1answer
61 views

Cloud Form Function Database

I am trying to build a web inventory application using a SQLite database hosted in the cloud home directory. I have a database in the home directory and I can query that database while in the code ...
3
votes
0answers
44 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 ...
1
vote
0answers
80 views

Using Mathematica to connect to Cloudera Impala

I am trying to connect to Cloudera Impala via Mathematica, but so far I have not been able to do so. Has anyone ever done it? I have been able to connect to it via R using the JDBC or ODBC interface ...
4
votes
1answer
93 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 ...
5
votes
1answer
134 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 ...
1
vote
0answers
71 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
73 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. ...
0
votes
0answers
73 views

Mathematica SQL command that counts records in table

Is there a DatabaseLink command other than SQLExecute that can be used to count the total records in a database table?
0
votes
0answers
38 views

How to identify primary keys in an existing database table

I would like to identify the primary keys in a DB table using DatabaseLink commands trying to exclude SQLExecute. It seems like SQLTableInformation or SQLColumnInformation may not show that ...
2
votes
0answers
83 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. ...
2
votes
1answer
48 views

Is there a way to define primary keys using SQLCreateTable?

I would like to create a db table and specify the primary key columns using the command SQLCreateTable. I know I could use SQLExecute but in this case I'm only interested in the right parameters for ...
0
votes
2answers
95 views

Performing analysis of data extracted from an SQL database

Below is an SQL query that I generated using DatabaseExplorer as well as a small sample of the result. How, att this point, can I perform analysis on the results ...
3
votes
1answer
290 views

SQLite and Mathematica

I want to connect to a local database with Mathematica. I used DB Browser for SQLite to create the database with a single table and then exported it locally as a .sql file. To access the database I ...
4
votes
0answers
138 views

Is it possible to specify GMT as default in OpenSQLConnection or JDBC?

I'm connecting to a PostgreSQL database, with tables containing TIMESTAMPs with timezone, using ...
11
votes
1answer
351 views

Slow work of SQLInsert with MS SQL Server in V10

This question is very similar to: Slow work of SQLInsert with SQLite, but for MS SQL Server. Unfortunately the use of SQLBeginTransaction and ...
9
votes
3answers
702 views

Slow work of SQLInsert with SQLite

I want to store my data in SQLite database, but writing large numbers of data its too slow. For example: ...
5
votes
1answer
327 views

Using cursors with result sets to reduce memory usage

I have a database table with 900,000 rows and 80 columns per row which I'd like to work with in mathematica. My computations are isolated to each row, so I'd like to stream only a single row (or small ...
5
votes
1answer
198 views

How to get data from DB into dataset with keys

I'm a Mathematica newbie and I have the following problem: I connect to a Oracle DB and read out a set of variables, further on I want to histogram some of the variables. A Dataset seems to be the ...
7
votes
2answers
222 views

Connecting to Microsoft SQL with version 10

After upgrading to version 10, functions relying on a connection to a Microsoft SQL database no longer work. When I attempt to open a connection with something like: ...
1
vote
0answers
40 views

Need a recommendation for managing a database link

I want to make a package which needs to have a external database link. But it is hard for me to have an idea about how to manage the database link. I want the link to be connected as long as I use the ...
6
votes
1answer
326 views

How to update bundled SQLite library (or driver?) in V10 for OS X

I've been using undocumented Database functions with Mathematica V9 to acces my SQLite database, which is a Firefox-generated database that contains cookies. ...
1
vote
1answer
73 views

How can I “ORDER BY” using SQLSelect?

A pretty straightforward problem, you would think, but I cannot seem to find the answer in the documentation for SQLSelect. The query I want to run is the following: ...
5
votes
1answer
608 views
1
vote
1answer
200 views

I cannot get tables names and columns names from database

I am working with database using OpenSQLConnection-JDBC. I am able to fetch the data perfectly from the tables but I cannot get nor the names of the tables (using SQLTableNames) neither the column ...
2
votes
1answer
96 views

DatabaseLink Example for DB2 and Mathematica

could someone please point me to good example on how to make a JDBC connection to an IBM DB2 database?
10
votes
3answers
6k views

Connect to SQLite database

I am trying to connect to a SQLite database and since there is no officially supported driver; I decided to use the sqlite-jdbc driver and port the respective code into Mathematica. However, the ...
11
votes
0answers
251 views

Benefit of using Dataset to collect SQLSelect output

Considering a DatabaseExample included with Mathematica: ...
3
votes
2answers
366 views

Handling error in database connection (TimeConstrained)

I have a lot of scripts that use a database connection, and I have realized that my code should be protected against errors in my connection. For example, when my database is out for some technical ...
12
votes
1answer
673 views

Microsoft SQL DatabaseLink connection using Windows Authentication

For those who use Mathematica with databases in companies, a common way to securely connect to those is using Windows Authentication (detailed here). Mathematica doesn't seem to support this ...
3
votes
0answers
809 views

Problem inserting data into a mysql table with column names having a space

I have a mysql table whose column name has space. I tried inserting the data into this column. I got an error I tried a sample code, which tests accessing the columns with a space and that returns ...
1
vote
0answers
47 views

SQLDateTime from a time column is missing the milliseconds component

Can anyone confirm this? I am using M9.0.1 on win7 64bit connecting to a SQL Server db. When I fetch a datetime column the SQLDateTime objects contain 6 entries, 5 integers and a fractional second ...
9
votes
1answer
229 views

OpenSQLConnection problem - password visible

Prerequisites some database (here, it's called sakila (mysql standard test db I think)) a user (with password) that has access to that db (I'll use u:testuser/p:testpass) Setup - minimal (?) ...
1
vote
1answer
149 views

OpenSQLConnection error

I used to be able to connect to a SQL Server database. I haven't run this program for a few months. I tried it today and it failed, so I went back to try OpenSQLConnection[] and got the following ...
1
vote
1answer
118 views

Multi-table SQLSelects

I'm trying to figure out how these statements really work, and am having some trouble with the documentation (and the software!). Using the example publishers database (Mathematica 8), the following ...
7
votes
3answers
1k views

How to connect Mathematica 9 to MS SQL 2012 using Windows 7 enterprise (64-bit)

I have used Microsoft Open Database Connectivity (ODBC) with Mathematica 8.0 and MSSQL 2008 on Windows XP, but I can't get it to work on Windows 7 Enterprise (64-bit) with Mathematica 9.0.1.0 and MS ...
3
votes
1answer
420 views

How can I connect database(MSSQL Server) with Mathematica?

Newly I started working with database(MSSQL Server 2012). by google help, I created Table name as EmployeesList and also ...
1
vote
1answer
152 views

Creating a Dynamic MSSQL connection

Hello i am trying to create a notebook that automatically connects to a database on MSSQL server and would then query this to create a sort of personal report. I have connected to this database and ...
4
votes
1answer
257 views

How do I put a Monitor into CDF?

I would like to keep track of progress of a database request in an Enterprise CDF, but it won't allow PrintTemporary or Monitor[]...
0
votes
0answers
72 views

Connect to a MS Access database (*.accdb) [duplicate]

The JDBC Connections section of the help file http://reference.wolfram.com/mathematica/DatabaseLink/tutorial/DatabaseConnections.html gives me the impression that I can connect to a MS Access Database ...
2
votes
3answers
446 views

What format to use to store expressions in database?

I am storing lists of expressions into a MySQL database. Each list is of form {_String, {_String, _Real}, _Real} What data format should each column of the ...
-2
votes
2answers
436 views

How to push the data from database?

I want to push the data from database to Mathematica application instead of application(MM App) pull the data.I have installed ms sql server and apache tomcat server. I have my application in apache ...