What is a View in Oracle?

A View in Oracle and in other database systems is simply the representation of a SQL statement that is stored in memory so that it can easily be re-used. For example, if we frequently issue the following query SELECT customerid, customername FROM customers WHERE countryid=’US’; To create a view use the CREATE VIEW command as … Read more

Display a view from another controller in ASP.NET MVC

Yes. By default, ASP.NET MVC checks first in \Views\[Controller_Dir]\, but after that, if it doesn’t find the view, it checks in \Views\Shared. The shared directory is there specifically to share Views across multiple controllers. Just add your View to the Shared subdirectory and you’re good to go. If you do return View(“~/Views/Wherever/SomeDir/MyView.aspx”) You can return … Read more

creating parameterized views in oracle11g

The context method is described here: http://docs.oracle.com/cd/B28359_01/network.111/b28531/app_context.htm e.g. (example adapted from the above link) CREATE CONTEXT dates_ctx USING set_dates_ctx_pkg; CREATE OR REPLACE PACKAGE set_dates_ctx_pkg IS PROCEDURE set(d1 in date, d2 in date); END; / CREATE OR REPLACE PACKAGE BODY set_dates_ctx_pkg IS PROCEDURE set(d1 in date, d2 in date) IS BEGIN DBMS_SESSION.SET_CONTEXT(‘dates_ctx’, ‘d1′, TO_CHAR(d1,’DD-MON-YYYY’)); DBMS_SESSION.SET_CONTEXT(‘dates_ctx’, ‘d2’, … Read more

“select * from table” vs “select colA, colB, etc. from table” interesting behaviour in SQL Server 2005

sp_refreshview to fix the view, or use WITH SCHEMABINDING in the view definition If a view is not created with the SCHEMABINDING clause, sp_refreshview should be run when changes are made to the objects underlying the view that affect the definition of the view. Otherwise, the view might produce unexpected results when it is queried.

creating my own context processor in django

The context processor you have written should work. The problem is in your view. Are you positive that your view is being rendered with RequestContext? For example: def test_view(request): return render_to_response(‘template.html’) The view above will not use the context processors listed in TEMPLATE_CONTEXT_PROCESSORS. Make sure you are supplying a RequestContext like so: def test_view(request): return … Read more