|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 2:02 PM
Points: 7,102,
Visits: 7,165
|
|
Dave62 (2/13/2013) By the way I also appreciate your extensive knowledge and contributions here. I find some of your posts educational, some entertaining, and some are both.
Enjoy! Well, I try to be educational, but with Gail and Hugo and Jeff and Paul posting with far more understanding of SQL Server that I have (or ever expect to have) I suspect that I'm a bit of a failure.
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 2:02 PM
Points: 7,102,
Visits: 7,165
|
|
john.arnott (2/13/2013) [quote]I know I'm late to this party, but have to ask. What 4th statement? I see a Create Table, a Select Into and then a Select. Was the original code edited between publication and today? The third statement was actualluy two statements (a select statement and a drop statement) so Hugo counted them as two, not one. Seems reasonable to me. edit: 's i litreachadh beurla thar comas agam - I can't spell English without an edit!
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 7:43 AM
Points: 656,
Visits: 2,921
|
|
Hugo Kornelis (2/11/2013)
I'm surprised you didn't know this. Integer is actually the official name; int is an accepted abbreviation. *cough* I have to retract the above. That's what I always thought, but when I went out to find a Books Online reference, I was surprised to see only "int" there. "Integer" is not even mentioned.  EDIT: Found the source of my confusion. The ANSI documents describing the SQL standard define both INT and INTEGER, and describe INT as "equivalent to INTEGER". I've always interpreted that as "INTEGER" being the official form and "INT" being an accepted alternative.
And that is one more reason why I value your posts, Hugo: you're honest enough to give us your initial, erroneous thought and then the reason reality is different. I often find that I learn more from articles, posts, blogs, etc. when the author is able to walk me along through their train of thought, even if there are discovered errors along the way.
Thanks, Rich
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 7:16 AM
Points: 1,216,
Visits: 234
|
|
Nice and Easy question.. Thanks..
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 4:17 AM
Points: 3,
Visits: 35
|
|
This code works in SQL 2005 and returns the inserted row, only there was error "Column, parameter, or variable #4: Cannot find data type Date". Same code didn't work in SQL 2012.
Can any one please explain why this code worked in SQL 2005?
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: 2 days ago @ 4:12 AM
Points: 573,
Visits: 1,165
|
|
crazy_s245 21087 (2/19/2013) This code works in SQL 2005 and returns the inserted row, only there was error "Column, parameter, or variable #4: Cannot find data type Date". Same code didn't work in SQL 2012.
Can any one please explain why this code worked in SQL 2005?
If you haven't found the answer already, the create table part didnot execute in 2005 (since the date datatype is invalid) so the table got created with the select into statement.
-- Roshan Joe ******************************************* Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help Custom cleanup script for backups
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, May 02, 2013 3:04 AM
Points: 31,
Visits: 33
|
|
| Just do this in a binary collation and the "in one batch" issue no longer matters.
|
|
|
|