Skip to content
Advertisement

Category: Questions

How to surround a column with double quotes in Netezza

I want to surround the selected column entries with double quotes whenever there is a special character say ‘ | ‘ in the column value . In the above query in the true condition I want to surround email by double quotes whenever email contains | . For ex if email is a|bc@gmail.com , I want it to be “a|bc@gmail.com”.

Performance impact of view on aggregate function vs result set limiting

The problem Using PostgreSQL 13, I ran into a performance issue selecting the highest id from a view that joins two tables, depending on the select statement I execute. Here’s a sample setup: What I found out I’m executing two statements which result in completely different execution plans and runtimes. The following statement executes in less than 100ms. As far

Compare SQL Count

I want to return the name, which has not the con_id nr 2 and has more objects (count(*)) than in con_id nr 2. My statement isnt working because of the count.. can someone help me pls Select v.name …

Remove special symbols from email string

I need to replace some characters in email string, exactly such actions: lower_email = str.lower(str.split(email,’@’)[0]) nopunc_email = re.sub(‘[!@#$%^&*()-=+.,]’, ‘ ‘, lower_email) nonum_email = …

Postgresql on conflict update?

lets say i have table like this (new_table) (all field is not-null constraints): id name km_unit 1 honda 1000 2 toyota 2000 3 bmw 1000 4 wuling 1500 …

Advertisement