Questions tagged [database-view]
64 questions
14
votes
1 answer
FORCE EDITIONABLE VIEW in Oracle
I know view, materialized view, force view etc in Oracle database. today when i had to tune a package I saw below
CREATE OR REPLACE FORCE EDITIONABLE VIEW "IMCAPPS"."PJM_EID_ONHAND_VALUES_V"
Can anybody tell me what is FORCE EDITIONABLE VIEW And…
user14046507
8
votes
2 answers
Rails migration for altering existing database view
I have a view named my_view which I created using the following migration.
class CreateMyView < ActiveRecord::Migration
def change
execute <<-SQL
drop view if exists my_view
SQL
execute <<-SQL
CREATE OR REPLACE VIEW…

Tony Vincent
- 13,354
- 7
- 49
- 68
4
votes
1 answer
Pass parameter for @DatabaseView in Room Database Android
I m having a databaseView code like this.
@DatabaseView("SELECT * FROM Product")
data class ProductDatabaseView(
var productCode: String? = "",
var productName: String? = "",
var longDescription: String? = "",
var productUom: String?…

Android Rajaganapathi
- 175
- 1
- 11
3
votes
3 answers
H2 database: How to list all views?
What is a H2 command to list all views in the database?
I have expected that SHOW command would do the job but there is no option there to list views.

tomto
- 33
- 1
- 4
2
votes
4 answers
What do indexed views actually index
As I understand it SQL views represent 'a virtual table' where the data is actually held in other 'backing tables' the view references. Indexes can be added to views to improve performance, but what do these indexes actually reference if the view is…

andrew pate
- 3,833
- 36
- 28
2
votes
1 answer
Ruby on Rails converting Timescale SQL rate code to Ruby
I'm trying to use the Rate function from timescale to generate graph data. Right now I have a database view that does this using the concepts from the SQL code below from TimescaleDocs:
SELECT
time,
(
CASE
WHEN bytes_sent >=…

Rachel
- 107
- 7
2
votes
1 answer
Room database fails to return group_concat column
I'm trying to create a DatabaseView in room to get a desired data from several tables. This is my database view:
@DatabaseView("SELECT site.name AS address, group_site.name AS groupName, group_site.member_id AS memberId " +
"FROM site,…

Sina
- 2,683
- 1
- 13
- 25
2
votes
2 answers
Which is the fastest way to create a test database(with all data) from a production database which is quite big in size (400 GB)?
I am a java person and not so much familiar with Oracle available features. Please help me.
The requirement is that, we are looking for some virtual(replica/mirror/view) database to be created from Production database just for testing purpose. Once…

deepti mullur
- 569
- 1
- 4
- 14
2
votes
1 answer
Can I drop view but save dependent views?
I want to drop a view but save dependent views. I just want to update a view's SQL text, but can't do it without deleting it. When I delete it all dependents are deleted. I want to avoid it.

Irakli Ugulava
- 43
- 3
2
votes
1 answer
Incorrect syntax near sp_refreshview
One of our tables is loosing a column and related views need to be refreshed. I ran the procedure sp_refreshview ok on it's own for one view, although I had to pick the actual database, even though I had the DB.dbo.View_name extension.
I am now…

Andrew
- 1,728
- 8
- 28
- 39
2
votes
0 answers
Postgres query doesn't execute when has WITH statement
I'm applying scenic gem for creating database view for Postgres database. I have a order (ops_orders) table with 73k records and order line item (ops_order_line_items) that belongs to order with 170k records.
The problem is that the query has WITH…

Leo Le
- 91
- 1
- 7
2
votes
1 answer
MySQL join not behaving as expected
I have created a MySQL view to grab data from four differents tables :
CREATE VIEW `documents_scannes_view` AS
select `ds`.`id_document` AS `id_document`,
`ba`.`num_boite` AS `num_boite`,
`ds`.`annee` AS `annee`,
…

manianis
- 109
- 3
- 13
1
vote
0 answers
How to create PostgreSQL Schema Views with data column splitted inside multiple tables
I am using django with postgreSQL to make a book library website. I have three models below, they were all simplified for the showcase:
class Tag(models.Model):
TagName = models.CharField(verbose_name='Tag name',max_length=128)
class…

deeded307
- 29
- 4
1
vote
0 answers
Mysql: how to create a performant view with a group by
I have a query that I want to give someone permissions to view. The query is pretty basic but along the lines of:
-- In actuality, this is a 60 line SQL query joining 5 tables
SELECT * FROM
GROUP by a.id
Normally this…

David542
- 104,438
- 178
- 489
- 842
1
vote
2 answers
How to access views created in the database using frappe
We have created a view in the mariadb. We want to access that view from Frappe. Does frappe supports this kind of functionality?

Mohan Pillimitla
- 38
- 6