Output DAX Evaluate results to a SQL Server Database table - sql

So I have a DAX query that I have built in SSAS. But since my application like DAX, I thought pushing the set of DAX results to a database server table would be the ideal solution for my application to read.
How do I output the contents of a DAX query to a SQL Server database table? And if possible truncate the contents of the table before each run?
I'm using SQL Server 2016 if that helps.

I got around this by using a linked server to output the contents of an 'open query' to a table variable in SQL.

Related

How to extract MDX or SQL query from excel pivot table

I have an excel file reading some data from an OLAP service. The query was constructed using the GUI. How can I obtain the corresponding MDX or SQL query that excel actually communicates to the OLAP server?
You can do it through SQL server profiler. Just run the profiler on Analysis Services and run/refresh your query in Excel and you will see the MDX query in the profiler.
Right click on your pivot table -> Tools -> Show Mdx

How to use SQL query on CSV file in POWER BI Desktop

We can use SQL Server link between POWER BI and SQL server to make SQL Query on a database. But If I only have CSV file how can I request some information WITH SQL QUERY. In fact we can import CSV file and (I suppose) do some query with the POWER QUERY(it's DAX language I think), but I don't want to use DAX I want to use SQL QUERY like requesting data from SQL Server.
Example of query with SQL Server: = Sql.Database("LAPTOP-P3DH07C9", "Projet Big Data", [Query="SELECT * FROM MatchComplete"])
Is it possible or I must use DAX ?

Dynamic SQL Query for Matrix

I need some help in creating a stored procedure or a dynamic SQL query to query a matrix and have a output in a required format.
Database: SQL Server 2014
States table - screenshot:
Required output
More states will added to the table. So the Script should be able to dynamically get all the rows and columns.
The output is to create a new table.
Thanks in advance.
Try this below links for your reference it may help you for logic
How to pivot table in SQL Server with a stored procedure?
Dynamic Pivot Queries with dynamic dates as column header in SQL Server
Note: The above links for pivoting.better refer it and do the unipovt

Sql Server 2000 - table last modified

Does anyone know of ANY way to query a Sql Server 2000 database to find out when tables were last modified please?
It is unfortunately not stored in SQL 2000 unless you have custom columns storing that type of data for the table. So if you are looking for something built into SQL Server you are sadly out of luck.

Informatica - How to Pass queries from a table to SQL Transformation and get the results

SO heres what I am trying to do.
I have a table which has 2 columns - QC_Check and Query. For each QC_Check I have a query. There are several records like this.
Is there a way using SQL transformation that, I can fetch the SQL query stored in the Query column to Informatica, run the queries in Teradata and get the results stored somewhere.
Although, I have not tried it myself, this should be possible using SQL transformation in Query mode with Dynamic SQL Queries.
Use the table with Query column as a source. Create a SQL transformation with Query mode. Connect the Query column to the SQL transformation.
Write ~Query_Port~ in the SQL editor in the SQL transformation:
If you want to capture the results from your query, you have to configure output ports for columns you retrieve from the database.