Showing posts with label experts. Show all posts
Showing posts with label experts. Show all posts

Wednesday, March 28, 2012

Is this Query valid?

Hello Experts,
Is this query is valid or not? it si giving me error invalid colum name
"exceptCount"
Update lib_RoundPerformance Set Successful = exceptCount select
COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID) AS exceptCount
FROM dbo.MSC_ArchivedResult INNER JOIN
dbo.lib_RoundPerformance ON
dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
dbo.lib_RoundPerformance.ArchivedSessionID AND
dbo.MSC_ArchivedResult.RoundID =
dbo.lib_RoundPerformance.RoundID
WHERE (dbo.MSC_ArchivedResult.ReadType = 'E')
GROUP BY dbo.MSC_ArchivedResult.ArchivedSessionId_fk,
dbo.MSC_ArchivedResult.RoundID
Any help is appriciated, Thanks in advance.
RikRik,
You have two queries here.
-- First query
Update lib_RoundPerformance Set Successful = exceptCount
-- Second query
select
COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID) AS exceptCount
FROM dbo.MSC_ArchivedResult INNER JOIN
dbo.lib_RoundPerformance ON
dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
dbo.lib_RoundPerformance.ArchivedSessionID AND
dbo.MSC_ArchivedResult.RoundID =
dbo.lib_RoundPerformance.RoundID
WHERE (dbo.MSC_ArchivedResult.ReadType = 'E')
GROUP BY dbo.MSC_ArchivedResult.ArchivedSessionId_fk,
dbo.MSC_ArchivedResult.RoundID
The first query appears to be invalid, since exceptCount is not
a column of the table lib_RoundPerformance.
Perhaps you mean to do this:
Update dbo.lib_RoundPerformance Set
Successful = (
select COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID)
FROM dbo.MSC_ArchivedResult
WHERE dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
dbo.lib_RoundPerformance.ArchivedSessionID
AND dbo.MSC_ArchivedResult.RoundID = dbo.lib_RoundPerformance.RoundID
AND dbo.MSC_ArchivedResult.ReadType = 'E'
)
But this is just a guess.
Steve Kass
Drew University
Rik wrote:

>Hello Experts,
>Is this query is valid or not? it si giving me error invalid colum name
>"exceptCount"
>
>Update lib_RoundPerformance Set Successful = exceptCount select
>COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID) AS exceptCount
>FROM dbo.MSC_ArchivedResult INNER JOIN
> dbo.lib_RoundPerformance ON
>dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
>dbo.lib_RoundPerformance.ArchivedSessionID AND
> dbo.MSC_ArchivedResult.RoundID =
>dbo.lib_RoundPerformance.RoundID
>WHERE (dbo.MSC_ArchivedResult.ReadType = 'E')
>GROUP BY dbo.MSC_ArchivedResult.ArchivedSessionId_fk,
>dbo.MSC_ArchivedResult.RoundID
>
>Any help is appriciated, Thanks in advance.
>Rik
>
>|||A correction. You may want to update only those rows for which
there are matching rows in MSC_ArchivedResult:
Update dbo.lib_RoundPerformance Set
Successful = (
select COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID)
FROM dbo.MSC_ArchivedResult
WHERE dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
dbo.lib_RoundPerformance.ArchivedSessionID
AND dbo.MSC_ArchivedResult.RoundID = dbo.lib_RoundPerformance.RoundID
AND dbo.MSC_ArchivedResult.ReadType = 'E'
)
where exists (
select * from dbo.MSC_ArchivedResult
WHERE dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
dbo.lib_RoundPerformance.ArchivedSessionID
AND dbo.MSC_ArchivedResult.RoundID = dbo.lib_RoundPerformance.RoundID
AND dbo.MSC_ArchivedResult.ReadType = 'E'
)
SK
Steve Kass wrote:
> Rik,
> You have two queries here.
> -- First query
> Update lib_RoundPerformance Set Successful = exceptCount
>
> -- Second query
> select COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID) AS exceptCount
> FROM dbo.MSC_ArchivedResult INNER JOIN
> dbo.lib_RoundPerformance ON
> dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
> dbo.lib_RoundPerformance.ArchivedSessionID AND
> dbo.MSC_ArchivedResult.RoundID =
> dbo.lib_RoundPerformance.RoundID
> WHERE (dbo.MSC_ArchivedResult.ReadType = 'E')
> GROUP BY dbo.MSC_ArchivedResult.ArchivedSessionId_fk,
> dbo.MSC_ArchivedResult.RoundID
>
> The first query appears to be invalid, since exceptCount is not
> a column of the table lib_RoundPerformance.
> Perhaps you mean to do this:
> Update dbo.lib_RoundPerformance Set
> Successful = (
> select COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID)
> FROM dbo.MSC_ArchivedResult
> WHERE dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
> dbo.lib_RoundPerformance.ArchivedSessionID
> AND dbo.MSC_ArchivedResult.RoundID = dbo.lib_RoundPerformance.RoundID
> AND dbo.MSC_ArchivedResult.ReadType = 'E'
> )
> But this is just a guess.
>
> Steve Kass
> Drew University
>
> Rik wrote:
>|||Thanks you steve, You are genious mate.
Your Second Option Works.
Have a good wend.
Ta
Rik
"Steve Kass" <skass@.drew.edu> wrote in message
news:ejZSM41KFHA.3340@.TK2MSFTNGP14.phx.gbl...
> Rik,
> You have two queries here.
> -- First query
> Update lib_RoundPerformance Set Successful = exceptCount
>
> -- Second query
> select COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID) AS exceptCount
> FROM dbo.MSC_ArchivedResult INNER JOIN
> dbo.lib_RoundPerformance ON
> dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
> dbo.lib_RoundPerformance.ArchivedSessionID AND
> dbo.MSC_ArchivedResult.RoundID =
> dbo.lib_RoundPerformance.RoundID
> WHERE (dbo.MSC_ArchivedResult.ReadType = 'E')
> GROUP BY dbo.MSC_ArchivedResult.ArchivedSessionId_fk,
> dbo.MSC_ArchivedResult.RoundID
>
> The first query appears to be invalid, since exceptCount is not
> a column of the table lib_RoundPerformance.
> Perhaps you mean to do this:
> Update dbo.lib_RoundPerformance Set
> Successful = (
> select COUNT(DISTINCT dbo.MSC_ArchivedResult.ResultID)
> FROM dbo.MSC_ArchivedResult
> WHERE dbo.MSC_ArchivedResult.ArchivedSessionId_fk =
> dbo.lib_RoundPerformance.ArchivedSessionID
> AND dbo.MSC_ArchivedResult.RoundID = dbo.lib_RoundPerformance.RoundID
> AND dbo.MSC_ArchivedResult.ReadType = 'E'
> )
> But this is just a guess.
>
> Steve Kass
> Drew University
>
> Rik wrote:
>

Friday, March 9, 2012

Is there any way to train a portion of a training data set from a selected dataset for data mini

Hi, all experts here,

I am wondering is there any way to select only a portion of a data set to train the mining model? In this case, I mean we dont need to split the dataset in advance, what I want to do is being able to select any random portion of a selected dataset to train a mining model. Any advices?

I am looking forward to hearing from you and thanks a lot in advance for your advices and help.

With best regards,

Yours sincerely,

With SQL Server 2005 you can replace DSV tables with named queries that are filtered by some condition you specify. One "simple" way to sample, for example is to add a random number column to your source data, and then filter on that random number in the DSV. To replace a table with a named query, simply right click the DSV table and select "Replace with named Query"

We are adding features to the next version of SQL Server Data Mining to assist with scenarios such as these.

|||

Hi, Jamie,

Thanks for your advices. It's been helpful.

With best regards,

Yours sincerely,

Friday, February 24, 2012

Is there any method to back up the database to place outside of the local server system?

Hi, all experts here,

Thank you very much for your kind attention.

I am wondering if we could back up the databases to any place outside of the local server system? As I found, we can only back up the database to the local server system, so we have needs to share databases on network places. Is there any method to back up the database on network place rather than first of all I have to back up the database on a local server system, then copy it to the network place, that just sounds really inconvenient.

Thanks a lot in advance for your help and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

Yes, you can use script

Code Snippet

BACKUP DATABASE [DB_NAME]
TO DISK = '\\FileServer\Backups\file_name.bak'
WITH INIT -- overwrite anything

GO

I think in SQL2005 SP2, you can specify Network Path for backup as well

Otherwise, try Maintainence Plan/Wizard as well (that's what we use)

SSMS -> Management -> create a plan -> Add "Back Up Database Task", and put the network path manually under "Folder" , under "Create a backup file for every database"

|||You'll need to make sure the service that runs mssql has access to the network drive where you are going to be placing the backup files.|||

Hi, thank you all very much for your very kind advices and help. It's been very helpful.

With best regards,

Yours sincerely,

|||

No problem at all, we are all here to help

don't forget to mark the answer to your question, so the thread is considered "resolved"

Is there any good idea of creating KPI report on SSRS2005 for Analysis Services?

Hi, experts,

Thanks for your kind attention.

Do you have any good idea of creating reports for KPI from Analysis Services 2005 OLAP cubes? And is it worth of creating KPI reports from SSRS?

I am looking forward to hearing from you and thanks a lot.

With kind regards,

Hello Helen! Can this link be of help?

http://www.databasejournal.com/features/mssql/article.php/3627351

HTH

Thomas Ivarsson

|||

Hi,

It′s a good idea to use the SSRS or Excel 2007 to delivery your reports.

Regards|||

Hi, Thomas,

Thanks for your suggestion of the article. But as we have to struggle to import the KPI indicators for the KPI status and trends, I cant think of any way to change the KPI indicators dynamically according to the change of the status and trends?

Thanks again and I am looking forward to hearing from you for your further advices.

With kind regards,

Yours sincerely,

|||

Hi, Lucas,

Thanks for that.

Yes, I do use Excel and see the fantastic capability of viewing KPI within Excel 2007.

But with SSRS we rather can easily view the KPI values instead of indicators of KPI if we dont struggle to import any KPI indicators?

Thanks again.

With kind regards,

Yours sincerely,

|||

OK! You are talking about the Business Scorecard Server?

Regards

Thomas Ivarsson

|||

No, I am talking about SSRS still. As there are no KPI indicators residing in SSRS2005 you will have to always import static KPI indicators which wont change according to the change of the KPI values?

Hope it is clear for your help.

With kind regards,

Yours sincerely,

|||

OK! I have sent a link to an article that will help you with that. SSAS2005 status and trend graphics(KPITongue Tied) are not supported in Reporting Services 2005.

You will have to build them from scratch in SSRS2005.

HTH

Thomas Ivarsson

|||

Hi, Thomas,

Thanks a lot for your help.

With kindest regards,

Yours sincerely,

Is there any good idea of creating KPI report on SSRS2005 for Analysis Services?

Hi, experts,

Thanks for your kind attention.

Do you have any good idea of creating reports for KPI from Analysis Services 2005 OLAP cubes? And is it worth of creating KPI reports from SSRS?

I am looking forward to hearing from you and thanks a lot.

With kind regards,

Hello Helen! Can this link be of help?

http://www.databasejournal.com/features/mssql/article.php/3627351

HTH

Thomas Ivarsson

|||

Hi,

It′s a good idea to use the SSRS or Excel 2007 to delivery your reports.

Regards|||

Hi, Thomas,

Thanks for your suggestion of the article. But as we have to struggle to import the KPI indicators for the KPI status and trends, I cant think of any way to change the KPI indicators dynamically according to the change of the status and trends?

Thanks again and I am looking forward to hearing from you for your further advices.

With kind regards,

Yours sincerely,

|||

Hi, Lucas,

Thanks for that.

Yes, I do use Excel and see the fantastic capability of viewing KPI within Excel 2007.

But with SSRS we rather can easily view the KPI values instead of indicators of KPI if we dont struggle to import any KPI indicators?

Thanks again.

With kind regards,

Yours sincerely,

|||

OK! You are talking about the Business Scorecard Server?

Regards

Thomas Ivarsson

|||

No, I am talking about SSRS still. As there are no KPI indicators residing in SSRS2005 you will have to always import static KPI indicators which wont change according to the change of the KPI values?

Hope it is clear for your help.

With kind regards,

Yours sincerely,

|||

OK! I have sent a link to an article that will help you with that. SSAS2005 status and trend graphics(KPITongue Tied) are not supported in Reporting Services 2005.

You will have to build them from scratch in SSRS2005.

HTH

Thomas Ivarsson

|||

Hi, Thomas,

Thanks a lot for your help.

With kindest regards,

Yours sincerely,