Viewing 15 posts - 301 through 315 (of 1,390 total)
The "application" is out of support and yet the database is separate and updatable? If at all possible I wouldn't touch a single thing. If something breaks... better to treat...
November 22, 2022 at 5:00 pm
Jeff's code seems to generate primary keys and produces the correct output afaik. Creating foreign keys should be straightforward for the OP. The split could be accomplished with OPENJSON without...
November 22, 2022 at 4:58 pm
Why does this make sense? CONVERT using style 2 seems to convert to text and removes the leading '0x'
select Modelnameid origignal
,cast(SUBSTRING(Modelnameid...
November 19, 2022 at 1:05 pm
A good first step could be to run this code
select datepart(weekday, cast(getdate()+nums.n as date)) day_of_week_number,
datename(weekday, cast(getdate()+nums.n as date)) day_of_week
from...
November 13, 2022 at 1:18 pm
Maybe you're looking for the SUM OVER the volume partitioned by the 'parent_id' column but which column is appropriate to ORDER BY? If ORDER BY the 'filter_path' column it causes...
November 11, 2022 at 1:30 am
The enable_ordinal argument for STRING_SPLIT is not implemented in 2019.
It's true. It's available in Azure SQL compatibility level 150 (and above) and SQL Server 2022. There are alternatives such...
November 2, 2022 at 4:11 pm
drop table if exists #some_table;
go
create table #some_table (
input_string varchar(200) not null);
insert #some_table(input_string) values
('5,1,6,1,69,1'),
('5,1,6,1,3,2,5,3,69,1');
select string_agg(iif((ss.ordinal-1)%2=0, concat('''', ss.[value], ''''), ss.[value]), ',')
...
November 2, 2022 at 3:33 pm
Maybe something like this
drop table if exists #some_table;
go
create table #some_table (
full_name_proper varchar(200) not null);
insert into #some_table values
('A'),
('A B'),
('A B C'),
('A B C D'),
('A B C...
November 2, 2022 at 3:47 am
You could try OPENJSON and provide the 2 column schema definition
declare @json nvarchar(max)=N'[{"display":"Section1","value":"1"},{"display":"Section2","value":"2"}]';
select oj.[value], oj.display
from openjson(@json)
...
October 28, 2022 at 8:11 pm
The windowing function FIRST_VALUE returns the first value in an ordered set. In this case PARTITION BY item_num ORDER BY revision. You could use a CTE to UPDATE the column...
October 27, 2022 at 12:33 pm
In SELECT statements the FROM clause and JOINs are evaluated first. Maybe you could use the VALUES table value constructor to store (rows of) criteria, order number, and value. Then...
October 23, 2022 at 8:08 pm
At this point no I haven't downloaded the desktop app. I did look around some more at the Blazor razor pages. In that area in general you seem to be...
October 21, 2022 at 7:28 pm
(another attempt to fight the anti-spam forum measures)
EF isn't used at all for the interesting parts. I just added it 2 weeks ago and it's only used by the...
October 20, 2022 at 2:42 pm
The GitHub link is only visible in the footer of the demo/query section of the site
https://github.com/jtheisen/squil
Entity Framework is just used for configuration purposes, the actual data access during browsing...
October 19, 2022 at 4:04 pm
Very interesting. It looks impressive and the site works great. The GitHub repo (+1 star'ed) is always the interesting part imo. It seems maybe the project began a while ago...
October 19, 2022 at 12:28 pm
Viewing 15 posts - 301 through 315 (of 1,390 total)