Solved

Query Help

Posted on 2006-10-24
4
379 Views
Last Modified: 2008-02-01
A bit new to Oracle.  Any thoughts on why this query is unhappy?

SELECT
VALUE_DT,
SYSTEM_REF,
SENDER_LINE1,
SENDER_LINE2 || SENDER_LINE3 || SENDER_LINE4 || SENDER_LINE5 AS 'SENDER_LINE_CON'
FROM schema.tablename
WHERE ROWCONT <=10
0
Comment
Question by:superfly18
  • 2
4 Comments
 
LVL 8

Expert Comment

by:Pierrick LOUBIER
ID: 17798679
If you want only 10 results, use ROWNUM pseudo-column.

SELECT
VALUE_DT,
SYSTEM_REF,
SENDER_LINE1,
SENDER_LINE2 || SENDER_LINE3 || SENDER_LINE4 || SENDER_LINE5 AS 'SENDER_LINE_CON'
FROM schema.tablename
WHERE ROWNUM <=10;
0
 
LVL 1

Author Comment

by:superfly18
ID: 17798721
I think that was just one error.  There seems to be an issue with the concatenation...
0
 
LVL 32

Accepted Solution

by:
awking00 earned 125 total points
ID: 17798881
Remove spaces and single quotes
SENDER_LINE2||SENDER_LINE3||SENDER_LINE4||SENDER_LINE5 AS SENDER_LINE_CON
0
 
LVL 8

Expert Comment

by:Pierrick LOUBIER
ID: 17798939
SELECT
VALUE_DT,
SYSTEM_REF,
SENDER_LINE1,
SENDER_LINE2 || SENDER_LINE3 || SENDER_LINE4 || SENDER_LINE5 SENDER_LINE_CON
FROM schema.tablename
WHERE ROWNUM <=10;
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
execute immediate plsql block 5 59
MULTIPLE DATE QUERY 15 91
ODBC in excel 2016 in Windows 10 via VBA 16 148
upgrading Oracle 10g/ 11g / 11g R2 to Oracle 12c 25 72
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question