2001-09-04
535 reads
2001-09-04
535 reads
There may be cases where you want to work with delimited strings in T-SQL. Following two examples will cover most of the stuff that you will face while working with strings.
2001-09-01
3,184 reads
This script will detect and alert the DBA of blocking processes. The DBA can adjust the length of time the block has exisited before sending the net send message.
2001-08-29
5,217 reads
This script creates a stored procedure that, when executed, queries the system tables of any SQL2000 database to return a complete, ordered datadictionary. *Warning**This script only works on tables which have the description property filled out as my main purpose was to query the extended property description feature new to SQL2000. If you have not […]
2001-08-27
3,133 reads
2001-08-26
1,418 reads
2001-08-22
406 reads
Displays database properties. Was this the best way of doing it? Probably not, but it works.
2001-08-22
552 reads
Displays Maintance plan history if any. I used distinct to filter out and return only what is relevent to what I need. You may not wish this for your purposes. Feel free to make changes
2001-08-22
381 reads
2001-08-22
727 reads
Returns a list of table names from the current database Which do not have primary keys assigned.
2001-08-22
427 reads
By Steve Jones
Redgate is a for-profit company. We look to make money by building and selling...
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...
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