Solved

Query Help

Posted on 2006-10-24
4
377 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 31

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many‚Ķ
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 explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Via a live example, show how to take different types of Oracle backups using RMAN.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now