oracle view

카테고리 없음 2016. 4. 22. 16:11

SQL> set linesize 10000

SQL> set long 10000

SQL> set pagesize 60

SQL> select text from all_view where view_name = 'MY_VIEW_NAME';




http://www.javadecompilers.com/


ctrl + shift + r 창에서 소스 파일 이름 입력
소스창에서 전체선택 (ctrl + A )

아래 아이콘 클릭
<-
->

반전된 소스 복사 (ctrl + c)




$ cat 1.sh

#!/usr/bin/ksh

integer rows1 rows2


echo "Start ..."

echo "parameter count : $#"

if (($# != 2)) ; then

    echo "Parameter count error"

    echo "Usage: $0 key1 key2 "

    exit

fi


sqlplus -s  oraid/orapwd @1.sql $1 > tabs21

cat tabs21

rows1=`cat tabs21|grep RETURN | sed 's/RETURN.//'`


sqlplus -s  oraid/orapwd @1.sql $2 > tabs22

cat tabs22

rows2=`cat tabs22|grep RETURN | sed 's/RETURN.//'`


echo

echo "key:$1 -> rows1:$rows1"

echo "key:$2 -> rows2:$rows2"

echo


if ((rows1 != 0 || rows2 != 0 )) ; then

    print -u2 OK

else

    print -u2 NOT OK

fi


echo "End"


############################# END ####################################################


$  2.sql

SET SERVEROUTPUT ON

SET FEEDBACK OFF

DECLARE  row_count NUMBER;

BEGIN  SELECT COUNT(*) INTO row_count  FROM TABLE_NAME WHERE key = '&1';

--DBMS_OUTPUT.PUT_LINE(row_count);

DBMS_OUTPUT.PUT_LINE('RETURN:' || row_count);

END;

/

EXIT


ksh basic

카테고리 없음 2016. 3. 2. 16:22


#할당때공백쓰지말것

TM_YYYY = "2016";  # space BAD #not found, error

TM_YYYY="2016";  # no space GOOD

# 비교 문에도 공백 넣지 말 것

#숫자 비교

integer this_mm

this_mm=3;

if ((this_mm==3)); then

fi

# 파라미터 비교

if [[ $1 = -B ]]; then

fi



Error message:

Updating the Git index failed.  A rescan will be automatically started to resynchronize git-gui.

warning: LF will be replaced by CRLF 


조치 : 

cmd 창 에서

cd c:\program files\git\bin

 c:\program files\git\bin > git config --global core.autocrlf false


참고:http://stackoverflow.com/questions/10573815/why-is-updating-the-git-index-failed-displayed


http://stackoverflow.com/questions/13815640/a-proper-wrapper-for-console-log-with-correct-line-number


<script>

var Log = Error;

Log.prototype.write = function () {

    var args = Array.prototype.slice.call(arguments, 0),

        suffix = this.lineNumber ? 'line: '  + this.lineNumber : 'stack: ' + this.stack;


    console.log.apply(console, args.concat([suffix]));

};


var a = Log().write('monkey' + 1, 'test: ' + 2);


var b = Log().write('hello' + 3, 'test: ' + 4);


</script>


1. firstChild error

* 조치 : 개행문자 삭제

* 보기

<!-- IE8 -->

<body>

<table>


<!-- IE11 -->

<body><table>

2. lastChild error

// IE8
obj2 = obj.lastChild;
 
// IE11
boj2 = obj.lastChild.previousSibling

ref.

https://msdn.microsoft.com/library/bg182625(v=vs.85).aspx

http://quirksmode.org/dom/core/



3.  32 bit 로 실행하기 (activeX 등 을 64 bit 에서 인식 못한다)


[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]

"TabProcGrowth"=dword:00000001


http://answers.microsoft.com/ko-kr/ie/forum/ie11-windows_7/%EC%9C%887-64%EB%B9%84%ED%8A%B8/53517b1d-d18d-4b27-bbc8-4bdb42f43eea?auth=1


4.  iframe

IFRAMEOBJ.document.body.scrollHeight

-->

IFRAMEOBJ.contentWindow.document.body.scrollHeight


bald: ctrl + b

특정 행으로 가기 : ctrl + g (a123. b123. c123)


인터넷 옵션 > 고급


에 아래 두 항목 선택해제 


* 스크립트 디버깅 사용 안함(Internet Explorer)

* 스크립트 디버깅 사용 안함(기타)