What’s the best way to truncate a datetime value (as to remove hours minutes and seconds) in SQL Server 2008? For example: declare @SomeDate datetime="2009-05-28 16:30:22" select trunc_date(@SomeDate) -----------------------...
  • May 16, 2022
  • 0 Comments
I have a file, foo.txt, containing the following lines: a b c I want a simple command that results in the contents of foo.txt being: a b 15 Answers...
  • May 8, 2022
  • 0 Comments
I would like to truncate a string such that its length is not longer than a given value. I am writing to a database table and want to ensure...
  • May 4, 2022
  • 0 Comments