Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.26 KB | None | 0 0
  1.  
  2.  
  3. DECLARE @input_table VARCHAR(MAX)
  4. DECLARE @SQL VARCHAR(MAX)
  5.  
  6.     SET @input_table = '2018_1_PROJECTED_INPUT_AUAP'
  7.     SELECT @SQL = 'SELECT RIGHT('+@input_table+',4)'
  8.     EXEC(@SQL)
  9.  
  10. --why doesn't this give me the last 4 characters of the input_table string?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement