본문 바로가기

Project/PO-MI

MySQL 문법 공부 테이블 생성하기 use database; create table table_name( id varchar(12) primary key ); 테이블 삭제하기 drop table table_name; 테이블 비우기 truncate table_name; 컬럼 추가하기 alter table table_name add column_name varchar(10) not null; 컬럼 삭제하기 alter table table_name drop column_name; 컬럼 타입 변경하기 alter table table_name modify column_name varchar(10); 데이터 입력하기 insert into table_name values(' ',' ',' '); 데이터 변경하기 update table_.. 더보기
mysql for excel 사용 시 int타입 unmapped table 속성을 varchar로 바꾸고 엑셀 데이터 입력 후 alter table table modify column date; 속성 자료형을 바꿔주었다. 더보기
csv를 사용하지 않고 쉼표있는 엑셀 파일 mysql 업로드 먼저 엑셀에서 mysql에 연결할 수 있도록 링크에서 다운 받는다. https://dev.mysql.com/downloads/file/?id=470616 No thanks, just start my download. 버튼을 눌러서 mysql-for-excel-1.3.7 파일을 다운받은 후 설치한다. 설치 후에는 엑셀-데이터에 들어갔을 때 MySQL for Excel 이라는 버튼이 생긴다. 넣고싶은 부분(셀)을 드래그 한 후에 MySQL for Excel 버튼을 누르고 넣고싶은 데이터베이스를 더블클릭한다. 스키마 선택 후에 원하는 테이블 선택 후 Append Excel Data to Table을 누르고 새로 뜨는 창에서 Append를 눌러주면 데이터베이스에 업로드가 완료된다. 더보기
ec2에 파일 업로드 했을 때 mysql 테이블로 옮기기 * 테이블 내용 지우는 법 truncate table; 맥 터미널로 파일 업로드 후 파일 위치 확인하기. load data local infile '/home/ec2-user/화물품목통계분류.csv' into table tablename fields terminated by ',' lines ter minated by '\n' ignore 1 rows; load data local infile '/home/ec2-user/화물품목통계분류.csv' into table tablename fields terminated by ',' enclosed by '"' lines terminated by '\n' ignore 1 rows; 더보기
Fulfillment follow-up intent 연동 안될 때 코드는 맞는데 결과값이 출력이 안될 때는 intent에서 phrases에 값이 들어가 있는지 확인하자. VALUE에 값이 들어가 있다면 해제 한 후에 다시 실행하면 해결! 더보기
엔티티 추가하기 1. 엔티티를 임의로 생성한다 (한개정도 입력해서) 2. 생성한 엔티티를 CSV로 다운받는다. 3. 다운받은 CSV를 메모장으로 열어서 값을 교체해서 저장한다. (실제로 만들 엔티티 값들. "여객선","여객선") 4. 저장한 CSV로 다시 엔티티 업로드한다. 더보기
엑셀파일 csv로 따옴표 추가해서 저장하기 엑셀파일에서 Alt+F11 누르고 우클릭-삽입-모듈 모듈에 코드 입력 후 Sub CSVFile() 'updateby Extendoffice Dim xRg As Range Dim xRow As Range Dim xCell As Range Dim xStr As String Dim xSep As String Dim xTxt As String Dim xName As Variant On Error Resume Next If ActiveWindow.RangeSelection.Count > 1 Then xTxt = ActiveWindow.RangeSelection.AddressLocal Else xTxt = ActiveSheet.UsedRange.AddressLocal End If Set xRg = Applicati.. 더보기

728x90
LIST