simple query question

  • Hello All,

    I am trying to execute the below line of code, so that the resultset would fit on 1 line

    When I execute the below

    Exec SP_DBCMPTLEVEL 'Test' Select ('ServerName')

    resultset is splitted in 2 lines:

    The current compatibility level is 80.

    ----------

    ServerName

    What I need is:

    Column1                                               Column2

    -----------------                                   ------------------------------

    The current compatibility level is 80.           ServerName

    putting comma in between creates an error

    Exec SP_DBCMPTLEVEL 'Test', Select ('ServerName')

    As there a simple way to do that. ( I don't want to create temp tables here)

    TIA

  • How about something like:

    select

    @@servername as ServerName,

    name as [Database],

    cmptlevel as CompabilityLevel

    from

    master.dbo.sysdatabases

    where

    dbid = db_id()

    /rockmoose


    You must unlearn what You have learnt

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

You must be logged in to reply to this topic. Login to reply