Solved

A 10 seconds SQL error

Posted on 2014-04-20
2
246 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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

696 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