Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Query Help

Posted on 2006-10-24
4
Medium Priority
?
394 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 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

782 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