Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

5
votes
0answers
37 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 ...
11
votes
2answers
124 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, ...
1
vote
3answers
76 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
58 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
64 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
317 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
119 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
61 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 .....
4
votes
0answers
85 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
152 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
25 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
24 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
76 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: ...
2
votes
1answer
104 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 ...
0
votes
2answers
57 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
35 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
1k 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
55 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 ...
1
vote
0answers
68 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
67 views

Using MemberQ or Contains* in a query fails

Using MemberQ or Contains* in a query fails: ...
2
votes
0answers
49 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 ...
4
votes
0answers
53 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
458 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
61 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
161 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 ...
18
votes
1answer
967 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 ...
5
votes
1answer
207 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
217 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
1answer
161 views

OrientDB JDBC OpenSQLConnection : Execution of SQL failed

I am testing JDBC connection of OrientDB v2.0.13 from Wolfram Language. ...
2
votes
0answers
88 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
126 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 ...
11
votes
1answer
1k 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 ...
5
votes
2answers
859 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 ...
6
votes
4answers
632 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"] ...
3
votes
1answer
402 views

How to Insert Multiples Rows in Database (SQL)

I want to insert a matrix into a database, preferably with syntax like this: ...
4
votes
0answers
144 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 ...
1
vote
1answer
869 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
10
votes
3answers
2k 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: ...
11
votes
4answers
2k 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 ...
14
votes
1answer
361 views

Benefit of using Dataset to collect SQLSelect output

Considering a DatabaseExample included with Mathematica: ...
5
votes
1answer
524 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 ...
1
vote
1answer
277 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
64 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
365 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: ...
0
votes
2answers
198 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 ...
2
votes
1answer
127 views

SQL Queries with the Table function

Given the following connection to an SQL query works but the data comes out wrong: ...
1
vote
1answer
189 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 ...
5
votes
1answer
704 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: ...
1
vote
1answer
156 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
4answers
1k views

Connect to remote Ms-sql Database

I can connect to the local Database(installed in my system) from Mathematica via ...