Showing posts with label advance. Show all posts
Showing posts with label advance. Show all posts

Thursday, March 22, 2012

Adding 2 text fields together

is it possible to concatenate two fields of record text into one field of
record text?
Thanks In Advance,
MPMYou'll need to create a trigger. An example might be:
CREATE TRIGGER SetFullName ON Customers
FOR INSERT, UPDATE
Not for replication
AS
/* set fullname for Customers */
update Customers
set Customers.FullName = inserted.[FirstName] + ' ' +
inserted.[Surname]
from inserted
where Customers.CustomerID = inserted.CustomerID
"MANCPOLYMAN" wrote:
> is it possible to concatenate two fields of record text into one field of
> record text?
> Thanks In Advance,
> MPM

Monday, March 19, 2012

Add template to Report Builder

Hi,
Is it possible to customize or add new templates to Report Builder?
Thanks in Advance,
MoptheThe SQL Server 2005 release will not support this functionality.
This feature request is on our wish list for inclusion in a future release.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"mopthe" <marten.peterson@.nordicstation.com> wrote in message
news:1127136021.019308.311670@.f14g2000cwb.googlegroups.com...
> Hi,
> Is it possible to customize or add new templates to Report Builder?
> Thanks in Advance,
> Mopthe
>

Sunday, February 19, 2012

add and subract time to a date

Hello all,
Lets say I have the current date and I would like to get the date
two weeks in advance. How would I do this in T-sql? The T-SQL should
take into account if the month changes. For example, if todays date
is 1/17/2003 the advanced date would be 2/17/2003.

Thanks,
BillyYou can use DATEADD function to accomplish this. Refer to SQL Server Books
Online for more details. For example :

SELECT DATEADD(m, 1, '20030117') ;

--
- Anith
( Please reply to newsgroups only )

Monday, February 13, 2012

Ad: Problems Creating Instance in SQL 2005 management studio

Hello all,
Thanks in advance for any help you can provide.
I am having a problem creating a new NS instance using SQL 2005 management studio.
I am using the database element in my instance and application xml files like this,
in order to create the NS application in an existing database.
<Database>
<DatabaseName>%databasename%</DatabaseName>
<SchemaName>%schemaname%</SchemaName>
</Database>
the problem that I am having is that if I encounter an error somewhere in the process of creating this new instance the instance name and schema name I specified are still bound somewhere, and if I correct for the error and try to create the instance again, I receive a new error saying that there is already an instance with my instance name, or using the schema name.
If I try to list versions it tells me there are no instances, yet if I try to add a new instance it tells me there is already an instance using my instance name.
I have tried searching master database tables and views for anywhere where it might be stored, also tried poking around most of management studio and the registry, and just can not seem to find where it is remembering that I had tried to create this instance before.
It is like it is partially creating the instance, running into an error, and then not rolling back its changes somewhere.

Any help would be very much appreciated

-Derek-

Web Services Integration Manager

TempWorks Software

Si Vis Pacem, Para Bellum.

"Those who profess to favor freedom, and yet depreciate agitation, are men who want crops without plowing up the ground. They want rain without thunder and lightning. They want the ocean without the awful roar of its many waters. Power concedes nothing without demand. It never did and it never will." - Frederick Douglass

additional error information.
I tried to remove the database and restore from a backup, and yet it still believe the instance name is in use.
I notice it seems to be checking the NS InstanceMetaData for existing instances on this server...
"Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse"
anyone know where this metadata is ?

===================================

The specified name is used by another Notification Services instance on the server. Specify a different instance name.
Instance Name: TWNSinstance
Server Name: derekxps (Microsoft.SqlServer.NotificationServices)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=NSEventStrings&EvtID=DuplicateInstanceName&LinkId=20476

Program Location:

at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse(SqlConnection sqlConnection, NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.Add(NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.NSDatabaseCreator.Create(NSDBState dbState, SqlDatabaseAttributes databaseAttributes, List`1 createdStates)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.CreateDatabaseInfrastructure(Instance instance, NSSecureString argumentKey, NSInstance& nsInstance, Dictionary`2& nsApplications)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(Instance instance, NSSecureString argumentKey, Boolean uiReporting)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(NSSecureString sqlUserName, NSSecureString sqlPassword, String configFile, NSSecureString argumentKey, StringDictionary substitutions, Boolean uiReporting, String enforcedSqlServerSystem)
at Microsoft.SqlServer.Management.NotificationServicesUI.CreateInstanceGeneral.PerformCreate()|||

Hi Derek -

SQLNS 2005 stores its metadata in the MSDB database. Run this script in SSMS and see if your failed instance/application are listed.

USE MSDB

GO

SELECT*FROM NS90.NSInstanceInfo

SELECT*FROM NS90.NSApplicationInfo

HTH..

Joe

|||Thanks Joe,
I did find the instance names and schema names that it had "eaten" in there. cleared them and was able to install with the instance name I wanted.
Thanks for your help!

-Derek-

Ad: Problems Creating Instance in SQL 2005 management studio

Hello all,

Thanks in advance for any help you can provide.

I am having a problem creating a new NS instance using SQL 2005 management

studio.

I am using the database element in my instance and application xml files like

this,

in order to create the NS application in an existing database.

<Database>

<DatabaseName>%databasename%</DatabaseName>

<SchemaName>%schemaname%</SchemaName>

</Database>

the problem that I am having is that if I encounter an error somewhere in the

process of creating this new instance the instance name and schema name I

specified are still bound somewhere, and if I correct for the error and try to

create the instance again, I receive a new error saying that there is already

an instance with my instance name, or using the schema name.

If I try to list versions it tells me there are no instances, yet if I try to

add a new instance it tells me there is already an instance using my instance

name.

I have tried searching master database tables and views for anywhere

where it might be stored, also tried poking around most of management studio

and the registry, and just can not seem to find where it is remembering that I

had tried to create this instance before.

It is like it is partially creating the instance, running into an error, and

then not rolling back its changes somewhere.
Any help would be very much appreciated

-Derek-

Web Services

Integration Manager

TempWorks Software

Si Vis Pacem, Para Bellum.

"Those who profess to favor freedom, and yet depreciate agitation,

are men who want crops without plowing up the ground. They want rain without

thunder and lightning. They want the ocean without the awful roar of its

many waters. Power concedes nothing without demand. It never did and it

never will." - Frederick Douglass

additional error information.
I tried to remove the database and restore from a backup, and yet it still believe the instance name is in use.
I notice it seems to be checking the NS InstanceMetaData for existing instances on this server...
"Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse"
anyone know where this metadata is ?

===================================

The specified name is used by another Notification Services instance on the server. Specify a different instance name.
Instance Name: TWNSinstance
Server Name: derekxps (Microsoft.SqlServer.NotificationServices)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=NSEventStrings&EvtID=DuplicateInstanceName&LinkId=20476

Program Location:

at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse(SqlConnection sqlConnection, NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.Add(NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.NSDatabaseCreator.Create(NSDBState dbState, SqlDatabaseAttributes databaseAttributes, List`1 createdStates)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.CreateDatabaseInfrastructure(Instance instance, NSSecureString argumentKey, NSInstance& nsInstance, Dictionary`2& nsApplications)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(Instance instance, NSSecureString argumentKey, Boolean uiReporting)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(NSSecureString sqlUserName, NSSecureString sqlPassword, String configFile, NSSecureString argumentKey, StringDictionary substitutions, Boolean uiReporting, String enforcedSqlServerSystem)
at Microsoft.SqlServer.Management.NotificationServicesUI.CreateInstanceGeneral.PerformCreate()|||

Hi Derek -

SQLNS 2005 stores its metadata in the MSDB database. Run this script in SSMS and see if your failed instance/application are listed.

USE MSDB

GO

SELECT * FROM NS90.NSInstanceInfo

SELECT * FROM NS90.NSApplicationInfo

HTH..

Joe

|||Thanks Joe,
I did find the instance names and schema names that it had "eaten" in there. cleared them and was able to install with the instance name I wanted.
Thanks for your help!

-Derek-

Ad: Answer Worked!

Hello all,
Thanks in advance for any help you can provide.
I am having a problem creating a new NS instance using SQL 2005 management studio.
I am using the database element in my instance and application xml files like this,
in order to create the NS application in an existing database.
<Database>
<DatabaseName>%databasename%</DatabaseName>
<SchemaName>%schemaname%</SchemaName>
</Database>
the problem that I am having is that if I encounter an error somewhere in the process of creating this new instance the instance name and schema name I specified are still bound somewhere, and if I correct for the error and try to create the instance again, I receive a new error saying that there is already an instance with my instance name, or using the schema name.
If I try to list versions it tells me there are no instances, yet if I try to add a new instance it tells me there is already an instance using my instance name.
I have tried searching master database tables and views for anywhere where it might be stored, also tried poking around most of management studio and the registry, and just can not seem to find where it is remembering that I had tried to create this instance before.
It is like it is partially creating the instance, running into an error, and then not rolling back its changes somewhere.

Any help would be very much appreciated

-Derek-

Web Services Integration Manager

TempWorks Software

Si Vis Pacem, Para Bellum.

"Those who profess to favor freedom, and yet depreciate agitation, are men who want crops without plowing up the ground. They want rain without thunder and lightning. They want the ocean without the awful roar of its many waters. Power concedes nothing without demand. It never did and it never will." - Frederick Douglass

additional error information.
I tried to remove the database and restore from a backup, and yet it still believe the instance name is in use.
I notice it seems to be checking the NS InstanceMetaData for existing instances on this server...
"Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse"
anyone know where this metadata is ?

===================================

The specified name is used by another Notification Services instance on the server. Specify a different instance name.
Instance Name: TWNSinstance
Server Name: derekxps (Microsoft.SqlServer.NotificationServices)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=NSEventStrings&EvtID=DuplicateInstanceName&LinkId=20476

Program Location:

at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.CheckInstanceNameInUse(SqlConnection sqlConnection, NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.InstanceMetadata.Add(NSInstance instance)
at Microsoft.SqlServer.NotificationServices.Common.NSDatabaseCreator.Create(NSDBState dbState, SqlDatabaseAttributes databaseAttributes, List`1 createdStates)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.CreateDatabaseInfrastructure(Instance instance, NSSecureString argumentKey, NSInstance& nsInstance, Dictionary`2& nsApplications)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(Instance instance, NSSecureString argumentKey, Boolean uiReporting)
at Microsoft.SqlServer.NotificationServices.Common.InstanceCompiler.Create(NSSecureString sqlUserName, NSSecureString sqlPassword, String configFile, NSSecureString argumentKey, StringDictionary substitutions, Boolean uiReporting, String enforcedSqlServerSystem)
at Microsoft.SqlServer.Management.NotificationServicesUI.CreateInstanceGeneral.PerformCreate()|||

Hi Derek -

SQLNS 2005 stores its metadata in the MSDB database. Run this script in SSMS and see if your failed instance/application are listed.

USE MSDB

GO

SELECT*FROM NS90.NSInstanceInfo

SELECT*FROM NS90.NSApplicationInfo

HTH..

Joe

|||Thanks Joe,
I did find the instance names and schema names that it had "eaten" in there. cleared them and was able to install with the instance name I wanted.
Thanks for your help!

-Derek-