I hope I am not resubmitting this question, but I can't find my original submittal...
Here is another function problem that I have (luckily, the last). I hope there is someone out there who is bored and might want to give this one a try. If not, that's okay, I think completing 4 out of 5 questions is pretty good. hehe
Question:
Create a function (EMP_SAL_STATS) that computes the maximum salary for employees in the EMPLOYEES table. Note: do not use the built in function MAX. You must create your own MAX function.
In addition, create a driver program that runs the function. Show all work including the output from running the procedure.
My two lines of work (haha):
CREATE OR REPLACE FUNCTION emp_sal_stats
(p_employee_id employees.empoyee_id%TYPE)My one line of hint: Maybe you could order the data descending and then fetch one row?|||Thank you very much. I will give it a try.
Cyndi
Showing posts with label function. Show all posts
Showing posts with label function. Show all posts
Thursday, March 8, 2012
Wednesday, March 7, 2012
Another Deployment Question
The deployment of reports and datasources via the Deploy function in vs2005
works fine. However we often have to deploy to clients where there is a
firewall with no ports open. We do have Remote Desktop Connection access
and need to deploy reports and datasources by transfering files. (restoring
the entire ReportService database is not granular enough).
We can export and import .rdl files but we cannot find a way to do the same
with Datasources. I know that a datasource .rds file is a brief xml file
that looks like this...
<?xml version="1.0" encoding="utf-8"?>
<RptDataSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>DataSource1</Name>
<DataSourceID>6aac99b7-1658-479f-be09-fbcb874dbe04</DataSourceID>
<ConnectionProperties>
<Extension>SQL</Extension>
<ConnectString>Data Source=(local);Initial
Catalog=MyApplication</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</RptDataSource>
So it's basically just a connection string with a GUID in it.
How can we deploy Datasources via file transfer? Or is there a better way
in which to deploy reports and datasources to other ReportServer instances
that are behind firewalls.
Thanks,
GaryHello Gary,
As for the ReportServer, currently it can only import report through file
uploading (by provide the report's rdl file). DataSource doesn't support
such importing. And the "rds" file is only used in development environment
(the BI studio or Visual Studio). However, we can use the "rs.exe" utility
to execute script to deploy SSRS report or datasource. The following BOL
reference has provided description and sample on scripting SSRS report and
datasource...
#Scripting Deployment and Administrative Tasks
http://msdn2.microsoft.com/en-us/library/ms159720.aspx
#Script Samples (Reporting Services)
http://msdn2.microsoft.com/en-us/library/ms160854.aspx
The following script block is the one used for creating datasource in the
sample script
=========Public Sub CreateSampleDataSource(name As String, extension As String,
connectionString As String)
'Define the data source definition.
Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = connectionString
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = extension
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = True
'Use the default prompt string.
definition.Prompt = Nothing
definition.WindowsCredentials = False
Try
rs.CreateDataSource(name, parentPath, False, definition, Nothing)
Console.WriteLine("Data source {0} created successfully", name)
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
===========
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Steven
Now that I understand thet the "rds" is only used in the dev environment it
looks like export/import is the way to go when we are limited to file
transfer.
--
Regards,
Gary Blakely
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:tHvKqMmqGHA.5740@.TK2MSFTNGXA01.phx.gbl...
> Hello Gary,
> As for the ReportServer, currently it can only import report through file
> uploading (by provide the report's rdl file). DataSource doesn't support
> such importing. And the "rds" file is only used in development environment
> (the BI studio or Visual Studio). However, we can use the "rs.exe"
> utility
> to execute script to deploy SSRS report or datasource. The following BOL
> reference has provided description and sample on scripting SSRS report and
> datasource...
>
> #Scripting Deployment and Administrative Tasks
> http://msdn2.microsoft.com/en-us/library/ms159720.aspx
> #Script Samples (Reporting Services)
> http://msdn2.microsoft.com/en-us/library/ms160854.aspx
> The following script block is the one used for creating datasource in the
> sample script
> =========> Public Sub CreateSampleDataSource(name As String, extension As String,
> connectionString As String)
> 'Define the data source definition.
> Dim definition As New DataSourceDefinition()
> definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
> definition.ConnectString = connectionString
> definition.Enabled = True
> definition.EnabledSpecified = True
> definition.Extension = extension
> definition.ImpersonateUser = False
> definition.ImpersonateUserSpecified = True
> 'Use the default prompt string.
> definition.Prompt = Nothing
> definition.WindowsCredentials = False
> Try
> rs.CreateDataSource(name, parentPath, False, definition, Nothing)
> Console.WriteLine("Data source {0} created successfully", name)
> Catch e As Exception
> Console.WriteLine(e.Message)
> End Try
>
> End Sub
> ===========> Hope this helps.
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Thanks for your response Gary,
If you have any further question later, please feel free to post in the
newsgroup.
Have a good day!
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
works fine. However we often have to deploy to clients where there is a
firewall with no ports open. We do have Remote Desktop Connection access
and need to deploy reports and datasources by transfering files. (restoring
the entire ReportService database is not granular enough).
We can export and import .rdl files but we cannot find a way to do the same
with Datasources. I know that a datasource .rds file is a brief xml file
that looks like this...
<?xml version="1.0" encoding="utf-8"?>
<RptDataSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>DataSource1</Name>
<DataSourceID>6aac99b7-1658-479f-be09-fbcb874dbe04</DataSourceID>
<ConnectionProperties>
<Extension>SQL</Extension>
<ConnectString>Data Source=(local);Initial
Catalog=MyApplication</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</RptDataSource>
So it's basically just a connection string with a GUID in it.
How can we deploy Datasources via file transfer? Or is there a better way
in which to deploy reports and datasources to other ReportServer instances
that are behind firewalls.
Thanks,
GaryHello Gary,
As for the ReportServer, currently it can only import report through file
uploading (by provide the report's rdl file). DataSource doesn't support
such importing. And the "rds" file is only used in development environment
(the BI studio or Visual Studio). However, we can use the "rs.exe" utility
to execute script to deploy SSRS report or datasource. The following BOL
reference has provided description and sample on scripting SSRS report and
datasource...
#Scripting Deployment and Administrative Tasks
http://msdn2.microsoft.com/en-us/library/ms159720.aspx
#Script Samples (Reporting Services)
http://msdn2.microsoft.com/en-us/library/ms160854.aspx
The following script block is the one used for creating datasource in the
sample script
=========Public Sub CreateSampleDataSource(name As String, extension As String,
connectionString As String)
'Define the data source definition.
Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = connectionString
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = extension
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = True
'Use the default prompt string.
definition.Prompt = Nothing
definition.WindowsCredentials = False
Try
rs.CreateDataSource(name, parentPath, False, definition, Nothing)
Console.WriteLine("Data source {0} created successfully", name)
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
===========
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Steven
Now that I understand thet the "rds" is only used in the dev environment it
looks like export/import is the way to go when we are limited to file
transfer.
--
Regards,
Gary Blakely
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:tHvKqMmqGHA.5740@.TK2MSFTNGXA01.phx.gbl...
> Hello Gary,
> As for the ReportServer, currently it can only import report through file
> uploading (by provide the report's rdl file). DataSource doesn't support
> such importing. And the "rds" file is only used in development environment
> (the BI studio or Visual Studio). However, we can use the "rs.exe"
> utility
> to execute script to deploy SSRS report or datasource. The following BOL
> reference has provided description and sample on scripting SSRS report and
> datasource...
>
> #Scripting Deployment and Administrative Tasks
> http://msdn2.microsoft.com/en-us/library/ms159720.aspx
> #Script Samples (Reporting Services)
> http://msdn2.microsoft.com/en-us/library/ms160854.aspx
> The following script block is the one used for creating datasource in the
> sample script
> =========> Public Sub CreateSampleDataSource(name As String, extension As String,
> connectionString As String)
> 'Define the data source definition.
> Dim definition As New DataSourceDefinition()
> definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
> definition.ConnectString = connectionString
> definition.Enabled = True
> definition.EnabledSpecified = True
> definition.Extension = extension
> definition.ImpersonateUser = False
> definition.ImpersonateUserSpecified = True
> 'Use the default prompt string.
> definition.Prompt = Nothing
> definition.WindowsCredentials = False
> Try
> rs.CreateDataSource(name, parentPath, False, definition, Nothing)
> Console.WriteLine("Data source {0} created successfully", name)
> Catch e As Exception
> Console.WriteLine(e.Message)
> End Try
>
> End Sub
> ===========> Hope this helps.
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Thanks for your response Gary,
If you have any further question later, please feel free to post in the
newsgroup.
Have a good day!
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Posts (Atom)