Hemant K Chitale wrote:Agree.
All I am saying is : Some people do have different opinions.
Another_user wrote:No they are not. I will agree that a lot of brain dead IDE's along with other stupid features such as editing code in the database instead of from source control, have a similar broken default to allow lazy developers who don't know enough to format their own code to to turn it all to upper case. This does not make upper case an industry standard, it makes shoddy, slapdash unreadable code an almost de-facto industry standard unfortunately.
My only point is that regardless of the science, the history, the facts, and the experts, uppercase reserved words are simply the industry standard in PL/SQL programming.
Another_user wrote:Many (usually dating back numerous versions). Not all.
My only point is that regardless of the science, the history, the facts, and the experts, uppercase reserved words are simply the industry standard in PL/SQL programming. Right or wrong, this is how most every major IDE, including the one from Oracle, formats code. This is largely how many of the non-wrapped SYS packages are formatted.
Billy Verreynne wrote:Sorry did not get what you mean?Sandeep98191 wrote:Of course. As all errors are SUPPRESSED in your code - pretending that whatever the error is, it never happens.
I tried and it is working (without any error)
Now how can you call that a robust solution?
Certainly there can be no uncertainty about what the column names are that are being used. What if the doc used this instead?
SELECT EMPNO, ENAME, JOB FROM EMP WHERE DEPTNO = 20;
Is the first colum named EMPNO? Or is it really "Empno" but the enclosing quotes were erroneously omitted? Hopefully the first.
SELECT Empno, ename, job FROM EMP WHERE deptno = 20;
I find it extremely helpful when reviewing code to have reserved words such as DECLARE, BEGIN, END in uppercase even though technically they don't need to be. It not only matches the syntax diagrams and documentation but it helps show the structure of the content much the way that indentation does.
Example 4-6 Simple CASE Statement SQL> DECLARE 2 grade CHAR(1); 3 BEGIN 4 grade := 'B'; 5 6 CASE grade 7 WHEN 'A' THEN DBMS_OUTPUT.PUT_LINE('Excellent'); 8 WHEN 'B' THEN DBMS_OUTPUT.PUT_LINE('Very Good'); 9 WHEN 'C' THEN DBMS_OUTPUT.PUT_LINE('Good'); 10 WHEN 'D' THEN DBMS_OUTPUT.PUT_LINE('Fair'); 11 WHEN 'F' THEN DBMS_OUTPUT.PUT_LINE('Poor'); 12 ELSE DBMS_OUTPUT.PUT_LINE('No such grade'); 13 END CASE; 14 END; 15 /