Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. INSERT INTO [TESTDB].[dbo].[TestTable]
  2. ([TestValue]
  3. ,[TestValue2]
  4. ,[TestValue3]
  5. ,[TestValue4])
  6. VALUES
  7. ('01234'
  8. ,'56789'
  9. ,'98765'
  10. ,'43210')
  11. GO
  12. INSERT INTO [TESTDB].[dbo].[TestTable]
  13. ([TestValue]
  14. ,[TestValue2]
  15. ,[TestValue3]
  16. ,[TestValue4])
  17. VALUES
  18. ('01234'
  19. ,'98765'
  20. ,'56789'
  21. ,'43210')
  22. GO
  23. INSERT INTO [TESTDB].[dbo].[TestTable]
  24. ([TestValue]
  25. ,[TestValue2]
  26. ,[TestValue3]
  27. ,[TestValue4])
  28. VALUES
  29. ('01234'
  30. ,'43210'
  31. ,'56789'
  32. ,'98765')
  33. GO
  34. INSERT INTO [TESTDB].[dbo].[TestTable]
  35. ([TestValue]
  36. ,[TestValue2]
  37. ,[TestValue3]
  38. ,[TestValue4])
  39. VALUES
  40. ('01234'
  41. ,'98765'
  42. ,'43210'
  43. ,'56789')
  44. GO
  45.  
  46.  
  47. SELECT TOP 1000 [TestID]
  48. ,[TestValue]
  49. ,[TestValue2]
  50. ,[TestValue3]
  51. ,(SELECT TestValue + TestValue2 AS CompositeValue FROM [TESTDB].[dbo].TestTable AS foo WHERE foo.TestID=TestID)
  52. FROM [TESTDB].[dbo].[TestTable]</code>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement