?
Solved

A 10 seconds SQL error

Posted on 2014-04-20
2
Medium Priority
?
255 Views
Last Modified: 2014-04-20
New to SQL, really simple error, please help to see why the error

---------------------------------------------------------------------


Create Table Test2BDeleted233
(UnitPrice as money,
Quantity as int,
SubTotal as UnitPrice * Quantity)



------------------------------------------------------
Message:

   Msg 102, Level 15, State 1, Line 2
   Incorrect syntax near ')'.
0
Comment
Question by:TickTech
[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 Comments
 
LVL 22

Accepted Solution

by:
Steve Wales earned 2000 total points
ID: 40011919
Try: (remove the "as" from columns 1 and 2)

Create Table Test2BDeleted233
(UnitPrice money,
Quantity int,
SubTotal as UnitPrice * Quantity) 

Open in new window

0
 

Author Comment

by:TickTech
ID: 40011920
Yes, it works. Thanks!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

743 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