Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Query that gives info twice

    FROM keyword not found where expected

    select *

    from quer a

    cross join (select 'Text1' as MyText union all select 'Text2') x

    missing keyword

    select *

    from quer a

    cross apply (values('Text1'), ('Text2')) x (MyText)

    SQL command not...

  • RE: Query that gives info twice

    Well, considering the error messages did not say much more and were in french, I don't think it was really relevent to post a french error message here

    As for my...

  • RE: Query that gives info twice

    John Mitchell-245523 (8/13/2015)


    Another way of doing it:

    SELECT A, B, C, 'Text 1' MyText

    FROM MyTable

    UNION ALL

    SELECT A, B, C, 'Text 2'

    FROM MyTable

    John

    Thank you John, that worked very well.

    Thank you every one.

  • RE: Query that gives info twice

    Neither of those seemed to work, sadly.

    The first one tells me I lack a "FROM" clause (and underlines union to identify where's the mistake)

    The second one says it lacks...

  • RE: Query with three tables

    That works, thank you.

  • RE: Help with a query

    EDIT: I'm still testing but I think I answered my question, by using CTE. Thanks!

    _________________________________________

    Ok thanks I will try that, another question though:

    I told it came from:

    FROM (...) c

    Let's say...

Viewing 6 posts - 1 through 6 (of 6 total)