Viewing 15 posts - 1 through 15 (of 17 total)
Merhaba,
Sorguyu deneyebilir misin
IF OBJECT_ID('my_table', 'U') IS NOT NULL
DROP TABLE my_table;
CREATE TABLE my_table (
mydate DATE,
enddate DATE,
...
November 15, 2024 at 10:45 am
Deneyin.
DECLARE @TBLPERSON TABLE
(
ID INT,
NAME NVARCHAR(100),
CONDITION NVARCHAR(100)
)
INSERT INTO @TBLPERSON (ID,NAME,CONDITION)
VALUES ('1','Mary','DrySkin'),('2','Bob','DrySkin'),('3','Mary','Glasses'),('4','Bob','Glasses'),('5','Joe','Glasses'),('6','Mary','GreyHair'),('7','Bob','Glasses'),('8','Mary','Hearing'),('9','Joe','Hearing')
;WITH DETAY AS
(
select *,ROW_NUMBER() OVER(PARTITION BY NAME ORDER BY ID)...
February 26, 2024 at 6:52 pm
Sorguyu deneyin.
select H.*,CASE WHEN H.STATUS = 'completed' THEN '1' ELSE 0 END [Status(1/0)],
CASE WHEN SAY.DEGER IS NULL THEN 0 ELSE 1 END [FinalStatus]
from #x1 H
OUTER APPLY (select...
May 25, 2023 at 3:27 pm
If(OBJECT_ID('tempdb..#TBL_Orders ') Is Not Null)
Begin
Drop Table #TBL_Orders
End
CREATE TABLE #TBL_Orders
(
ID INT,
AMOUNT DECIMAL(19,2),
Requester NVARCHAR(100)
)
INSERT...
April 4, 2023 at 5:17 pm
DECLARE @String VARCHAR(50) = 'a=abc;&;b=1;&;c=ddd', @Delimiter CHAR(1) =';'
SELECT
SUBSTRING(VALUE,1,CHARINDEX('=',VALUE)-1) ITEMS,
SUBSTRING(VALUE,CHARINDEX('=',VALUE)+1,9999) AS VALUE
FROM STRING_SPLIT(@String,@Delimiter) where value <>'&'
August 29, 2022 at 8:44 am
The code below helped.
Thanks everyone from Turkey 😉
DECLARE @URL NVARCHAR(MAX) = 'http://localhost:8091/api/v1/employees/updateemployee';
DECLARE @Object AS INT;
DECLARE @ResponseText AS VARCHAR(8000);
DECLARE @Body AS VARCHAR(8000) =
'{
"employeeId": 1,
...
August 18, 2021 at 8:01 am
Merhaba,
Inceleyin.
DECLARE @BASLAMA DATETIME ='2020-01-01'
DECLARE @BITIS DATETIME ='2021-12-31'
DECLARE @TABLOM TABLE
(
LOCATION NVARCHAR(100),
ITEM ...
April 21, 2021 at 6:50 am
December 14, 2019 at 6:40 am
Hello,
DECLARE @_MyBase TABLE
(
Names NVARCHAR(15),
CardType INT
)
INSERT INTO @_MyBase
VALUES('A','1'),('B','1'),('C','1'),('D','1')
SELECT
NAMES,
CardType
,count(*) as NumberOfRows
, CASE Names
WHEN 'A' THEN 'Class 1'
WHEN 'B' THEN 'Class 2'
WHEN 'C' THEN 'Class 3'
WHEN 'D' THEN 'Class...
November 18, 2019 at 11:41 am
Hello there
try
SELECT c1,C2,MIN(C3)C3,COUNT(*) SAY FROM stg_tbl AS G
WHERE exists (SELECT * FROM main_tbl AS F WHERE F.c1=G.c1 AND F.c2=G.c2 AND F.c3=(G.C3))
GROUP BY c1,C2
UNION ALL
SELECT c1,C2,MIN(C3)C3,0 FROM stg_tbl...
October 29, 2019 at 5:13 pm
Merhaba,
Asagidaki sekilde sanirim istediginiz olacaktir.
DECLARE @BASLAMA VARCHAR(11),@BITIS VARCHAR(11)
SET @BASLAMA = '01.01.2019'
SET @BITIS = '31.12.2019'
;WITH CTE AS
(
SELECT
CONVERT(DATETIME,@BASLAMA,104) AS Tarih
UNION ALL
SELECT
CONVERT(DATETIME,CTE.Tarih,104) + 1
FROM
CTE
WHERE
Tarih < CONVERT(DATETIME,@BITIS,104)
)
SELECT
YEAR(Tarih) AS Yil,
DATEPART(week,Tarih) AS Hafta,
MIN(Tarih)...
July 30, 2019 at 3:02 pm
Hi,
IF EXISTS(SELECT * FROM sys.tables WHERE name='Sample_Data') BEGIN
DROP TABLE Sample_Data
END
GO
CREATE TABLE [dbo].[Sample_Data](
[ACCOUNT_NO] [varchar](50) NULL,
[DATE] [varchar](50) NULL,
[FLAG] [varchar](50) NULL,
[AMOUNT] FLOAT NULL,
[NOTICE_COUNTER] [varchar](50) NULL
)
GO
INSERT INTO [Sample_Data] (ACCOUNT_NO, DATE, FLAG,AMOUNT,NOTICE_COUNTER)
VALUES
('304', '03/22/2019', 'Notice', '0',...
April 20, 2019 at 7:40 am
This was removed by the editor as SPAM
April 19, 2019 at 2:54 am
This was removed by the editor as SPAM
April 18, 2019 at 7:36 am
Viewing 15 posts - 1 through 15 (of 17 total)