Viewing 15 posts - 91 through 105 (of 167 total)
Thanks for the response and the reference. I've got to wrap my brain around this. Been driving me nuts.
March 6, 2013 at 6:06 am
DECLARE @X TINYINT = 0
;WITH SampleTable AS (
SELECT SOMECOLUMNS = 'SOMECOLUMNS', COLUMN1 = 'COLUMN1', COLUMN2 = 'COLUMN2', COLUMN3 = 'COLUMN3',
COLUMN4 = 'COLUMN4', COLUMN5 = 'COLUMN5', COLUMN6 = 'COLUMN6'
)
SELECT SOMECOLUMNS, x.*
FROM...
March 5, 2013 at 2:39 pm
My two bits...
declare @dob datetime
set @dob = '2/29/2000'
select convert(char(10),@dob,101) as DOB,
case
when ((MONTH(@dob) * 100) + DAY(@dob)) > ((MONTH(getdate()) * 100) + DAY(getdate()))
then DATEDIFF(year,@dob,getdate()) - 1
else DATEDIFF(year,@dob,getdate()) End as...
February 19, 2013 at 3:44 pm
I think you've received some great advice here but allow me to articulate a particular way of looking at this. You're in a situation where you are RUNNING FROM...
February 5, 2013 at 4:00 pm
What I would ask is "What characteristic/attribute of the fourth record makes you want to exclude it?"
February 4, 2013 at 2:52 pm
Fabulous post and way too close to home. I don’t know of a developer, dba, or support staff that couldn’t relate. The most effective ones (unfortunately) are those...
January 7, 2013 at 3:52 pm
Sorry for the improper posting. I thought my question was virtually identical and using the same thread seemed to make sense if someone could find all the answers in...
October 29, 2012 at 4:22 pm
Hi Gail (I hope you see this)
I have databases using SQL 2005, 2008 and 2008 R2.
I want to drop a non clustered primary key and immediately add a clustered version...
October 29, 2012 at 4:00 pm
So it is as simple as the output being redirected from the results pane to the variable. I expected the successful concatenation into the variable but not the redirection...
October 25, 2012 at 7:59 am
What doesn't take longer than you expect in your life? Living it. Going MUCH faster than I ever thought and continually accelerating.
I have found though, that getting ready...
October 8, 2012 at 3:57 pm
I thought of another way to say it that helps me. The triple quotes maintain a string as a string. The single ones become part of the literal...
October 2, 2012 at 12:50 pm
That makes sense to me. Actually makes enough sense that I can understand it instead of memorize it.
Thanks again.
October 2, 2012 at 12:42 pm
Thanks, Patrick
Are you saying that the quotes function like escape characters and that handling of the escape characters is dependent on which clause they are in? EXEC wants one...
October 2, 2012 at 12:28 pm
I just did a little research into DBCC Page.
I think I'll stick with the book metaphor 🙂
September 20, 2012 at 8:09 am
Viewing 15 posts - 91 through 105 (of 167 total)