Results for "sql mistakes"

Tags

    • admin

      SQL mistakes - Divisor is equal to zero

          To perform division operation the divisor should not be zero otherwise the query execution will be aborted by throwing error message as “Divisor is equal to zero”. For instance, there is an order having ‘orderqty’ = 100 (A) and ‘order taxamt&rs...

      Tags: oracle, sql mistakes, mismatch, firstplanet, divisor, experts speak

      • admin

        SQL mistakes – Column ambiguously defined

            This is very common mistakes occur when you query columns more than one table. This will happen when a column name in a join is referenced ambiguously, it exists in multiple tables. So if a column exists in multiple tables it is necessary to have the table reference. For in...

        Tags: oracle, sql mistakes, mismatch, firstplanet, experts speak

        • admin

          Experts speak

              This mistake is due to misperception of join operation. Inner join to non mandatory reference will reduce rows and provide wrong information. For instance there are 10 orders in that 4 are Point of sales orders, POS (cash and carry) and 6 are credit orders. Order will have ...

          Tags: oracle, sql mistakes, joins, firstplanet, experts speak

          • admin

            SQL mistakes – Subquery NULL value, returns empty rows

                This mistake will occur while fetching data based on values not listed in a list of values.  For instance if you want to retrieve all the invoices which are not yet paid and the payment table will have invoice reference once paid. SELECT invocieid,customerid,total FR...

            Tags: oracle, sql mistakes, mismatch, firstplanet, experts speak

            • admin

              SQL mistakes – Subquery return more than one value

                  This type of error will occurs when you retrieve a value based on some correlation with the main query table. For instance products are stored in the locators and to fetch the products details with the storage locator the following query will be used SELECT p.prodid,p.nam...

              Tags: oracle, sql mistakes, firstplanet, free training, experts speak

              • admin

                SQL mistakes – Use of SELECT *

                This type error commonly occurs while inserting rows into a table using SELECT statement. For instance the sales pricelists are inserted into “SalesProductPrice” from the “ProductPrice” table INSERT INTO SalesProductPrice SELECT * FROM ProductPrice WHERE issales= '...

                Tags: oracle, sql mistakes, select *, firstplanet, experts speak

                • admin

                  SQL mistakes – Column length mismatch

                  This type of error commonly occurs while inserting the rows from source tables for reporting purpose.  For instance the aging report can be displayed from “T_Aging” table, which calculated and inserted from 3 tables order, invoice and payment. INSERT INTO t_aging (col1,col2,...

                  Tags: oracle, sql mistakes, mismatch, firstplanet, experts speak

                  • admin

                    SQL mistakes - Production errors & best practice

                    The change of Production environment using SQL or Patch is most critical process which involves prior approval/access to apply.  SQL execution in production environment sometime lead to big issues due to typing error, wrong update, accidental truncate, environment selection and so on. The...

                    Tags: oracle, sql mistakes, sql best practice, firstplanet, experts speak