• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

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

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 ?
  • 2
1 Solution
slightwv (䄆 Netminder) Commented:
You need to provide the table name or alias for the '*'.

Try something like:

SELECT LastName, table.* FROM Table...
Steve5140Author Commented:
You are correct, that worked just fine.  I probably should have been able to figure that out but I just didn't see it.
slightwv (䄆 Netminder) Commented:

You might be surprised how obscure that is!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now