Monday, March 12, 2012

query to get sql server version information?

Hi!

I'm new to sql and would appreciate it if anyone could show me the query that i need to type to get the server version information - I do not have direct access to the sql database (doing some work on an old website that runs on windows box w/ coldfusion :p)

appreciate it!

execute this:

select @.@.Version

|||hey, thanks for the response!

Could you also please let me know what's the column name that's returned? The coldfusion markup that I need to use is something like this

<cfquery name="getDBVersion" username="*" password="*" datasource="*" dbtype="ODBC">
select @.@.Version
</cfquery>

<cfoutput query="getDBVersion">
#NameOfColumn#
</cfoutput>

I tried #Version# but it spit out HTTP/1.1 :)
|||

@.@.version doesn't have a column name by default. If you need to name it for your purposes, try something like this:

Select @.@.version as x

If you have access to SQL Server Management Studio (SQL Server 2005) or Query Analyzer (SQL Server 2000) you can try out your queries with them.

Paul

|||thanks worked well

this is what i'm dealing with:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
|||Hi you can use the statement to get version information:

SELECT @.@.VERSION

No comments:

Post a Comment