and thanks for the tips/help.
"Roger Wolter[MSFT]" <rwolter@online.microsoft.com> wrote in message
news:OKwofFnlGHA.3632@TK2MSFTNGP03.phx.gbl...
> CAST(ext_mem/1024 as varchar(10))+' MB' as 'Memory'
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
>
http://www.microsoft.com/info/cpyright.htm >
> "Ricky" <newsgroupsmail@gmail.com> wrote in message
> news:%234bI9RmlGHA.2136@TK2MSFTNGP04.phx.gbl...
>> Roger
>>
>> Thanks for the tip but i'm getting the following errors now when i try to
>> concatenate the value with the string 'MB'.
>>
>> I want to result like this: 4MB
>>
>>
>>
>> select location+space(1)+'-'+space(1)+dept as 'Location',
>> compname as 'Computer Name',
>> --error in the line below
>> --Syntax error converting the varchar value 'MB' to a column of data type
>> int.
>> ext_mem/1024+'MB' as 'Memory',
>> computermodel as 'Model',
>> --error in the line below
>> --Error converting data type varchar to float.
>> drive_c/(1024)+'MB' as 'Capacity Drive C:', free_c as 'Free',
>> drive_e as 'Capacity Drive E:', free_e as 'Free',
>> drive_c+space(1)+'-'+space(1)+free_c as 'Capacity Drive C:',
>> drive_e+space(1)+'-'+space(1)+free_e as 'Capacity Drive E:',
>> --error in the line below
>> --Error converting data type varchar to float.
>> dos_ver+space(1)+operatingsystemversion+space(1)+operatingsystemservicepack
>> as 'Operating System',
>> cpu+space(1)+'CPU'+space(1)+cpu_speed+'GHZ' as 'Processor(s) Type',
>> cpusinstalled as 'Quantity',
>> tcpip as 'IP Address(es):'
>> from workstat
>> where dos_ver like '%windows 2003%' or dos_ver like '%windows 2000 -
>> server%'
>> or dos_ver like '%advanced%'
>> order by location, dept
>>
>> Thanks
>> []
>> Ricky
>>
>>
>> "Roger Wolter[MSFT]" <rwolter@online.microsoft.com> wrote in message
>> news:OXGZ9YXlGHA.4512@TK2MSFTNGP04.phx.gbl...
>>>I assume I'm missing something but have you tried
>>>
>>> free_c/1024 AS Free
>>>
>>> --
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>> Use of included script samples are subject to the terms specified at
>>>
http://www.microsoft.com/info/cpyright.htm >>>
>>> "Ricky" <newsgroupsmail@gmail.com> wrote in message
>>> news:e1r73aWlGHA.4100@TK2MSFTNGP05.phx.gbl...
>>>> Hi
>>>>
>>>> I need some help in how to convert a certain value in KB into MB.
>>>> Please see
>>>> the bellow script where i put the question.
>>>>
>>>> Thanks
>>>> []
>>>> Ricky
>>>>
>>>> select location+space(1)+'-'+space(1)+dept as 'Location',
>>>> compname as 'Computer Name',
>>>> ext_mem as 'Memory',
>>>> computermodel as 'Model',
>>>> drive_c as 'Capacity Drive C:', free_c as 'Free', -- how to obtain this
>>>> value in MB ?
>>>> drive_e as 'Capacity Drive E:', free_e as 'Free', -- how to obtain this
>>>> value in MB ?
>>>> --drive_c+space(1)+'-'+space(1)+free_c as 'Capacity Drive C:',
>>>> drive_e+space(1)+'-'+space(1)+free_e as 'Capacity Drive E:',
>>>> dos_ver+space(1)+operatingsystemversion+space(1)+operatingsystemservicepack
>>>> as 'Operating System',
>>>> cpu+space(1)+'CPU'+space(1)+cpu_speed+'GHZ' as 'Processor(s) Type',
>>>> cpusinstalled as 'Quantity',
>>>> tcpip as 'IP Address(es):'
>>>> from workstat
>>>> where dos_ver like '%windows 2003%' or dos_ver like '%windows 2000 -
>>>> server%'
>>>> or dos_ver like '%advanced%'
>>>> order by location, dept
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>