Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Temporary Tables in power bi

Hello,   I have an problem with power bi.How we can use temporary tables in power bi? That means  I wrote a query like this in power bi while connect the data.   select * into #abc from main ta...
  • v-qiuyu-msft's avatar
    8 years ago

    Hi Anonymous,

     

    There are some error in your second query, when you reference the #abc table, you need to use #abc rather than abc. As both #abc and maintable2 have id column, you need to specify id column. You can modify the query like below: 

     

    select * into #abc from Main1
    
    select m2.* into #abc1 from #abc 
    inner join Main2 m2
    on #abc.id=m2.id
    select *from #abc1

    Before you run the query in Power BI, make sure the query works in SSMS firstly. 

     

    Best Regards,
    Qiuyun Yu