SQL Server에서 OUTER APPLY는 LEFT JOIN 대신 사용할 수 있으며 성능이 훨씬 더 좋습니다(항상 그렇지는 않음). OUTER APPLY는 LEFT JOIN보다 더 많은 작업을 수행할 수 있습니다. 각 외부 행에 대해 임의의 내부 결과 집합을 생성할 수 있습니다. 예를 들어 OUTER APPLY는 TOP 1 ORDER BY… 행을 조인할 수 있습니다. 그러나 LEFT JOIN은 그렇게 할 수 없습니다. SELECT Customers.CustomerName, Orders.OrderID FROM Customers LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID; SELECT M.ID,M.NAME,D.PERIOD,D.QTY FRO..
select * from tir.dbo.table as pplh with(nolock) where pplh.print_no = 1152012 and not exists ( select 1 from table2 as pplh2 with(nolock) where pplh2.print_no = 1152013 and pplh2.mng_no = pplh.mng_no ) NOT EXISTS 절에서는 SELECT *와 SELECT 1 사이에 기능적인 차이가 없습니다. NOT EXISTS는 서브쿼리에 일치하는 행이 있는지 여부를 확인하는 데만 관심이 있기 때문입니다. 즉, 서브쿼리의 결과가 있으면 NOT EXISTS는 거짓이고 결과가 없으면 참입니다. SELECT *와 SELECT 1의 차이는 다음과 같습니다: SEL..
select xso.packing_no ,max(xso.seller_id) from dbo.table as xso with(nolock) where xso.packing_no in ( select distinct [value] from string_split(@packing_no, ',') ) group by xso.packing_no -- 영문순으로 정렬 order by case when max(xso.seller_id) like '[a-za-z]%' then 0 else 1 end , max(xso.seller_id)
세로행 -> 가로행으로 변경 CREATE TABLE Sales ( Salesperson VARCHAR(50), Region VARCHAR(50), Sales INT ); INSERT INTO Sales (Salesperson, Region, Sales) VALUES ('John', 'North', 100), ('John', 'South', 150), ('John', 'East', 75), ('Mary', 'North', 200), ('Mary', 'South', 50), ('Mary', 'East', 125); SELECT Salesperson, [North], [South], [East] FROM ( SELECT Salesperson, Region, Sales FROM Sales ) AS SourceT..
This function searches for one character expression inside a second character expression, returning the starting position of the first expression if found. 특정 문자열의 시작 위치 값을 반환합니다. DECLARE @document VARCHAR(64); SELECT @document = 'Reflectors are vital safety' + ' components of your bicycle.'; SELECT CHARINDEX('bicycle', @document); GO
- Total
- Today
- Yesterday
- await
- hyper-v
- In App Purchase
- 앱 스토어
- FileUpload
- mssql
- async
- system.io
- 진수 변환
- 상품 등록
- App Store
- .submit()
- 제품 등록
- 문자 자르기
- nl2br
- trim
- 아이폰
- MainActor
- 공백제거
- Task
- 특정 문자를 기준으로 자르기
- html tag
- 명령어
- System.Diagnostics
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |