Skip to content

Syntax error for nested condtionals in SQL

I’m pretty new to redshift and I’ve been trying to to do a nested case when condition here, yet I get a syntax error ERROR: syntax error at or near “)” in this line of SQL: I’m not sure what’s wrong, since I’m familiar with Python and I’m pretty sure this is how…

Joining two tables to keep selected values and nulls

I have got two tables that I need to join. The second table is used to filter the records from the first table. table1.parameter table2.parameter; table2.parameter_group The result should include all records from table1 for a certain parameter_group but also records where the parameter is null. What I have is…

there is a way to order empty element like null element?

I need to order a column and there are a lot of elements null or empty.The problem is null element are ordered differente from null element The result about is that employees with name==null are the first position, after there are the elements with name!=null (are a real name) and at the end there are the ele…