HI, I have a lookup that find a specific row. If that row does not exist, I need to create a new one. If it exists, I need to raise an error and trap it with the "on_error" event of the dataflow in order to log it. Is there a way to raise an error and specify the error message from the dataflow? I was thinking using the conditional split and verify if the value returned from the lookup (by set the error config to ignore the error) is not or not. But how can I raise an error when the value is not null?
I can't believe I can't find this in books online...
I have a transformation script component and I have a case where I want the object to completely fail if it is encountered. How do I code that? All my searching BOL could find is how to redirect rows to an error output which is not what I need in this case.... I'd think it would be something simple like Me.RaiseError("Something really bad happened") but I haven't found it ...
I was asked if you can do "raise error" from the server side. I can do it from the client side but never had to do it server side. Is it possible at all, I can't find any documents on it. I'm using 6.5, and 7.0....
We are migrating the SP from 2000 -> 2005, in my previous verriosn they are using WITH LOG option to store the error messges in to the Applicatin log and System log.When migrated to 2005 and I tried to run that i got error messgae like "Only System Administrator can specify WITH LOG option for RAISERROR command.".
Is there any possbility that without granting admin access to the developers that we can run this stored proceedure.
My DBAs dont want to provide the admin access to all developers to execute this SPs is there any work around for this problem.
please help me out.
suggest me if there any other ways to handle this situation. I hope i will be answered by some one.
frenz: i have the following procedure:while running
EMP_SP_EmpDetails_Display 'FirstName', 'ASC'
i got the error like this: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near '.'.
plz can any one solve this problem.
My procedure:
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: -- Create date: -- Description: -- ============================================= ALTER procedure [dbo].[EMP_SP_EmpDetails_Display] -- Add the parameters for the stored procedure here (@colum as varchar(50),@order as varchar(50)) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;
declare @sqlexec varchar(1500)
-- Insert statements for procedure here set @sqlexec='' set @sqlexec=@sqlexec + 'SELECT EL.UserName,EL.Password, E.EmpID, E.FirstName, E.LastName, E.DesignationID, E.DepartmentID, E.Sex ' set @sqlexec=@sqlexec + 'E.DOB, E.Age, E.Address, E.Email, H.Hobby,' set @sqlexec=@sqlexec + 'ContactNo=Case When E.phone is not null Then E.phone ' set @sqlexec=@sqlexec + 'When E.phone is null Then E.Mobile End, ' set @sqlexec=@sqlexec + 'E.DateOfjoining, D.Designation, DE.Department ' set @sqlexec=@sqlexec + 'From dbo.EMP_Tbl_Employee E ' set @sqlexec=@sqlexec + 'Inner Join dbo.EMP_Tbl_Designation D On E.DesignationID=D.DesignationID ' set @sqlexec=@sqlexec + 'Inner Join dbo.EMP_Tbl_Department DE On E.DepartmentID=DE.DepartmentID ' set @sqlexec=@sqlexec + 'Inner Join dbo.EMP_Tbl_EmployeeHobbies EH On E.EmpID=EH.EmpID ' set @sqlexec=@sqlexec + 'Inner Join dbo.EMP_Tbl_Hobby H On E.Sno=H.Sno ' set @sqlexec=@sqlexec + 'Inner Join dbo.EMP_Tbl_EmployeeLogin EL On E.Sno=EL.Sno order by '+@colum+' '+@order+''
i have some doubt that if we want to put some data in the database, is two paragraph words, so is it i need to type this two paragraph word in the database?
how i can made a paragraph in database? is it possible?
I have a question here. I need to import the excel template into sql server data base tables. I did worked on the regular importing of excel spread sheets to import into the appropriate data base columns. I am not getting idea with the eacel template. My main goal is to import the excel template to sql tables and then reproduce the same template for the user in the browser. If any body can help i would really appreciate.....
I have heard that neither SQL Server 2000 nor SQL Server 7.0 supports adding the IDENTITY property to an existing column by using a single T-SQL command .Is it true?
ramesh writes "i was using oracle database in last 2 years. presently my concern using sqlserver 2000. so i have some doubt in sqlserver 2000. pls answer me.
1.Give some tips T-SQL with Examples. 2.how to call .sql files in query analyser."
When hourly transcation log backups are taken , is any log sequence number(LSN) generated .
I want to know if this is right or wrong.I do the T-log backups until 10.00 pm and I do the complete DB backup at 12.00 AM. So the complete DB backup contains the DB and the T-log from 10.00 pm till 11.59 pm.
Hi, I have a table in my database. Now I will import the data into table from excel. Now I have Firstname,Lastname,email,phone from excel.There is a chance some email,phone can be null. Now I have to identify and update the null values with values from tables from another database which has a master table containing all values.
In sql server 2005 we have ROW_NUMBER() as inbuilt function... But i am using sql server 2000... instead of ROW_NUMBER () what is the functionality in SQL SERVER 2000. can anyone help me out in this pls...
hi,How to search a word in the sqltable?.ie suppose the field name has data type nvarchar(200). From there i enter the persional address of that persion. now i want to know the information whoes are coming from particular city?. The city value can enter in the address field. how we can make search?...with regards,ks.kumar****************************************** This message was posted via http://www.sqlmonster.com** Report spam or abuse by clicking the following URL:* http://www.sqlmonster.com/Uwe/Abuse...753175428d29c27*****************************************
Hello: I had a Sql query doubt. I have two tables. One is table with profile data but in this table instead of actually values it stores codes. The value of each code is stored in another table. Something like this Profile Table ProfileID Title First Name Last Name State 1 122 xxx yyy 333 So as you can see title and state both are code which are further stored in another table which is something like this Code_ID Code_Value 122 Director 124 International 333 AZ Now I want to replace all these codes with values. Something like this ProfileID Title First Name Last Name State 1 Director xxx yyy AZ I tried Case statement but it fails. I am not sure how to do this. I have hundred thousands of records to doing programmaticall slows the process. I would appreciate your help or ideas.
When I try to restore a database on one server from another server, by choosing the ‘From device’ option, I am not able to see any mapped drives. So I always have to copy the backup file to my local drive before performing the restore. Is there any other way to do it? For example, Server1 contains a database db1. A full backup, differential backup and log backups of db1 are stored in , D:mssql7ackupfulldb1_full.bak D:mssql7ackupdiffdb1_diff.bak D:mssql7ackuplogdb1_log.bak The backup devices have been created using sp_addumpdevice. Server2 contains a database db1. If I need to restore a copy of db1 on server1 onto db1 of server2, I first copy D:mssql7ackupfulldb1_full.bak D:mssql7ackupdiffdb1_diff.bak D:mssql7ackuplogdb1_log.bak to a local drive on server2. I then restore using the ‘from device’ option. SQL Server uses NT Domain account with admin. Privileges, log on as a service rt. Etc.
When I try to restore a database on one server from another server, by choosing the ‘From device’ option, I am not able to see any mapped drives. So I always have to copy the backup file to my local drive before performing the restore. Is there any other way to do it using Enterprise Manager? For example, Server1 contains a database db1. A full backup, differential backup and log backups of db1 are stored in , D:mssql7ackupfulldb1_full.bak D:mssql7ackupdiffdb1_diff.bak D:mssql7ackuplogdb1_log.bak The backup devices have been created using sp_addumpdevice. Server2 contains a database db1. If I need to restore a copy of db1 on server1 onto db1 of server2, I first copy D:mssql7ackupfulldb1_full.bak D:mssql7ackupdiffdb1_diff.bak D:mssql7ackuplogdb1_log.bak to a local drive on server2. I then restore using the ‘from device’ option. SQL Server uses NT Domain account with admin. Privileges, log on as a service rt. Etc.
Hi all I am using osql utility in sql server 2000 to convert data in database to excel sheet. My datas contain both english and chinese . While converting to excel sheet english datas are comming but the datas in chinese is comming like (?) this. Does any body has any idea to solve this problem. is there any way to set font in osql utility. Note: I tried giving chinese font in excel still it is not working. Its really urgent pls reply thanks
1. Why it is necessary to have a primary key for a table in order to publish. 2. After setting up transactional replication can we add another table at the publisher side.If it is possible how to replicate that table.
hi al, We normally use foreign key in a table, as a reference to a primary key in another table. But by definition foreign key can assume null value.so my question is when we are using foreign key as null in a table.Clarification with an example would be great.. thanks in advance..
select MatchID, ClubID, Max(Distance) as 'MaxDist' From dbo.TrendHALF_SECOND_POSITIONS Where MatchID in (8,12) Group By MatchID, ClubID
How to get the PlayerID who has max(distance), If i do Group By MatchID, ClubID,PlayerID i can get the playerID, But I need PlayerID, but PlayerID should not include in Group By clause
How can i achieve it..
Thanks Ganesh
Solutions are easy. Understanding the problem, now, that's the hard part
Dear Experts, i'm practicing replication with this link, id dont know why my database engine option in server type was not enabled. please guide me in this regard