Forum Replies Created

Viewing 15 posts - 376 through 390 (of 2,894 total)

  • RE: Text Search for age-group related words

    You will need to write your own artificial intelligent parser/translator of English sentences to convert them into dynamic t-sql.

  • RE: how to get the text of isnull function in sql server

    Durai Samuel (5/28/2013)


    In Sql server to see the function text, we can use sp_helptext. can you please help me to view the text of the isnull (system defined function).

    There is...

  • RE: Can you delcare an operator?

    TJT (5/28/2013)


    I was hoping to use it in WHERE statement and this is just an example.

    DECLARE @MYTEST AS VARCHAR(3)

    SET @MYTEST = '<>'

    SELECT CARS.Year

    FROM CARS

    WHERE CARS.Year @MYTEST '2011'

    Not like...

  • RE: Have I been smoking something?? Insert construction question.

    ...

    Nah, I'm looking forward to your next thread: "would Jesus have made a good database developer?" ....

    And if so, who would be the best one in SQL: Jesus, Buddha, Allah,...

  • RE: Help Need in Query

    ...

    I did mean that way. You are correct it is not always faster but it would be most of the time. It is more code and I think harder to...

  • RE: Have I been smoking something?? Insert construction question.

    I don't know why, but whole this thread looks a bit "silly" to me. The OP original post was about INSERT syntax is not the same as he would expect....

  • RE: Help Need in Query

    Sean Lange (5/24/2013)


    Ananth@Sql (5/24/2013)


    With out using Sub Queries is it possible to get the required output

    It is absolutely possible by using a left join. The question is why does is...

  • RE: isnull and coalesce Comparison

    Also it's important to notice that there is difference in a way which datatype will be used for result

    ISNULL will return value of the same datatype as of the first...

  • RE: Help Need in Query

    Cannot understand your question really.

    Could you please show exact expected outcome based on sample data provided in your post.

  • RE: Need Help in Writing the Query

    Ananth@Sql (5/24/2013)


    I have a column and the values are

    0.01

    0.2

    0.0003

    0.00004

    0.5

    I want output like this

    1

    2

    3

    4

    5

    please share your thoughts?

    You are not new here, surely you could present your question in...

  • RE: MERGE & NULL Comparisons

    That is not the same as I've shown to you.

    If you use NULLIF it's crucial to compare values twice:

    NULLIF(d.COL1, src.COL1) IS NOT NULL OR NULLIF(src.COL1, d.COL1)

    So your checking...

  • RE: MERGE & NULL Comparisons

    Just remember that NULLIF is not really a native function (like ISNULL), and it's compiled into CASE WHEN ...

    Saying above, it's true that it does look neater.

  • RE: Have I been smoking something?? Insert construction question.

    GilaMonster (5/23/2013)


    Sergiy (5/23/2013)


    GilaMonster (5/23/2013)


    Since that's a valid form for the select, it's also valid for the insert...select.

    Very arguable.

    What, that it's valid? Since it passes a syntax check it's valid T-SQL,...

  • RE: MERGE & NULL Comparisons

    ...

    Thanks, I had considered that but hoped there would be a cleaner simpler less code solution. Maybe I just want the moon on a stick 😀

    Cheers

    E

    You can wrap into:

    WHERE ISNULL(NULLIF(dst.COL1,src.COL1),NULLIF(src.COL1,dst.COL1))...

  • RE: MERGE & NULL Comparisons

    ...

    Why not use ISNULL FUNCTION INSTEAD

    CASE WHEN ISNULL(TARGET.Column1,0) = ISNULL(SOURCE.Column1,0) THEN 1 ELSE 0 END

    Because of two things:

    1. It will need to be different based on datatype (numeric, datetime, character's)

    2....

Viewing 15 posts - 376 through 390 (of 2,894 total)