?
Solved

sql errors

Posted on 2014-04-03
2
Medium Priority
?
225 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

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.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
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.
Suggested Courses

777 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