Viewing 15 posts - 91 through 105 (of 2,452 total)
with the 56 rows in your sample data...to cover all possible combinations will generate 72 057 594 037 927 935 rows (2^(56) -1) ....:w00t::w00t:
August 11, 2017 at 7:33 am
You sure are a SQL Champion. I had a feeble effort myself...
August 9, 2017 at 8:41 am
just a word of caution here....the solution is using MAX(ref) ...which works for your data as posted....but consider the following data. This does not deliver the "previous row"
August 9, 2017 at 3:17 am
a helping hand 😀 (courtesy of http://www.convertcsv.com/csv-to-sql.htm ...simple cut and paste !)
CREATE TABLE #yourdata(
USERID INTEGER NOT NULL
,StartDate DATETIME...
August 8, 2017 at 9:33 am
August 4, 2017 at 1:34 pm
any links to code/data sources to generate this 1 million row "Names" table please?
August 3, 2017 at 11:01 am
Need some help in updating one column, I come up with some sample data.
Create...
August 2, 2017 at 12:11 pm
August 2, 2017 at 9:50 am
maybe....
CREATE TABLE #somedata(
ID INT
,CN INT
,Cstatus VARCHAR(8)
);
INSERT INTO #somedata(ID,CN,Cstatus) VALUES
(1,1001,'active'),(2,1002,'inactive'),(3,1003,'active'),(3,1004,'inactive')
,(4,1005,'active'),(4,1006,'active'),(5,1007,'inactive'),(5,1008,'inactive');
WITH statuses as
( SELECT ID,
July 30, 2017 at 4:15 am
I have a little complicated issue,
I want to display all the members in the...
July 30, 2017 at 3:39 am
maybe....
WITH ndate
AS (SELECT *,
ROW_NUMBER() OVER(PARTITION BY ins_id ORDER BY ABS(DATEDIFF(day, end_date, @thedate))) rn
FROM #temp)
SELECT *
...
July 29, 2017 at 9:53 am
without seeing sample data ...here;s a best guess sample idea
CREATE TABLE #yourdata(
PID INT
,tdate DATETIME
,tdesc VARCHAR(8)
July 29, 2017 at 3:59 am
CREATE TABLE mytable(
ProductName VARCHAR(7) NOT NULL PRIMARY KEY
,Description VARCHAR(20) NOT NULL
,SalesOrderNumber...
July 27, 2017 at 9:37 am
July 27, 2017 at 9:05 am
Viewing 15 posts - 91 through 105 (of 2,452 total)