|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Yesterday @ 11:14 AM
Points: 314,
Visits: 293
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, June 24, 2007 2:53 AM
Points: 28,
Visits: 1
|
|
Thanx. I like this approach. Very simple, but I didn't even think in this way.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, December 14, 2012 3:32 AM
Points: 47,
Visits: 92
|
|
| Nice simple idea that make a lot of sense - thanks
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 6:44 AM
Points: 2,553,
Visits: 513
|
|
Great "thinking outside the box" Sean - I know that I personally hate parantheses as much as I hate the single/double quotes - especially in really lengthy expressions...going to try that out with ascii as well...got to think of a really meaningful variable name though - I knew that 'SQ' was single quote but I'm so used to looking at phrases with SQL in it that I had to keep reminding myself that this was not 'truncated SQL'!!
**ASCII stupid question, get a stupid ANSI !!!**
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Monday, December 03, 2012 9:59 AM
Points: 85,
Visits: 117
|
|
Great approach and very easy to implement - good job!
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 9:41 AM
Points: 308,
Visits: 48
|
|
Such a simple idea. Gotta love it.
Bob SuccessWare Software
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, September 11, 2012 1:44 PM
Points: 277,
Visits: 16
|
|
This is a webby site with ASCII information. http://www.lookuptables.com/
Thanks and have a great day. RN
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, April 04, 2012 9:22 PM
Points: 102,
Visits: 9
|
|
I like the idea of using variables instead of the quotes. But not the part about the ASCII characters. The solution below works best for me: Declare @q char(1) Set @q = '''' The value in the Set statement is four (4) characters, all single quotes.
Regards,
Bob Monahon
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, April 17, 2013 10:43 AM
Points: 8,
Visits: 54
|
|
Good article, but it makes me yearn all the more for database-global constants (they don't have them in 2000, I wonder if they're in 2005...)
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, June 05, 2012 12:03 PM
Points: 117,
Visits: 163
|
|
You could also look at QuoteName()
DECLARE @quote Char(1) SET @quote = ''''
PRINT 'WHERE LastName = ' + QuoteName( @LName, @quote ) PRINT 'WHERE TDate = ' + QuoteName( GetDate(), @quote ) PRINT 'WHERE LDate = ' + QuoteName( GetDate() - 100, @quote )
|
|
|
|