-2

While importing bak file to SQL Server, I am getting above messages. I do not know where this error is coming from.

  1. Is there a way to check where this @road is defined in my SQL DB?

  2. How to declare scalar variable in SQL?//Standard declaration format

Thank you for the help!!

jarlh
  • 42,561
  • 8
  • 45
  • 63
  • 1
    Show us the problem code. – jarlh Aug 30 '18 at 14:49
  • Can you give us more details on where in the DB restore process you see this error, during it or after it when you attempt to run something? If in the restore process itself, can you show us the code that you are using to restore the backup. – Andrew Aug 30 '18 at 14:49
  • Yeah without the code this is just guessing. – Sean Lange Aug 30 '18 at 15:13

1 Answers1

0

ctrl + f and type in @road into the search box that appears in the top right.

General syntax for declaring a variable is

declare @varname vartype (varsize if needed) = value. 

i.e.

declare @Road varchar (50) = 'Mike Rd.'
GuidoG
  • 11,359
  • 6
  • 44
  • 79