Wrong in select statement in ORACLE [duplicate] - sql

This question already has answers here:
Missing Expression when selecting all columns and one more
(2 answers)
Closed 9 years ago.
When a test with SQL Navigator(it's work fine):
select userid,* from user_ ;
but with sql developer, it get an error: ORA-00936: missing expression
Please explain me why SQL Navigator can but SQL Developer can not, and explain me why what is wrong here.
This question may be similar to sql-Missi.... question, but not true.
Thank for your suggestion !

try this,
select userid, user_.* from user_
SQLFiddle Demo

Related

Convert split_string to SQLite query [duplicate]

This question already has answers here:
How to split comma-separated values?
(5 answers)
Split values in parts with sqlite
(2 answers)
Closed 12 months ago.
I have been trying to convert split_string syntax to SQLite from SQL Server. I couldn't find any alternative to do that. can anyone please help me to do that.
SELECT row_number () over (order by (select 0)) rn, value
FROM string_split(Nav_Path,''/'')
This is the SQL query that needs to write in SQLite. There is syntax error saying
Transaction ERROR: sqlite3_prepare_v2 failure: no such table: string_split
Thank you

Convert Oracle LISTAGG to MsSqlServer construction [duplicate]

This question already has answers here:
ListAGG in SQLSERVER
(4 answers)
Simulating group_concat MySQL function in Microsoft SQL Server 2005?
(12 answers)
Closed 6 years ago.
I would like to convert this construction from oracle syntaxis to mssql.
SELECT
cs.id,
LISTAGG(w.WonderNumber, '|')
WITHIN GROUP (
ORDER BY w.WonderNumber) AS Wonder
FROM
CasaS cs
I have tried approaches with FOR XML PATH but didn't completely understand this. Could you please show solution with explanations. Thanks in advance!

List aggregation in Oracle 10G [duplicate]

This question already has answers here:
Concatenate results from a SQL query in Oracle
(7 answers)
Closed 6 years ago.
Lets say, I have following table(i.e: Reference Table). I want to display my results as 'Expected Table'. How may I get this result? Any help will be highly appreciated. I am using Oracle 10g.
Expected:
SELECT Collateral_Id,
LISTAGG(Commitment_Id, ',')
WITHIN GROUP (ORDER BY Commitment_Id) "Commitment_Id"
FROM yourTable
GROUP BY Collateral_Id

Get table definition in oracle sql plus [duplicate]

This question already has answers here:
How to get Oracle create table statement in SQL*Plus
(3 answers)
Closed 7 years ago.
I'm new to sql and I have created table using create table table_name.
And now I want to get this table definition or let's say source code, I know command desc table_name but that's not what I want. Could you help me figure it out?
Check the function: DBMS_METADATA.GET_DDL
http://psoug.org/reference/dbms_metadata.html

'WHERE 1 =1' in SQL Stored Procedure [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Why would someone use WHERE 1=1 AND <conditions> in a SQL clause?
I've been tasked with reviewing some SQL stored procedures and have seen many that look like the following:
SELECT
X, Y, Z
FROM
Table
WHERE
1 = 1
ORDER BY
X
Why would someone use '1 = 1' for the where clause?
Thanks!
It's common in dynamic SQL, in order to append additional criteria to a WHERE clause. Otherwise, it's useless and it is ignored by the optimizer.
possibly to dynamically add conditions to the where clause.