Forum Replies Created

Viewing 15 posts - 946 through 960 (of 1,187 total)

  • RE: Function execution

    James Goodwin (5/20/2008)


    Declare @tmp varchar(10)

    set @tmp = '20080520ABCDEF'

    select CAST(@tmp as datetime)

    webrunner,

    Change that to varchar(8) and it will work.

    '20080520AB' cannot be converted to a date, but '20080520' can.

    --

    JimFive

    Right, but my point...

  • RE: Function execution

    James Goodwin (5/20/2008)


    I think everyone is missing the point of what is happening.

    What is occuring is an automatic type conversion. If I do this:

    Declare @tmp datetime

    set @tmp = '20080101'

    select...

  • RE: Function execution

    bitbucket (5/20/2008)


    As the author of this QOD, and a SQL developer NOT a DBA, I would like to thank all who entered this discussion. I think the question developed...

  • RE: Function execution

    Christopher Stobbs (5/20/2008)


    I don't think it's a glitch either.

    Like most people are saying the VARCHAR(10) can only hold 10 so SQL is correct in truncating it!!!:D

    SQL may be correct in...

  • RE: Function execution

    Carla Wilson (5/20/2008)


    What this question highlights is that an error is NOT thrown when you pass a parameter value that is too long into the function.

    If you tried that with...

  • RE: Query

    ezlikesundaymorning (5/14/2008)


    Excellent. I guess that I can just sit here and bitch or start contributing myself when it all boils down to it. Thanks for the reply. I am just...

  • RE: Query

    ezlikesundaymorning (5/14/2008)


    OK, just plain and simple, I am going to give my 2 cents worth here. This question is pure BS. I mean has anyone here ever seen a query...

  • RE: Query

    I got the question wrong, which is OK, but I think choices such as "Query is wrong" sound too vague. Perhaps "Query throws an error" or the specific error or...

  • RE: Writing

    I'd love to write more about SQL (or some other nonfiction categories, too) but I don't have anywhere near the talent or experience needed to write something new or authoritative....

  • RE: Bit data

    jim.powers (5/7/2008)


    The question does specifically request the results from SQL Server 2005.

    Yes, it does.

    What will be the result when the following query is executed on SQL Server 2005?

    Also, and this...

  • RE: ANSI_NULLS

    I agree. I think this is a great question. I got it wrong, but it showed me I still have more to learn about NULLs.

    Thanks,

    webrunner

  • RE: T-SQL query

    WayneS (5/2/2008)


    Since the question clearly states:

    The condition should not use both IN and OR operators.

    use could use:

    where DatePart(m, ) IN (1,3,4,5,7,8)

    OR is not used, so since they BOTH...

  • RE: Should I Buy a Kindle?

    Steve Jones - Editor (4/30/2008)


    The half.com idea doesn't really suit me as I won't sell them back. The 1/2 price doesn't really make a difference to me and it's a...

  • RE: Should I Buy a Kindle?

    Hi Steve,

    I have the Sony Reader. The controls take a little getting used to, but the type is very readable and you can pick from 3 different type sizes.

    The...

  • RE: Floor Function

    [font="Courier New"]select floor(13.890)[/font] returns [font="Courier New"]13[/font], but just for fun, here are the results for a couple of variations in SQL 2000 (one difference from SQL 2005 is shown):

    [font="Courier New"]select...

Viewing 15 posts - 946 through 960 (of 1,187 total)