반응형
반응형

[mssql]  숫자 앞에 0 으로 채우기, Replicate

 


-- 2013-9-2
select YEAR(getDate()), Month(getdate()), day(getdate())


-- 2013-09-02
select YEAR(getDate()), replicate('0',2 - len(Month(getdate()))) + cast(Month(getdate()) as varchar), replicate('0',2 - len(day(getdate()))) + cast(day(getdate()) as varchar)

반응형
반응형

 

-- 임시테이블명 : #mytemptable'

 IF OBJECT_ID('tempdb..#mytemptable') is not null

      select * from #mytemptable'with(nolock)

 

SELECT OBJECT_ID('tempdb..#mytemptable')

 

 

스키마 범위 개체의 데이터베이스 개체 ID를 반환합니다.

반응형
반응형

--Getdate()
Select Getdate()

 

--YYYY/MM/DD
Select Convert(varchar(10),Getdate(),111)

 

--YYYYMMDD
Select Convert(varchar(10),Getdate(),112)

 

--HH:MM:SS
Select Convert(varchar(8),Getdate(),108)

 

--HH:MM:SS:mmm
Select Convert(varchar(12),Getdate(),114)

 

--HHMMSS
Select Replace(Convert(varchar(8),Getdate(),108),':','')

 

--HHMMSSmmm
Select Replace(Convert(varchar(12),Getdate(),114),':','')

 

--YYYY/MM/DD HH:MM:SS
Select Replace(Convert(varchar(30),Getdate(),120),'-','/')

 

--YYYY/MM/DD HH:MM:SS
Select Replace(Convert(varchar(30),Getdate(),121),'-','/')

 

--YYYY/MM/DD HH:MM:SS
Select Convert(varchar(10),Getdate(),111) + Space(1) + Convert(varchar(8),Getdate(),108)

 

--YYYYMMDDHHMMSS
Select Convert(varchar(10),Getdate(),112) + Replace(Convert(varchar(8),Getdate(),108),':','')

 

반응형
반응형

날짜 - reg_day

 

현재 날짜 : getdate()  -> select getdate()

 

select convert(VARCHAR, reg_day, 120)

-> 날짜를 문자형(varchar)으로 변환

 

CAST, dateadd(), datediiff() 등이 있다.

 

반응형
반응형

Pinba — A MySQL storage engine and monitoring server

Pinba is a MySQL plugin and storage engine that acts as a real-time monitoring and statistics server for PHP. Its main goal is to let developers monitor their PHP scripts, locate bottlenecks, and direct attention to the code that most needs it.

pinba

Homepage: http://pinba.org/
GitHub: https://github.com/tony2001/pinba_engine
Docs: https://github.com/tony2001/pinba_engine/wiki

 

//=================================================================

 

2. Installation requirements
--------------------------------

Pinba requires MySQL 5.1.x sources to be built and MySQL 5.1.x installation to run. MySQL 5.1 is the first version which supports pluggable storage engines, 
so older MySQL versions cannot and will never be supported.

Libraries required:
* Google Protocol Buffers - http://code.google.com/p/protobuf
* Judy - http://judy.sf.net
* libevent - http://monkey.org/~provos/libevent/
(this one may be already installed in your system, just make sure it's new enough (1.4+ is enough) and check that you have -devel package installed).

Optionally used:
* Hoard memory allocator - http://www.hoard.org

Using --with-hoard option you can add compiled-in Hoard support. It helps to reduce memory consumption (and Pinba is quite memory hungry when it comes to millions of timers). 2x smaller memory footprint with Hoard is what I regularly see.


 

반응형
반응형

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

 

Oracle SQL Developer 3.2.2 (3.2.20.09.87)

November 1, 2012

 3.2.2 Release Notes
 3.2.2 Bugs Fixed
 New Features
 Documentation

Platform
Windows 32-bit - zip file includes the JDK1.6.0_35 Download Download 209 M
Windows 32-bit - Installation Notes Download Download 174 M
Windows 64-bit - Installation Notes Download Download 174 M
Mac OS X - Installation Notes Download Download 173 M
Linux RPM - Installation Notes Download Download 173 M
Other Platforms - Installation Notes Download Download 174 M

Download previous releases here

반응형

+ Recent posts