Skip to content
Advertisement

ORA-01731: circular view definition encountered

we are migrating over to oracle from sql server side. on sqlserver we used to have a view like the following create view blah AS Select column1, column2 FROM blah; but doing this on …

Delete duplicated rows and Update references

How do I Delete duplicated rows in one Table and update References in another table to the remaining row? The duplication only occurs in the name. The Id Columns are Identity columns. Example: Assume …

PHP MySQL INSERT return value with one query execution

Is there anything returned from MySQL/PHP on a INSERT query being executed? Here is my function which I have in a CLASS. This is how I call the function But executing a INSERT query the $rs returns nothing. Does my function need help or is this the default behavior? Any tips would be helpful as well. Answer INSERT just returns

Combining OUTER JOIN and WHERE

I’m trying to fetch some data from a database. I want to select an employee, and if available, all appointments and other data related to that employee. This is the query: SELECT TA.id, TEI….

Changing INT to BigInt

I have a warehouse table with 16 tons of data in it. I have a few Integer columns in it. We have to cast these into BIGINT for every query we write, because the SUM is too large to fit in an INT. We now have a new datamart under development. So we thought, why not change all these columns

Incorrect syntax near the keyword ‘with’…previous statement must be terminated with a semicolon

Im using SQL Server 2005 . I have 2 WITH Clauses in my stored procedure But the error occurs Incorrect syntax near the keyword ‘with’. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. What are my options? Is there any splitter I don’t know about? Answer Use

Select latest revision of each row in a table

I have table structures that include a composite primary key of id & revision where both are integers. I need a query that will return the latest revision of each row. If I understood this answer …

Advertisement