?
Solved

Query Help

Posted on 2006-10-24
4
Medium Priority
?
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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ā€¦
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

718 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