I created two Databases for single report (Oracle and PostgreSQL) in oracle I have procedure to call a report and in PostgreSQL I have a function, how can I call single report from both databases? when I select Oracle from application it fetches data from Oracle and when I select Postgres it fetches from Postgres. What modification i should do in jasper report only?
Oracle Calling:
PostgreSQL:
Related
I created a table for eg:
select * into Xtable
from Ytable
union
select * from Ztable where serviceyear >= '12/1/2020.
Then I connected Xtable with Tableau. Does Xtable update every month in the SQL server? How to update in the tableau work book every month?
If you created a table called Table in a SQL Server database, then you will need to automate loading the table with additional data over time. Otherwise, it only contains the data that you inserted at a single point in time.
SQL Server comes with a SQL Server agent which can be used to schedule running SQL Server agent jobs. You could automate running your insert statement with this solution. Alternatively, you can automate running your SQL script from a local workstation or server through endless numbers of methods.
Please note you won't be able to run SELECT * INTO as in your example each time. This syntax is used to create a table. Unless you drop the table before running the command, you will need to use an INSERT INTO Xtable SELECT * FROM YTable UNION ... instead.
If you don't have a method for loading the data into the underlying SQL Server table, then you could create a view instead of a table. The view could use the same definition as your insert statement and it will automatically show new data as data is appended to either Ytable or Ztable.
If you are using a live query for your data source, then Tableau will show the most recent data when you load the workbook. Depending upon your caching settings, you may need to click the Refresh button in Tableau Server or refresh the data source in Tableau Desktop.
If you are using an extract, then you can schedule an extract refresh in Tableau Server or manually refresh the extract locally.
i have two database residing on same server , say I have db1 and db2 , now i want to access some tables from db1 from db2 , how can I do this in Sql Server-12?
If you're using Azure SQL database(single database), USE statement is not supported. We can use Elastic query to achieve across database query.
Ref: Azure SQL Database elastic query overview:
The elastic query feature (in preview) enables you to run a
Transact-SQL query that spans multiple databases in Azure SQL
Database. It allows you to perform cross-database queries to access
remote tables, and to connect Microsoft and third-party tools (Excel,
Power BI, Tableau, etc.) to query across data tiers with multiple
databases. Using this feature, you can scale out queries to large
data tiers and visualize the results in business intelligence (BI)
reports.
If you're using Azure SQL managed instance, it's same with on-premise SQL Server.
for example you want to access to table[A] > schema[dbo] > database[C]
Assume current user has access to both database
SELECT * FROM [C].[dbo].[A]
Join [A] table from [schema_1] schema from [db_1] Database and [B] table from [schema_2] schema from [db_2] Database from different database on same server
When use db_1
USE [db_1]
SELECT * FROM [schema_1].[A] AS [db_1_A] INNER JOIN [db_2].[schema_2].[B] AS [db_2_B] ON [db_1_A].[field_1]=[db_2_B].[field_1]
When use db_2
USE [db_2]
SELECT * FROM [db_1].[schema_1].[A] AS [db_1_A] INNER JOIN [schema_2].[B] AS [db_2_B] ON [db_1_A].[field_1]=[db_2_B].[field_1]
I am using Data Stage version 11.5. We recently migrated from Oracle to PostgreSQL. But now I am facing issues in how to call the PostgreSQL procedure in Datastage.
CALL executes a procedure.
If the procedure has any output parameters, then a result row will be returned, containing the values of those parameters.
See: https://www.postgresql.org/docs/current/sql-call.html
I want to search a value in all column of all tables in my database. I have done it before in SQL but I don't know how I can do this in db2.
There is a pretty good (free) SQL tool SQL Workbench which has this functionality
I have a small database with a table with 2 columns (ID and Name)
I have an ASP.Net form that i want to input an ID and a Name and upon clicking the button, it will insert rows into the database
I want to do this using a dataset. Meaning, I want to add the rows first into a ado.net dataset. Once I have the dataset with its table and rows, I want to insert data into the SQL Server 2008 database using SQLDataAdpater.
I can manually create a DS and add rows in it
How do I accomplish inserting data to database with the dataset I created?
Maybe this will help you
HOW TO: Implement a DataSet SELECT INTO Helper Class in Visual C# .NET
http://support.microsoft.com/kb/326009/en