ms-sql 2005 설치

ms-sql 2010. 10. 18. 16:54

'ms-sql' 카테고리의 다른 글

SQL 사용시 주의할 점  (1) 2010.10.20
ms-sql db Link  (4) 2010.10.18
OPENXML(MS-SQL SP)  (1) 2010.10.18
SQL 서버의 잠금에 대한 고찰  (1) 2010.09.10
CTE 방식으로 게시판 List Data가져오기  (3) 2010.09.10
Posted by 정광원
,

OPENXML(MS-SQL SP)

ms-sql 2010. 10. 18. 16:41
declare @doc_xml xml
declare @idnyn int
select @doc_xml = originalxml, @idnyn = idn from doc where idn =@idn

declare @idoc_new int
if @idnyn <> ''
begin
set @idoc_new = 1
EXEC sp_xml_preparedocument @idn OUTPUT, @doc_xml
end
else
begin
set @idoc_new = 0
end

SELECT *
INTO #tmpTable
FROM OPENXML (@idn, '/*[local-name()=''Sanofi'']/*[local-name()=''Content'']', 2)
WITH (
ProductCode varchar(100) './*[local-name()=''ProductCode'']',
ProductName varchar(100) './*[local-name()=''ProductName'']',
ProductType varchar(100) './*[local-name()=''ProductType'']',
Material varchar(100) './*[local-name()=''Material'']',
MaterialType varchar(100) './*[local-name()=''MaterialType'']',
Version varchar(100) './*[local-name()=''Version'']',
Requester varchar(100) './*[local-name()=''Requester'']',
ReasonforChange varchar(100) './*[local-name()=''ReasonforChange'']',
PackType varchar(100) './*[local-name()=''PackType'']'
)

select * from #tmpTable
drop table #tmpTable

if @idoc_new = 1
begin
EXEC sp_xml_removedocument @idn
end

'ms-sql' 카테고리의 다른 글

ms-sql db Link  (4) 2010.10.18
ms-sql 2005 설치  (1) 2010.10.18
SQL 서버의 잠금에 대한 고찰  (1) 2010.09.10
CTE 방식으로 게시판 List Data가져오기  (3) 2010.09.10
CTE 정렬방법  (0) 2010.09.10
Posted by 정광원
,

웹폰트 적용방법

html 2010. 9. 17. 10:26
웹폰트 적용방법
http://pangsan.tistory.com/102
Posted by 정광원
,
 repater 안에서는 if문을 사용못함...

<td style='word-break:break-all;' ><%# DataBinder.Eval(Container.DataItem, "SIUDFlag").ToString() == "I" ? "INSERT" : DataBinder.Eval(Container.DataItem, "SIUDFlag").ToString() == "S" ? "SELECT" : "UPDATE" %></td>
Posted by 정광원
,

세로 스크롤만 생기게

html 2010. 9. 14. 17:28
<body scroll=auto style="overflow-x:hidden">

Posted by 정광원
,
Posted by 정광원
,

잠금에 관한 고찰(1) - 잠금(Lock) 매커니즘에 대하여
- http://kuaaan.tistory.com/97
잠금에 관한 고찰(2) - 격리 수준(Transaction Isolation Level)에 대하여
- http://kuaaan.tistory.com/98
잠금에 관한 고찰(3) - 교착상태(데드락,DeadLock)에 대하여
- http://kuaaan.tistory.com/100 

'ms-sql' 카테고리의 다른 글

ms-sql 2005 설치  (1) 2010.10.18
OPENXML(MS-SQL SP)  (1) 2010.10.18
CTE 방식으로 게시판 List Data가져오기  (3) 2010.09.10
CTE 정렬방법  (0) 2010.09.10
ms-sql 2008 설치  (1) 2010.09.09
Posted by 정광원
,

Sys.WebForms.PageRequestManagerServerErrorException 500 에러시 해결방법
# Page에 ValidateRequest="false"을 추가한다.

#ex) Page Language="C#" AutoEventWireup="true" CodeBehind="UpdatePanel.aspx.cs" Inherits="WebApplication1.UpdatePanel" ValidateRequest="false" %>

원문
http://groups.google.co.kr/group/Google-Maps-API/msg/9c6d19afd09e73c4?pli=1

'asp.net' 카테고리의 다른 글

Gmail, Live SMTP를 이용한 메일 발송  (1) 2010.10.18
repeater안에 삼항연산자 사용  (1) 2010.09.15
asp.net 이벤트 호출 순서  (2) 2010.09.09
이미지 Thumbnail(크기조정)  (0) 2010.09.09
updatepanel 안에 Repeater사용  (2) 2010.09.09
Posted by 정광원
,

ImageNavi

jquery 2010. 9. 10. 14:28

<script language="javascript" type="text/javascript" >

        $(document).ready(function () {
            var spacing = 155;
            function createControl(src) {
                return $('<img/>').attr('src', src).addClass('control').css('opacity', 0.6).css('display', 'none');

            }

            var $enlargedCover = $('<img/>').css({ 'position': 'absolute', 'cursor': 'pointer', 'cursor': 'hand' }).hide().appendTo('body');

            //var $waitThrobber = $('<img/>').attr('src', 'image/wait.gif').addClass('control').css('z-index', 4).hide();
            //닫기 버튼
            //var $closeButton = createControl('/CmnWeb/common/images/button/familysite_closebtn.gif').addClass('enlarged-control').appendTo('body');

            $('#ImgNavi').css({
                'width': spacing * 4,
                'height': '105px',
                'overflow': 'hidden',
                'position': 'relative'
            }).find(' a').css({
                'float': 'none',
                'position': 'absolute',
                'left': 1000
            });

            var imgUpCovers = function () {

                var $Imgs = $('#cardimg a');
                $Imgs.eq(0).click(function (event) {
                    if ($(this).attr('href') == "") {
                        return false;
                    }
                   
                    var startPos = $(this).offset();

                    startPos.width = $(this).find('img').width();
                    startPos.height = $(this).find('img').height();
                    var endPos = {};
                    endPos.width = startPos.width * 3;
                    endPos.height = startPos.height * 3;

                    endPos.top = $(this).offset().top / 2;
                    endPos.left = ($('body').width() - endPos.width) / 2;

                    $enlargedCover.attr('src', $(this).attr('href')).css("border", "1px solid")
                      .css(startPos)
                      .show();

                    var ImgAnimation = function () {
                        $enlargedCover.animate(endPos, 'normal', function () {
                            $enlargedCover.one('click', function () {
                                $enlargedCover.fadeOut();
                            });
                        });
                    };
                    if ($enlargedCover[0].complete) {
                        ImgAnimation();
                    }
                    else {

                        $enlargedCover.bind('load', ImgAnimation);
                    }

                    event.preventDefault();
                });
            }
            imgUpCovers();

            var setUpCovers = function () {
                var $Imgs = $('#ImgNavi a');

                $Imgs.unbind('click mouseenter mouseleave');
                var $leftbutten = $('#btnleft');
                $leftbutten.unbind('click mouseenter mouseleave');
                var $rightbutten = $('#btnright');
                $rightbutten.unbind('click mouseenter mouseleave');

                $rightbutten.click(function (event) {
                    $Imgs.eq(0).animate({ 'left': -spacing }, 'fast', function () {
                        $(this).appendTo('#ImgNavi');
                        setUpCovers();
                    });
                    $Imgs.eq(1).animate({ 'left': 0 }, 'fast');
                    $Imgs.eq(2).animate({ 'left': spacing }, 'fast');
                    $Imgs.eq(3).css('left', spacing * 3).animate({ 'left': spacing * 2 }, 'fast');

                    event.preventDefault();
                });

                $leftbutten.click(function (event) {
                    $Imgs.eq(0).animate({ 'left': spacing }, 'fast');
                    $Imgs.eq(1).animate({ 'left': spacing * 2 }, 'fast');
                    $Imgs.eq(2).animate({ 'left': spacing * 3 }, 'fast');
                    $Imgs.eq(3).animate({ 'left': spacing * 4 }, 'fast');

                    $Imgs.eq($Imgs.length - 1).css('left', -spacing)
                      .animate({ 'left': 0 }, 'fast', function () {
                          $(this).prependTo('#ImgNavi');
                          setUpCovers();
                      });
                    event.preventDefault();
                });

                $Imgs.eq(0).css('left', 0).click(function (event) {
                    //$waitThrobber.appendTo(this).show();
                    if ($(this).attr('href') == "") {
                        return false;
                    }
                    var startPos = $(this).offset();

                    startPos.width = $(this).width();
                    startPos.height = $(this).height();
                    var endPos = {};
                    endPos.width = startPos.width * 3;
                    endPos.height = startPos.height * 3;
                    endPos.top = $(this).offset().top;                      //좌표 top
                    endPos.left = ($('body').width() - endPos.width) / 2;

                    $enlargedCover.attr('src', $(this).attr('href')).css("border", "1px solid")
                      .css(startPos)
                      .show();

                    var performAnimation = function () {
                        //$waitThrobber.hide();
                        $enlargedCover.animate(endPos, 'normal', function () {
                            $enlargedCover.one('click', function () {
                                //$closeButton.unbind('click').hide();

                                $enlargedCover.fadeOut();
                            });
                        });
                    };
                    if ($enlargedCover[0].complete) {
                        performAnimation();
                    }
                    else {
                        $enlargedCover.bind('load', performAnimation);
                    }

                    event.preventDefault();
                });

                $Imgs.eq(1).css('left', spacing).click(function (event) {
                    //$waitThrobber.appendTo(this).show();
                    if ($(this).attr('href') == "") {
                        return false;
                    }

                    var startPos = $(this).offset();

                    startPos.width = $(this).width();
                    startPos.height = $(this).height();
                    var endPos = {};
                    endPos.width = startPos.width * 3;
                    endPos.height = startPos.height * 3;

                    endPos.top = $(this).offset().top;
                    endPos.left = ($('body').width() - endPos.width) / 2;

                    $enlargedCover.attr('src', $(this).attr('href')).css("border", "1px solid")
                      .css(startPos)
                      .show();

                    var performAnimation = function () {
                        $enlargedCover.animate(endPos, 'normal', function () {
                            $enlargedCover.one('click', function () {

                                $enlargedCover.fadeOut();
                            });
                        });
                    };
                    if ($enlargedCover[0].complete) {
                        performAnimation();
                    }
                    else {
                        $enlargedCover.bind('load', performAnimation);
                    }

                    event.preventDefault();
                });

                $Imgs.eq(2).css('left', spacing * 2).click(function (event) {
                    //$waitThrobber.appendTo(this).show();
                    if ($(this).attr('href') == "") {
                        return false;
                    }
                    var startPos = $(this).offset();

                    startPos.width = $(this).width();
                    startPos.height = $(this).height();
                    var endPos = {};
                    endPos.width = startPos.width * 3;
                    endPos.height = startPos.height * 3;
                    endPos.top = $(this).offset().top;
                    endPos.left = ($('body').width() - endPos.width) / 2;

                    $enlargedCover.attr('src', $(this).attr('href')).css("border", "1px solid")
                      .css(startPos)
                      .show();
                    var performAnimation = function () {
                        //$waitThrobber.hide();
                        $enlargedCover.animate(endPos, 'normal', function () {
                            $enlargedCover.one('click', function () {
                                //$closeButton.unbind('click').hide();

                                $enlargedCover.fadeOut();
                            });
                            /*
                            $closeButton.css({
                            'left': endPos.left,
                            'top': endPos.top
                            }).show().click(function () {
                            $enlargedCover.click();
                            });*/
                        });
                    };
                    if ($enlargedCover[0].complete) {
                        performAnimation();
                    }
                    else {
                        $enlargedCover.bind('load', performAnimation);
                    }

                    event.preventDefault();
                });

                $Imgs.eq(3).css('left', spacing * 3).click(function (event) {
                    //$waitThrobber.appendTo(this).show();
                    if ($(this).attr('href') == "") {
                        return false;
                    }
                    var startPos = $(this).offset();

                    startPos.width = $(this).width();
                    startPos.height = $(this).height();
                    var endPos = {};
                    endPos.width = startPos.width * 3;
                    endPos.height = startPos.height * 3;
                    endPos.top = $(this).offset().top;                      //좌표 top
                    endPos.left = ($('body').width() - endPos.width) / 2;   //좌표 left값

                    $enlargedCover.attr('src', $(this).attr('href')).css("border", "1px solid")
                      .css(startPos)
                      .show();
                    var performAnimation = function () {
                        //$waitThrobber.hide();
                        $enlargedCover.animate(endPos, 'normal', function () {
                            $enlargedCover.one('click', function () {
                                //$closeButton.unbind('click').hide();

                                $enlargedCover.fadeOut();
                            });
                            /*
                            $closeButton.css({
                            'left': endPos.left,
                            'top': endPos.top
                            }).show().click(function () {
                            $enlargedCover.click();
                            });*/
                        });
                    };
                    if ($enlargedCover[0].complete) {
                        performAnimation();
                    }
                    else {
                        $enlargedCover.bind('load', performAnimation);
                    }

                    event.preventDefault();
                });

            };
            setUpCovers();
        });
    </script>

'jquery' 카테고리의 다른 글

jquery 달력  (0) 2012.03.14
jQuery 속성(Attrbute)으로 셀렉터 하기...  (1) 2010.10.28
table의 row 선택하여 data가져오기  (1) 2010.09.09
dynamic row  (1) 2010.09.09
select option의 첫번째 및 선택된 값 가져오기  (2) 2010.09.09
Posted by 정광원
,

CREATE PROCEDURE [dbo].[UP_GIFT_Corporation_List]
(  
    @CurrentPageIndex           INT      -- 목록의 현재페이지 번호      
,   @PageSize                   INT      -- 목록의 한 페이지에 표현되는 글 목록수 
,   @SearchCondition            varchar(4000)           -- 조회조건 내용       
, @SortCondition    NVARCHAR(100)   -- 조회정렬 조건
, @Lang      NVARCHAR(10)   -- 언어
)  
AS 
SET NOCOUNT ON

DECLARE @StNum                  int  
SET     @StNum                  = (@PageSize * (@CurrentPageIndex - 1)) + 1  
DECLARE @FnNum                  int  
SET     @FnNum                  = @PageSize * @CurrentPageIndex  
DECLARE @SqlString              nvarchar(4000)   
DECLARE @SqlTotalRowCount       nvarchar(4000) 
DECLARE @ISChangeYN             char(1) 

SET @ISChangeYN = 'N'
IF charindex('Name',@SortCondition)+charindex('CATEGORY_NAME',@SortCondition)+charindex('PSEngName',@SortCondition) > 0
BEGIN
 SET @ISChangeYN = 'Y'
END

IF @ISChangeYN = 'N'
BEGIN
 SET @SortCondition = 'C.'+@SortCondition
END

SET     @SqlString = '  
WITH ORIGINAL_DATA AS ( 
SELECT 
 C.CPGUID
 ,C.TypeCD
 ,cg.CATEGORY_NAME as Type
 ,C.CPEngName
 ,C.PSGUID
 ,V.PSEngName
 ,C.CountryCD
 ,N.Name as Country
 ,C.Tel
 ,CONVERT(VARCHAR(10), C.ModifyDT, 120) as ModifyDT
 ,ROW_NUMBER() OVER(ORDER BY '+ @SortCondition+ ') AS RowNo 
FROM        dbo.TB_GIFT_Corporation  C
  LEFT OUTER JOIN dbo.TB_GIFT_VIPPerson V
  ON C.PSGUID = V.PSGUID
  LEFT OUTER JOIN CmnMgt.dbo.tb_Nation N
  ON C.CountryCD = N.ID
  LEFT OUTER JOIN CmnMgt.dbo.tb_Category Cg
  ON C.TypeCD = Cg.CATEGORY_CODE
WHERE   C.Active = ''Y'' '

SET @sqlTotalRowCount = '
SELECT
        COUNT(*) AS TOTAL_ROW_CNT
FROM        dbo.TB_GIFT_Corporation  C
  LEFT OUTER JOIN dbo.TB_GIFT_VIPPerson V
  ON C.PSGUID = V.PSGUID
  LEFT OUTER JOIN CmnMgt.dbo.tb_Nation N
  ON C.CountryCD = N.ID
  LEFT OUTER JOIN CmnMgt.dbo.tb_Category Cg
  ON C.TypeCD = Cg.CATEGORY_CODE
WHERE   C.Active = ''Y'' '


SET  @SqlString = @sqlString + @SearchCondition  
SET  @SqlTotalRowCount = @SqlTotalRowCount + @SearchCondition  

SET @SqlString = @SqlString + ' 

 
SELECT * FROM ORIGINAL_DATA WHERE RowNo BETWEEN ' + CONVERT( varchar, @StNum ) + ' AND ' + CONVERT(varchar, @FnNum)  

PRINT  @SqlString

exec sp_executesql @SqlString

exec sp_executesql @SqlTotalRowCount

'ms-sql' 카테고리의 다른 글

OPENXML(MS-SQL SP)  (1) 2010.10.18
SQL 서버의 잠금에 대한 고찰  (1) 2010.09.10
CTE 정렬방법  (0) 2010.09.10
ms-sql 2008 설치  (1) 2010.09.09
프로시져에서 Identity값 Return하기  (1) 2010.09.09
Posted by 정광원
,