Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Question of the Day for 08 Oct 2004 Expand / Collapse
Author
Message
Posted Tuesday, September 7, 2004 4:05 PM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
Comments posted to this topic are about the Question of the Day for 08 Oct 2004 posted at http://www.sqlservercentral.com/testcenter/qod.asp?QuestionID=362.
Post #135716
Posted Friday, September 10, 2004 8:00 AM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
Post #136368
Posted Friday, October 8, 2004 2:06 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 11:29 AM
Points: 2,651, Visits: 859

Won't Statement  B get an error in both DTS and Query Analyzer because it is missing the leading quote after the select statement?




Hal W Platt
Post #140722
Posted Friday, October 8, 2004 2:14 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, February 19, 2013 10:47 AM
Points: 226, Visits: 22
That was my impression too.
It must have been a misprint.
Post #140724
Posted Friday, October 8, 2004 6:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, April 13, 2007 6:23 AM
Points: 170, Visits: 1
I saw the exact same error.  I do not think statement #2 will work at all.


Post #140758
Posted Friday, October 8, 2004 6:32 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, October 9, 2012 12:02 PM
Points: 340, Visits: 231
haha I was going to say the same thing. Oh well. 



Surefooted
Post #140760
Posted Friday, October 8, 2004 7:30 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, July 27, 2010 7:51 PM
Points: 1,244, Visits: 3
Could someone post the KB article relating to this bug. I couldn't find it.


Post #140775
Posted Friday, October 8, 2004 10:37 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 18, 2014 12:13 PM
Points: 2,837, Visits: 1,138

The question as posed says Query B works (in spite of the missing quote).  Assuming the missing quote is a misprint, are we to believe that Query B works without the modification given for Query A?

If Query B also requires a CAST, then none of the answers fit the question.  It becomes a trick question but not for the reason in answer 3, so all answers are wrong.




Post #140833
Posted Friday, October 8, 2004 10:52 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, December 8, 2006 6:32 PM
Points: 635, Visits: 1

I couldn't find anything on the Microsoft site about this bug, but I did find a discussion of it at http://www.dbforums.com/showthread.php?threadid=656046&goto=nextoldest.  According to the messages there, the bug is somehow related to the length of the SQL query string, but there is a workaround by including a CONVERT or CAST in the query, as is shown in SQL Statement B.

(It looks like the missing open quote in SQL Statement B was an oversight.)

 

Post #140838
Posted Friday, October 8, 2004 11:46 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 18, 2014 12:13 PM
Points: 2,837, Visits: 1,138

So if results over 75 chars are a problem, how can Query B (which returns a longer result) possibly work without using the workaround given in the explanation?  The question says the problem does not occur for Query B, which is wrong, so none of the answers fit.




Post #140847
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse