Solved

sql errors

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

705 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

23 Experts available now in Live!

Get 1:1 Help Now