I am using the WPForms Pro version that stored the entries into a database. I found out that WPForms stored the data into my database as JSON into the fields column of wp_entries table.
I need to further process this data into reports and I would love this data to be available as standard SQL table.
Does anyone know how to convert this JSON code into a SQL output using SQL code? I have tried JSON_TABLE function but I'm a bit unfamiliar with that logic.
Backend is MySQL / MariaDB.
My JSON data looks something like this:
{"5":{"name":"Locate cost","value":"0.90","id":5,"type":"number"},"3":{"name":"Ticker","value":"IDAI","id":3,"type":"text"}
Thanks!
Related
I am in a situation where I need to convert my dynamically generated SQL Server query to Mongo DB query. Is there any tool/plugin/nuget package available that takes sql server query as input and outputs mongodb query(just like what is done in "www.querymongo.com")?
No
I would add than you don't send interpreted language (sql) than you can adapt according to the database server, but you use a proprietary API :
http://docs.mongodb.org/ecosystem/tutorial/use-linq-queries-with-csharp-driver/
Have created a JS for creating the Mongo queries dynamically, based on the operators selected.
I am making csv file by sql2excell component for joomla. It calls the data by SQL queries, so I retrieve all the information through SQL queries. The problem is some that fields have extra information which I don't want to display to the end user.
For example, the fields show the data below when I retrieve by a query:
a:3:{s:4:"city";s:3:"000";s:3:"ext";s:3:"000";s:3:"tel";s:4:"0000";}
I only want the values that are in quotes, like this: 0000000000
Is there any way I can get this by an SQL query?
No.
These values are serialized and MySQL doesn't have functions to deserialize them. You have to make a bridge between MySQL and sql2excel which would decode it, but Im not familiar with this tool so can't be of much help.
is it possible to read mongodb data with hadoop connector but save output as mysql data table. So I want to read some data from mongodb collection by hadoop, processing it with hadoop and outputing it NOT already in mongodb but as MYSQL.
I used like, fetching data from mongodb as input and store result in different mongodb address. For that one you need to specify like
MongoConfigUtil.setInputURI(discussConf,"mongodb://ipaddress1/Database.Collection");
MongoConfigUtil.setOutputURI(discussConf,"mongodb://ipaddress2/Database.Collection");
for mongodb to mysql
my suggestion is , you can write normal java code to insert whatever data you need to insert in mysql . that code may be in reduce or map function
I have a data table which is filled within my application with some values that user has entered them via an excel file. My Application targer .net framework is 2.0 and I can NOT change it to 3.0 or 3.5 in order to use LINQ feature.
So, I have to send my data table values to a stored procedure and contribute them in a join operation.
Is it a good solution or not? If yes, How can I send my Data table to Stored procedure as an input parameter?
Thank you
By using table-valued parameters you can send data to the SQLServer stored procedure. This user-defined type represents the definition of a table structure and is compatible with SQLServer 2008 and next versions.
You can find example and more information referring to this msdn aritcle
Large Complex: For large complex data I'd probably get your data into a *.csv file (if it's not already that way in Excel), use .Net to BCP it into #temp tables, and then on that same connection call the proc and have the proc always know to look for the data in the #temp tables. BCP is the fasted way to get large chunks of data into SQLServer.
Medium Size: If the size of the data is small then you could format it as XML and send that to the proc. Here's a quick example using C# http://www.a2zdotnet.com/View.aspx?Id=107
Small Delimited: For small list type data you might be able to get away with sending it as comma delimited string of values. This is very handy when sending a list of ID's to a proc (http://blog.logiclabz.com/sql-server/split-function-in-sql-server-to-break-comma-separated-strings-into-table.aspx)
Im running SQL Server 2008 on winows server 2008 and I have a stored proc that outputs some information about a product entity with the inout as a product Id.
It outputs a reecord to represent the product information followed by a second table full of orders.
Im wondering if there is any way to call the stored proc and write the orders data to a CSV file from the command shell?
The other alternative is to try this using a custom written application and a data reader but I dont realy want to go down this route.
You should be able to use the SQLCMD command-line utility to do this. It's a complex tool to use; the BOL entry can be found here, and if necessary a bit of googling should turn up the odd tutorial that goes over the basics.