Find the position of all occurrences of an expression within a string
This iTVF returns both the relative and the actual positions of ALL occurrences of a string within a string.
2015-05-12 (first published: 2013-03-24)
2,245 reads
This iTVF returns both the relative and the actual positions of ALL occurrences of a string within a string.
2015-05-12 (first published: 2013-03-24)
2,245 reads
Review the error log for possible brute force or dictionary attacks on your SQL Server instance.
2015-05-08 (first published: 2013-05-22)
2,698 reads
Dynamically check your SQL Error Logs and filter using Powershell.
2015-05-07 (first published: 2013-06-04)
4,665 reads
If you get alerts for high CPU, but by the time you login/check the server cpu is back to normal, then use this sp to create a sql agent job and run it every min.
2015-05-06 (first published: 2013-06-04)
3,027 reads
2015-05-06
409 reads
Easily and quickly delete all database accounts even if they don't have the same name as server login.
2015-05-05 (first published: 2013-07-18)
6,991 reads
Dynamically build a comma delimited CSV file using the BCP utility from any table or view in your database with a useful code debugging parameter.
2015-05-04 (first published: 2013-08-12)
5,736 reads
2015-05-01 (first published: 2013-08-13)
3,787 reads
This function converts an integer to its binary representation. e.g. 15 is converted to '00001111'
2015-04-29 (first published: 2014-02-24)
806 reads
2015-04-24 (first published: 2015-04-15)
1,205 reads
If you've ever loaded a 2 GB CSV into pandas just to run a...
By James Serra
What problem is Fabric Ontology trying to solve? For years, most data conversations have...
By Steve Jones
Recently I ran across some code that used a lot of QUOTENAME() calls. A...
Tlp/Wa_Cs:0817-866-887 Jl. Brigjen Sudiarto No.294, Palebon, Kec. Pedurungan, Kota Semarang, Jawa Tengah 50273
Tlp/Wa_Cs:0817-866-887 Jl. Majapahit No.112, Pandean Lamper, Kec. Gayamsari, Kota Semarang, Jawa Tengah 50161
Tlp/Wa_Cs:0817-866-887 Jl. Jenderal Ahmad Yani No.24-26, Panderejo, Kec. Banyuwangi, Kabupaten Banyuwangi, Jawa Timur 68416
We create the following table and then insert some records in it:
create table t1 ( id int primary key, category char(1) not null, product varchar(50) ); insert into t1 values (1, 'A', 'Product 1'), (2, 'A', 'Product 2'), (3, 'A', 'Product 3'), (4, 'B', 'Product 4'), (5, 'B', 'Product 5');What happens if we execute the following query in both Sql Server and PostgreSQL?
select id,
category,
string_agg(product, ';')
over (partition by category order by id
rows between unbounded preceding and unbounded following) as stragg
from t1; See possible answers