Suoritettu

SQL Concat multiple cases - POSTGRESQL

I am looking to combine the result of many cases into one string. Below is how I thought I would do it but it isnt working. How would I correctly do this?

POSTGRESQL DATABASE

concat(

CASE

WHEN ([login to view URL] = 1) THEN 'Helical '::text

ELSE ''::text

END AS helical_name,

CASE

WHEN ([login to view URL] = 1) THEN 'Driven '::text

ELSE ''::text

END AS driven_name,

CASE

WHEN ([login to view URL] = 1) THEN 'CFA '::text

ELSE ''::text

END AS cfa_name,

CASE

WHEN ([login to view URL] = 1) THEN 'Drilled '::text

ELSE ''::text

END AS drilled_name,

CASE

WHEN ([login to view URL] = 1) THEN 'Shoring '::text

ELSE ''::text

END AS shoring_name) as Technology String

Taidot: SQL, Tietokannan hallinto, Tietokantakehitys, PostgreSQL

Näytä lisää: mysql sql server oracle db2 postgresql, oracle 10g sql answers multiple choice, sql email multiple attachment, match combine result, combine result textboxes php javascript, data sql excel multiple tabs, sql search multiple words multiple fields, sql shop multiple categories, complex sql query multiple tables, sql query multiple values, sql queries multiple choice questions test, oracle sql exam multiple choice questions, sql queries multiple choice questions answers, sql questions multiple choice tests, sql questions multiple choice, sql queries multiple choice, oracle sql developer multiple query result tabs

Tietoa työnantajasta:
( 4 arvostelua ) Edmonton AB, Canada

Projektin tunnus: #30569158

Myönnetty käyttäjälle:

fchorley99

Hello, 1) get rid of ::text; 2) get rid of all the AS bits, except the last outside concat; 3) The following - as Technology String won't work because the column name has a space in it. Wrap the 'column name' in sin Lisää

$15 CAD 1 päivässä
(1 arvostelu)
0.2

10 freelanceria on tarjonnut keskimäärin $28 tähän työhön

Truonggiang86

Hello there, the above query you did will concat also the null value, we neec to exclude those first. Pls share me your table and we will discuss. Waiting for your response if interested. Thank you!!!

$50 CAD 1 päivässä
(25 arvostelua)
5.2
dohungnd94

Dear bro. I am an experienced data engineer. I can help you correct your query in an hour. Please send a message to me if you want a quick work. Have a great day. Thank you.

$30 CAD 1 päivässä
(14 arvostelua)
4.4
(11 arvostelua)
3.7
Vickybobo

Hello! I hope you are doing well. I am an experienced database adminstrator using SQL for more than 8 years, but I am a newcomer in here. I have read your project description and I am very interested in your project. Lisää

$15 CAD 1 päivässä
(6 arvostelua)
3.3
bbbssolutions

Hi, i can do it in 30 minutes, but in sql server. If you ok with that please ping me.

$50 CAD 1 päivässä
(8 arvostelua)
2.7
yakymenkoihor

Hello, I have 9+ years experience in website development PHP, python, PostgreSQL, MySQL, etc. I have read your project details carefully and thought I can finish your project well on time. Your job caught my eye, and t Lisää

$20 CAD 1 päivässä
(0 arvostelua)
0.0
raviozain

Hello! I am Ravi Oza and I am a professional PHP | Magento developer | .Net developer with more then five years of experience. As per your proposal details, You need to get output of postgrysql into single row, And Lisää

$30 CAD 1 päivässä
(0 arvostelua)
0.0
prajnavarada

Got lot of experience writing very complex queries in postgresql for reports and applications. Have experince on writing complex functions and triggers too. Did lot of query tuning as well in Postgresql.

$25 CAD 1 päivässä
(0 arvostelua)
0.0
urangara1826

Hi, I am a well experienced MSSQL server expert having 10+ years experience and have strong knowledge of writing complex queries, CRUD operations and handle enterprise databases. Also I am a expert in SSIS, SSRS and ot Lisää

$21 CAD 7 päivässä
(0 arvostelua)
0.0