Viewing 15 posts - 136 through 150 (of 1,438 total)
In order, from school, college to present day. Probably missed a few too.
Commodore PET Basic
ZX Spectrum Basic
Z80 Assembler
Pascal
COBOL
Forth
C
FORTRAN (4 and 77)
February 24, 2017 at 2:16 am
February 20, 2017 at 1:43 pm
SELECT *
FROM (
SELECT SrvName
, [status]
,...
February 20, 2017 at 8:02 am
Try this
WITH CTE AS (
SELECT UserID, FormID, Answers, ROW_NUMBER() OVER(PARTITION BY FormID ORDER BY NEWID()) AS rnFROM #RankUsers)SELECT FormID, MAX(CASE WHEN rn =...
February 16, 2017 at 9:25 am
select
COUNT(CASE WHEN [status] = 'a' THEN 1 END) as [TotalA],
sum(case when [status] = 'a' then price end) as [TotalpriceA],
COUNT(CASE WHEN [status] = 'b' THEN 1 END) as [TotalB],
sum(case...
November 28, 2016 at 11:40 am
See if this helps
DECLARE @t TABLE(Name VARCHAR(10) NOT NULL PRIMARY KEY,
Value1 INT NOT...
November 28, 2016 at 4:14 am
See if this helps
DECLARE @myTable TABLE(Office VARCHAR(10), yr INT, recruited int, applied INT)
INSERT INTO @myTable(Office, yr, recruited, applied)
VALUES('Pune', 2015, 10, 15),
('Pune', 2016, 7, 20),
('Mumbai', 2015, 10, 23),
('Mumbai',...
November 17, 2016 at 7:11 am
> we have a series of total 7 digits and requirment is to find and mark those numbers which contains 6 same digits either in xyyyyyy or yyyxyyy format.
See if...
November 14, 2016 at 5:58 am
You'll need to join to a numbers table
WITH
E(n) AS(
SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)
),
E2(n) AS(
SELECT a.n FROM E a, E b
),
E4(n) AS(
...
November 4, 2016 at 8:45 am
Looks like a typo, change SPECIALHOURS to SPECIALEVENT
October 20, 2016 at 6:45 am
Not really clear what you're asking, maybe this?
SELECT ROW_NUMBER() OVER(PARTITION BY x1.r1 ORDER BY x2.r2) AS [ID],
x2.r2.value('./text()[1]','VARCHAR(30)') AS [DESCRIPTION],
...
October 20, 2016 at 3:26 am
Try this
WITH CTE AS (
SELECT Division,
ParentDivision,
ManagerEmail,
FinanceEmail,
...
October 13, 2016 at 9:18 am
This is based on the packing interval query by Itzik Ben-Gan, I don't have the URL to hand though
DECLARE @TestTable TABLE(start_date DATETIME, end_date DATETIME);
INSERT INTO @TestTable(start_date, end_date)
VALUES('2016-1-1 10:00:00','2016-1-1 15:00:00'),
...
October 7, 2016 at 9:21 am
SELECT Id ,
XmlCol.query('./fullname').value('.', 'nvarchar(max)') AS 'fullname'
FROM @t t
CROSS APPLY t.XmlData.nodes('/News//Photos/Photo')...
October 6, 2016 at 7:51 am
Using the splitter here http://www.sqlservercentral.com/articles/Tally+Table/72993/
SELECT t.CONTINENTID,
s1.Item AS COUNTRY,
s3.Item AS CITY
FROM @T t
CROSS APPLY dbo.DelimitedSplit8K(t.COUNTRIES,',') s1
CROSS...
September 19, 2016 at 5:32 am
Viewing 15 posts - 136 through 150 (of 1,438 total)