0

I am trying to source simple mysql statement from a file. But it is giving an error. Below is my code -

@srcpath='/home/work/onlinemarket/databaseScripts/'; 
SET @c = CONCAT(@srcpath,  'adtype.sql');
source @c;

And it is giving following error,

Failed to open file ''@c'', error: 2

any pointer to resolve this error will be appreciated.

thanks.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
pavan shinde
  • 31
  • 1
  • 2
  • Does the variables need that @ ? https://stackoverflow.com/questions/11754781/how-to-declare-a-variable-in-mysql – Tony Jun 02 '18 at 14:49
  • if you we dont give @ in 'source @c', it will give 'Failed to open file ''c'', error: 2 – UnSat Jun 03 '18 at 05:16

0 Answers0