반응형
반응형

-- 프로시져(Stored Procedure) 목록 보기
SELECT ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE='PROCEDURE'
ORDER BY ROUTINE_NAME
 
 
-- 프로시져 내용 보기
exec SP_HELPTEXT proc_Procedure


 

 

반응형
반응형

Robomongo 0.8.2

Shell-centric cross-platform MongoDB management tool

http://www.robomongo.org/

About

Robomongo — is a shell-centric cross-platform open source MongoDB management tool (i.e. Admin GUI). Robomongo embeds the same JavaScript engine that powers MongoDB's mongo shell. Everything you can write in mongo shell — you can write in Robomongo!

This is an early beta version of Robomongo, that we are publishing in a hope to validate usefulness of application. We really welcome your feedback! Please submit any issues and proposals to GitHub Issues.

Features

Full Power of MongoDB Shell

Robomongo embeds the same JavaScript engine (based on Mozilla SpiderMonkey), that powers MongoDB's mongo shell. It means that you can reuse your existing skills of MongoDB Shell in Robomongo!

Robomongo provides you with syntax highlighting, autocompletion, different view modes (text, tree, custom) and more.

With great power comes great responsibility. Robomongo will not stop you from executing "undesired" code. Be careful, as you do with MongoDB Shell!

Tip! Select any part of code and press Ctrl + Enter. Only selected code will be executed.



Multiple Shells

Open as many shells as you need. Every tab in Robomongo — is a MongoDB shell, fully isolated from each other.

You can have many opened shells for single MongoDB database, or many shells for many different databases.

Tip! Press Ctrl + T to open new shell, based on currenly opened.



Multiple Results

Robomongo executes your code in statement by statement way. That means that you will receive as many result as many statements you have.

This feature can assist you, for instance, when you would like to view and analyse documents side by side.

Tip! Press F10 to toggle results orientation from vertical to horizontal.



Autocompletion

Robomongo provides you with autocompletion for all objects (and thus functions) that are known by JavaScript runtime, including autocompletion for databases, collections and even your document objects.

To assist Robomongo autocompletion — execute your code. This will make your objects available to JavaScript runtime, and autocompletion will work even for your custom functions and documents.

Tip! To see code of any JavaScript function, just type its name and execute (Ctrl + Enter)


Articles

 

반응형
반응형

[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() 등이 있다.

 

반응형

+ Recent posts