Virtual Views in DataGrip

已回答

Hi, 

I was wondering if there is some kind of virtual view functionality in DataGrip. I have not found anything by searching the web and also asking colleagues with more experience in using it have no answer on that. 

I currently have the problem that I have to work with an Oracle Database where I have only read access to some views which just represents the quite complicated and not well named database schema. 

I wanted to create some views which help me to understand the data, but as I am not allowed to create views I am working mostly with "WITH... " statements, which is quite a pain when I want to query different things on such "views" at the end. 

What I would be looking for is something like

var my_view = "SELECT * FROM ..." 

SELECT * FROM my_view WHERE <condition1>

Select * from my_view WHERE <condition2>

Mainly it is about storing a SQL statement in a variable which I can use in multiple SQL Statements later on. 

Regards

Alex 

 

0

At the moment it's not possible to create such views. You can file a new feature request in our YouTrack

But, you can try to create the following:

  1. Create SQLite data source (stored as file locally)
  2. Execute your queries and import data as CSV
  3. Import CSV into the real tables in SQLite and execute queries against them
0

请先登录再写评论。