Skip to content
Advertisement

How to create a summary view from multiple views?

Given I have the following view where N=1..100 Currently we have summary views which insert to a table like The table is then used to create an overall summary like Is there a way to create summary_view_all_plants without having to create each individual summary_view_N? I would like to be able to iterate though a list of reports and dynamically generate

Oracle find a constraint

I have a constraint called users.SYS_C00381400. How do I find what that constraint is? Is there a way to query all constraints?

Should I quote numbers in SQL?

I remember reading about quoting stuff when doing a SQL query and that when you quote something, it becomes a string. I also read that numbers should not be quoted. Now, I can’t find that quotation and I need to refresh my memory to see if I should quote numbers. Answer You should not quote numbers if you want to

Using alias in query and using it

I have a doubt and question regarding alias in sql. If i want to use the alias in same query can i use it. For eg: Consider Table name xyz with column a and b Is this possible in some way ? Answer You are talking about giving an identifier to an expression in a query and then reusing that

How to return empty groups in SQL GROUP BY clause

I have a query to return how much is spent on-contract and off-contract at each location, that returns something like this: The problem is, I only get one row for locations that are all ad-hoc or all contracted expenses. I’d like to get two rows back for each location, like this: Is there any way I can accomplish this through

Advertisement