?
Solved

How do I create query in Oracle that works in SQL Server

Posted on 2013-02-07
3
Medium Priority
?
261 Views
Last Modified: 2013-02-07
Hi Experts,

When working in SQL server I quite often write something along the lines of

SELECT LastName, * FROM Table...

This helps when I am doing some initial investigation and the 'LastName' field is of particular interest to me, but I also want to see the rest of the record.  It stops me from having to scroll through the rest of the record to see 'LastName'.

Now I'm working on Oracle, and that syntax returns an error of "Missing Expression".

What is the correct syntax to accomplish this in Oracle ?
0
Comment
Question by:Steve5140
[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
3 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 38864417
You need to provide the table name or alias for the '*'.

Try something like:

SELECT LastName, table.* FROM Table...
0
 

Author Closing Comment

by:Steve5140
ID: 38864437
You are correct, that worked just fine.  I probably should have been able to figure that out but I just didn't see it.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38864462
lol...

You might be surprised how obscure that is!
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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

800 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