database

    python-mysql: find null data and replce -1

    python-mysql: find null data and replce -1

    이번주 연구실일은특정 컬럼의 어느 날짜의 데이터가 null 일 경우 그전날짜에서 값을 불러와 입히는 것이다 http://www.webmadang.net/database/database.do?action=read&boardid=4001&page=2&seq=14 참고 하지만 isnull함수가 아니고 다른방법이 필요함.. 이번 과제는 날짜를 역순으로 접근해야된다는 점이 포인트네요 값을 변경하는 구문 UPDATE [테이블] SET [열] = '변경할값' WHERE [조건] update finance.a000080 set total_assets = '100' where date= '2000-01-04'; 100으로 바뀐 모습 sql= "select total_assets from finance.a000080 wh..

    python-mysql - null 값을 가진 날짜, 연도 구하기

    함수를 선언합니다. def Find(table,year): sql="select date from " + table + " where col1 is null and (date >= '" + year +"-01-01') and (date