Infopath Script help - Derived Column in SQL

  • Thread starter msnews.mircrosoft.com
  • Start date
M

msnews.mircrosoft.com

I am making my way through this project -- using sharepoint wss and
infopath -- we want to create our server documentation and store it in wss.

A lot of the fields an engineer would enter manually already exist in HP
Insight Manager. I created a form with a connection to the Insight Manager
DB. I created a button that when the engineer types in the server name and
clicks it - it will retrieve all the columns it knows about for that server.

Here is the problem. Some servers have multiple processesors. This results
in two rows (2 CPUS) of data for that server -- I need a single row (unless
someone out there knows of a good way to handle this)

I wanted to write a query in the button script that would count the cpus
and group on the other columns. This query works fine in Query Analyzer -
returns a single row - but infopath does not seem to know how to handle the
new derived column -- count(instance) as Num_CPUS -- . Is there a way to
handle that new column.

Query Below

select Server_Name,Description,SubDescription,
MacAddress,IPAddress,CPUType,CPUSpeed, Count(instance)
Number_CPUS,productNumber,SerialNumber,MemorySize
from book1 where server_name like '%" + str_servername + "%'
group by Server_Name,Description,SubDescription,
MacAddress,IPAddress,CPUType,CPUSpeed,
productNumber,SerialNumber,MemorySizeorder by server_name"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top