I am trying to build an order system that is able to insert a compound order that consists of multiple items and amounts. My database layout is as follows: I have an order table, containing an autoincrement id, item_id, amount and order_group_id columns. I also have an order_group table containing an autoincrement id and a person_id column. The idea is
Tag: sql-view
Creating Postgres View getting ERROR: column “id” specified more than once
SCENARIO: I have this select statement that JOINs a bunch of tables together: I’d like to create a Postgres View. So wrote it out like this: I keep getting this error: ERROR: column “id” specified more than once QUESTIONS: How do I fix this error? I would like to create a view called “all_events”. Are Postgres View sort of like
Replicating functionality of excel cell referencing (or calculations over multiple views)
I have a table with 3 columns that contains a number of data streams all in one table. val_name is the name of the data stream, val_sequence is the incrementing sequence number and val contains the …
SQL View slow when filtered. Is there a clean way to improve performance?
Let me open with: SHOWPLAN permission denied in database ‘MyDatabase’. With that out of the way, I’ll layout my situation. So, The database I work with has a view that executes fairly quickly. …
ORA-04063: view has errors
I have 3 users (schemas) in my database. User A holds table X I created a view Y for user B and a view Z for user C. The views are identical: The first view works fine; for the second one I have the following error when trying to see data (from SQL developer): ORA-04063: view “User_C.Z” has errors. I
Change PostgreSQL columns used in views
I would like PostegreSQL to relax a bit. Every time I want to change a column used in a view, it seems I have to drop the view, change the field and then recreate the view. Can I waive the extra protection and just tell PostgreSQL to let me change the field and then figure out the adjustment to the
mysql CREATE VIEW not working from mysql_query
I have a code to create VIEW in mysql database which is working fine on my local server. It creates and crop view normally. But on my Online server it gives error for online database I manually create VIEW in Database form PHPmyAdmin [Myadmin is in localhost online] it creating, SO i have permission to create VIEW on online database.