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.

learn more… | top users | synonyms

13
votes
1answer
3k views

How to request financial data from Yahoo's YQL and Quandl?

How can I download historical data from Yahoo ? Although Mathematica's FinancialData function uses Yahoo it could be useful to have more control on how to retrieve data from Yahoo's YQL. Edit ...
12
votes
1answer
498 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 ...
11
votes
0answers
205 views

Benefit of using Dataset to collect SQLSelect output

Considering a DatabaseExample included with Mathematica: ...
9
votes
4answers
665 views

Join two datasets on keys

I want to be able to join two datasets by keys, pretty much like I'd do in SQL. I thought the JoinAcross function might do it, but it doesn't operate the way I thought. The example in the ...
9
votes
1answer
137 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
371 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: ...
8
votes
1answer
425 views

Stealth daylight saving shift in SQL data

I'm querying a SQL database with DatabaseLink and resulting SQLDateTime objects are shifted by an hour during daylight saving ...
7
votes
3answers
838 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 ...
7
votes
1answer
164 views

SQL JDBC Zerodatetime

I am trying to query SQL data with MATHEMATICA - however, the MySQL database contains zerodates and that leads to the following error message: e.g. (1) *SQLSelect[conn, "orders", {"time_created"}, ...
5
votes
3answers
177 views

SQL-like computation on Dataset: Aggregate function

Assume that I have this dataset a = Dataset[{<|"A" -> "A1", "B" -> 2|>, <|"A" -> "A1", "B" -> 3|>}] How can I get the total of Key["B"] ...
5
votes
3answers
296 views

Executing Mathematica script from inside SQL Server

Does anyone have experience in calling Mathematica from inside SQL Server to do calculations? For example, how can I make a Procedure that uses Mathematica? Or a job that runs some Mathematica script? ...
5
votes
1answer
232 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
0answers
278 views

How to download and combine S&P 500 stock prices

I want to download historical S&P 500 stock prices and combined them into one big file, having only one column of date referencing all stocks. Here is what I have do so far. ...
4
votes
2answers
561 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, ...
4
votes
1answer
371 views

How to match two sets of data over 1 or more identifier, of unequal length?

Brief Question about how to best match lists with Criteria from Identifiers (thus for me: translate SQL to Mathematica ;) ). If I have two sets: ...
4
votes
1answer
201 views

Add new JDBC Driver to connect MM to SQL database

I cannot open a SQLConnection to a SQL vectorwise database and I assume the JDBC driver is the problem. A JAR file was provided to me - the only info additionally provided to me was the java class: ...
4
votes
3answers
749 views

Connect to remote Ms-sql Database

I can connect to the local Database(installed in my system) from Mathematica via ...
3
votes
1answer
92 views

How to Insert Multiples Rows in Database (SQL)

I want to insert a matrix into a database, preferably with syntax like this: ...
3
votes
1answer
430 views

Running postgresql query with backslash

I've been able to connect to a Vertica database, and also been able to run a SELECT query. But I'm not being able to run a query with a backslash in it. (Vertica has commands like postgresql.) The ...
3
votes
0answers
61 views

Create SQL Database on a manually specified directory

I am inserting lots of data into the preinstalled SQL Database in MM: con= OpenSQLConnection["demo"] > SQLCreateTable[con, SQLTable["anyname"], SQLcolums] > ... I am running out of disk space on my ...
3
votes
0answers
311 views

Microsoft SQL DatabaseLink connection using Windows Authentication from Mac

We know that Mathematic doesn't natively support Windows Authentication connect. But as we can see in this post, the problem can be easily solved when your Mathematica is in Windows version (I have ...
2
votes
1answer
55 views

Using SetDelayed wih SQLExecute

I want to create a reusable line of code that I can send a column, table name and criteria to match using the WHERE clause. ...
2
votes
1answer
269 views

Java Heap Space Error on data insertion over SQL Server

I'm trying to insert 2-milliion lines into a SQL Database, and get this error: JDBC::error: Java heap space The insert is a standart Mathematica SQL statement: ...
2
votes
1answer
127 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 ...
2
votes
1answer
90 views

SQL Queries with the Table function

Given the following connection to an SQL query works but the data comes out wrong: ...
2
votes
0answers
181 views

Can Mathematica use a MySQL ODBC connector?

I have a MySQL database that I connect to using Mathematica and would like to distribute my Mathematica code to others. We already have ODBC DSNs setup on peoples machines using the MySQL ODBC ...
2
votes
1answer
158 views

Mathematica 9.0 problem: ParallelTable with SQLExecute

I have run into the following problem: when I try to run the following code in Mathematica 9 I get SQL connection error on all kernels. The code is: ...
1
vote
1answer
238 views

How to check empty tables using SQL Select or Execute?

If[SQLExecute[con, "Select * from TABLE"] == "{}", Print["TRUE"], Print["FALSE"]] I need to know the way, if the TABLE is empty or not
1
vote
1answer
64 views

Data Table Manipulation in Mathematica 10

I would like to select columns from a table by column name. I tried the solution described here: Data Table Manipulation in Mathematica: Step 2 . I am using Mathematica 10. (I would write a comment ...
1
vote
1answer
126 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 ...
1
vote
1answer
106 views

Connecting to a SQL Server Instance

What is the syntax for connecting to a specific instance of a sql server database? Here's my code: ...
1
vote
1answer
128 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
135 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 ...
1
vote
0answers
45 views

OpenSQLConnection SSPI Library Not Loaded

I am attempting to open a connection to SQL Server with Windows Authentication (SSPI) using OpenSQLConnection and JDBC. ...
0
votes
2answers
162 views

Summarizing SQL Tables

data = Table[SQLSelect[conn, "All", {"col1", "col2"}, SQLColumn["col1"] == n && SQLColumn["col2"] == o], {n, 1, 8}, {o, 21, 30}]; This results in ...
0
votes
2answers
810 views

Network database access - How do I connect to a remote database?

I am able to connect to a specific MS Access Database when it is on the same Windows computer as Mathematica via the command ...