Viewing 15 posts - 16 through 30 (of 562 total)
After 'solving' this puzzle, I looked on line for other solves. Found :
https://is.gd/Sudoku_shortest_solver
The shortest on that site mentioned is 101 bytes K program. (In C the shortest is 174...
February 20, 2020 at 9:45 am
WITH N AS(SELECT*FROM(VALUES('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'))s(n))
,S AS(SELECT'000071006002400810900600030007000600800000004005000300090004002051003900400950000's,1i
UNION ALL SELECT LEFT(stuff(s,i,1,n),81),patindex('%0%',stuff(s,i,1,n))FROM S,N WHERE i>0 AND
...
February 18, 2020 at 2:35 pm
Ben, I'm sure this has already been done here, and the final solution is as skimpy as Taylor Swift's bikini.
Edited to add link: https://jasonbrimhall.info/2011/08/23/tsql-sudoku-ii/
Thank you Chris,
Especially for the...
February 15, 2020 at 7:57 pm
---------------------------------------------------------------------------------------------------------------------------
-- Same algoritm, but done in discrete steps.
---------------------------------------------------------------------------------------------------------------------------
drop table if exists C
Create table C(nr1 bigint, reverse_string1 varchar(100), reverse_nr1 bigint,nr2 bigint, reverse_string2 varchar(100), reverse_nr2 bigint, back bigint,...
January 2, 2020 at 2:24 pm
Example data :
---------------------------------------------------------------------------------------------------------------------------
-- Ben Brugman
-- 20200102
---------------------------------------------------------------------------------------------------------------------------
-- Create some example tables.
drop table if exists number1
drop table if exists number2
Create table Number1(nr1 bigint)
Create table Number2(nr2 bigint)
-- Insert some examples.
insert...
January 2, 2020 at 2:13 pm
CREATE TABLE #tax_brackets (
income_minimum decimal(9, 2) NULL,
income decimal(9, 2) NOT NULL,
tax_rate decimal(5, 4) NOT NULL
...
January 1, 2020 at 12:16 pm
The query is (to my knowledge) not based on the updated statistics. I have been using this query a lot on many different systems and use this query mainly to...
December 12, 2019 at 10:19 am
First the conclusion :
Count(1) and count(*) perform similar.
Getting the count from the meta tables is a lot faster.
Based on a test with a table with 1 000 000 (one milion)...
December 12, 2019 at 8:37 am
--
-- Create a text for a CSV file. (Not a file).
-- Strings with double qoutes, semicolons or CRLF get qouted and the double qoutes are 'escaped' with...
December 10, 2019 at 9:54 am
To get the number of rows in 'each' table :
SELECT o.name, SUM(p.rows) sum_rows
FROM...
December 9, 2019 at 12:59 pm
Thanks for all the responses, I will look into the responses and more specific into the links (CDC).
CDC captures a lot but has to be specified for all tables 🙁 ...
December 2, 2019 at 4:19 pm
Prologue:
A large number of database systems provide something like an Auditing Trail or Log.
Sometimes primitive, sometimes difficult to read, sometimes based on data, sometimes based on command/instructions/scripts.
SQL-server lacked (at least...
December 2, 2019 at 1:18 pm
Maybe I was not clear (sorry):
Maybe the answer is: "Use the most recent Enterprise edition."
At this moment I do not use the Enterprise edition, that's why I asked the question....
December 2, 2019 at 10:51 am
Mainly (???)
Data changes.
A requirement is that something similar to SQL Anywhere Auditing is implemented. For two main purposes:
1. To discover problems with the database and/or database software. (Debugging problems).
2. To...
November 28, 2019 at 3:12 pm
As said, a follow up.
Because I was still checking and testing some scenario's I didn't respond before.
The 'main culprit' why the delimitedsplit8k was not performing as expected was that during...
November 14, 2019 at 3:46 pm
Viewing 15 posts - 16 through 30 (of 562 total)