declare @t_picking_list_inserted_data table( picking_no int , cust_no int ) -- insert to [t_picking_list] insert into tir.dbo.t_picking_list( op_id , picking_yn , picking_work_no , cust_no , reg_id , reg_dt , chg_id , chg_dt , page_no , packing_no , pl_cd ) output inserted.picking_no , inserted.cust_no into @t_picking_list_inserted_data select @op_id , @picking_yn , @picking_work_no , sub_table...
begin tran insert into SDFSDF ( cj_invoice_id , contract_no , original_invoice_number , renewal_invoice_number ) values ( @cj_invoice_id , @contract_no , @original_invoice_number , @renewal_invoice_number ) if @@ERROR 0 and @@ROWCOUNT 1 begin if @@TRANCOUNT > 0 rollback tran return end insert into CJF ( contract_no , renewal_invoice_number , state_code ) values ( @contract_no , @renewal_invoice_..
CREATE FUNCTION [dbo].[fn_gmkt_split_array](@String NVARCHAR(4000), @Delimiter CHAR(1)) RETURNS @Results TABLE (Items NVARCHAR(4000)) AS BEGIN DECLARE @index INT DECLARE @slice NVARCHAR(4000) SELECT @index = 1 IF @String IS NULL RETURN WHILE @index != 0 BEGIN SELECT @index = CHARINDEX(@Delimiter,@String) IF @index !=0 SELECT @slice = left(@String,@index - 1) ELSE SELECT @slice = @String INSERT I..
declare @temp table ( no varchar(50) ) IF OBJECT_ID('tempdb..#temp_table') is not null DROP TABLE #temp_table CREATE TABLE #temp_table ( row_num int identity(1,1) ) CREATE NONCLUSTERED INDEX #temp_table_shipping_no ON #temp_table (shipping_no) with temp as ( select no from table )
select top 1 from table1 inner join table2 on a = b where a = b and a ='JP' and a = 'Y' select max(c) , max(d) from table1 inner join table2 on a = b where a = b and a ='JP' and a = 'Y' select max(c) , max(d) from table1 inner join table2 on a = b where a = b and a ='JP' and a = 'Y' group by table1.a "top 1" 과 "max()" 는 최종 검색 결과의 값중 1개만을 가져온다. (조건절에 의해 여러 값이 성립된다해도 최상단 1개만을 가져온다.) 하지만 "max()" 와 ..
테이블 변수 선언 if object_id('tempdb..#temp_data_table') is not null drop table #temp_data_table create table #temp_data_table ( arrived_set_dt datetime , direct_use_yn char(1) ) create nonclustered index TEMP_DATA_TABLE__ARRIVED_SET_DT on #temp_data_table (arrived_set_dt) insert into #temp_data_table( arrived_set_dt , direct_use_yn , inhousing_stat , order_type , order_no ) select xso.arrived_set_dt ..
보호되어 있는 글입니다.
declare @StartDate datetime , @EndDate datetime set @start_date = cast(@start_date as date) set @end_date = dateadd(day, 1, cast(@end_date as date)) set @end_date = dateadd(millisecond, -3, @end_date) select @StartDate, @EndDate dateadd 방식 declare @start_date datetime = '2019-08-29' , @end_date datetime = '2019-08-29' select * from a where dateColumn between @start_date and DATEADD(MILLISECOND, ..
- Total
- Today
- Yesterday
- Task
- 문자 자르기
- await
- .submit()
- trim
- 상품 등록
- html tag
- System.Diagnostics
- hyper-v
- mssql
- 아이폰
- 제품 등록
- In App Purchase
- 진수 변환
- MainActor
- 공백제거
- system.io
- 특정 문자를 기준으로 자르기
- App Store
- async
- nl2br
- 앱 스토어
- FileUpload
- 명령어
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |