Solved

sql errors

Posted on 2014-04-03
2
211 Views
Last Modified: 2014-04-03
Below is code I am using and error messages I encounter after executing. Could somebody tell me what is wrong with this? Thanks in advance...

Code...
declare @JobNumb varchar(10),
      @WorkOrderNumb varchar(10,
      @JobNumb_WorkOrderNumb varchar(20)

set @JobNumb = '99999'
set @WorkOrderNumb ='99'
set @JobNumb_WorkOrderNumb = @JobNumb+@WorkOrderNumb

Messages...
Msg 102, Level 15, State 1, Line 7
Incorrect syntax near '@JobNumb_WorkOrderNumb'.
Msg 137, Level 15, State 1, Line 9
Must declare the scalar variable "@JobNumb".
Msg 137, Level 15, State 1, Line 10
Must declare the scalar variable "@WorkOrderNumb".
Msg 137, Level 15, State 2, Line 11
Must declare the scalar variable "@JobNumb".
0
Comment
Question by:tesla764
  • 2
2 Comments
 

Accepted Solution

by:
tesla764 earned 0 total points
ID: 39975074
Solved - I just noticed a   )    is missing on the 2nd line.
0
 

Author Closing Comment

by:tesla764
ID: 39975079
Solved.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

911 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

16 Experts available now in Live!

Get 1:1 Help Now