Solved

sql errors

Posted on 2014-04-03
2
221 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
[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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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, show how to extract information from SQL Server on Database, Connection and Server properties
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.

688 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