Has anyone who uses the "old" Micros database platform found a way to select the results of a query as json content? Meaning select a from tablea and have it returned at {"a", "somevalue"}
This not a question about the mainstream Oracle database but, rather, the other database platform called Micros
Related
Is it possible to fetch the data from two data source in Apache Superset? For e.g having sql query which fetch the records from MySql and Salesforce on which the slice can be generated.
I will ask for more clarification on this, do you mean to have 2 databases for querying in a single SQL query ? , Like a federated query
select * from mysql.___ inner join salesforce.___ on …. something like this ? , If this is the case, currently unfortunately Superset does not supports it.
Salesforce has lots of products, so can you please clarify which specific DB from Salesforce you are talking about ? And at the moment there is unfortunately now none salesforce's product DB supported.
I'm starting to build an API using Laravel with PostgreSQL as the data source. From what I've read so far, Laravel's Eloquent ORM currently does not support querying indexed JSON (April 2014). For example, the following simple query is not (currently) possible in Eloquent:
SELECT * FROM mytable WHERE json_data->>'firstname' = 'Paul'
As a result, it looks like I'm manually building queries until Eloquent supports it.
As this is an API, we'll need to take data from the URL/cURL query strings:
https://myapi.com/api/v1/people?firstname=Paul
results in
SELECT * FROM people WHERE json_data->>'firstname' = 'Paul'
Assuming that I do my best to sanitise the incoming query strings, am I taking a bit of a risk performing straight queries on JSON field data? Seeing as the JSON data type has not been around so long I'm still evaluating it for use within this project.
I am new SSIS and the package that i am building involves the use of Merge Join. Join is performed between a RAW File and Oracle Table. The NLS_SORT and NLS_COMP option for oracle database is "BINARY". RAW File, by default picks up Windows Collation. What is the equivalent of Windows Collation in ORACLE? Will the above settings would work or some workaround is required, since i am not getting desired results from Merge Join. I had even used SELECT.... ORDER BY NLSSORT(EmployeeName, 'BINARY_CI'), but still getting wrong results. Do anyone have idea?
Use Data Conversion element for both Sources,before Sort element. Choose same data type for both columns NLS_SORT and NLS_COMP , now you can JOIN on new columns with new data types.
Some youtube example on data conversion
I need to extract all the tables, stored procs and functions from an SQL Server 08 db that are under a particular schema. I could filter the displayed items in Management Studio and then do Script As -> Drop/Create for each of them, but I would really like to avoid this as there are quite a few items in the schema.
Is there a way to do this?
Edit:
I've had a look at this question (possible duplicate I just found). I'd rather not use an external tool as suggested, since this is at work and I'd need to get approval to use one. Nor do I want one big Create Database script - I need separate scripts for each table/sproc/function.
select
object_name(obj.object_id),
sch.name,
co.definition
from
sys.objects obj
join sys.schemas sch on sch.schema_id = obj.schema_id
left join sys.sql_modules co on co.object_id = obj.object_id
where
sch.name = 'DBO' --here goes your schema name
--The syscoments table was used back in sql 2000 and you should not use it anymore - but when so it is the sys.syscomments table
Visual Studio 2010 Premium includes database project tooling support that allows you to perform database schema comparisons between databases (where you can filter to only a specified database schema) and extract all the objects (and configuration) in a live database to a VS2010 database project, creating a script per object.
See Working with Database Projects.
Something based on
SELECT [text] FROM [syscomments]
I am building a Rails application. The application uses MySql as the main database and the oracle-enhanced adapter to access a legacy Oracle database that contains documents the application needs to search. With the oracle-enhanced adapter, I want to use the existing Oracle Text index to search for documents. My Rails application can connect to the Oracle db and the scaffolding attached to my model is working fine.
What I need now what exactly is returned from oracle-enhanced adapter when it searches an Oracle Text index? Additionally, I need to know how to access the returned values. For example, when I search the Oracle Index using the oracle-enhanced adapter syntax " Post.contains(:title, 'word')" does the returned information include document id,
document name, document date, words found in the search, and any type
document ranking or document score? I need any and all that information to update a results table in my MySql database. Can someone point me to where I
can get that information?
Answer provided in oracle_enhanced discussion group
https://groups.google.com/d/topic/oracle-enhanced/6Y52ihs9wtQ/discussion