Solved

A 10 seconds SQL error

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now