How to handle errors in Stored Procedures. I want to display
a message to the user in the .aspx page that is calling a
stored procedure in it's code behind. please help me.
i want to create procedure for create table in sql server
2005
for example
create procedure create_table
@table varchar(20)
as
create @table(
id int,
name char(20)
)
but it will get error
what is solution?
CREATE TABLE [dbo].[HPMS_CompetencyTypes](CompetencyType
varchar(50) )
go
create trigger hpms_create_Insert
on HPMS_CompetencyTypes
for insert
as
if Exists ( select * from [HPMS_CompetencyTypes] where
CompetencyType=(select * from [HPMS_CompetencyTypes]))
begin
Rollback tran
Raiserror ('duplicate value',12,6)
go
insert HPMS_CompetencyTypes (CompetencyType) values ('new')
I'm new to trigger can any one tell me where is the issue.
Please.
1.can we set the more than 1 primary keys for a table?
2.please give me the difference between Cluster Index and
non-Clustered Index
3.can we use query like this "Select * from Table1,Table2;"
hi,
how to match retrieve the unmatched records from 2 tables
in which we dont have any primary key. example : table1 has
1,2,3,4,5 and table2 has 1,2,3,4,5,6,7,8,9,10 and i want
the numbers from 6 to 10 to be displayed and should not
come as null. i need the numbers. please reply as soon as
possible.
A successfully created SSIS package in SQL Server 2005 runs
fine in MS BIDS and Integration Services. But gives error
when run through an SQL-Job. What are the possible reasons?
Can you give me some DBCC command options?(Database
consistency check) - DBCC CHECKDB - Ensures that tables in
the db and the indexes are correctly linked.and DBCC
CHECKALLOC - To check that all pages in a db are correctly
allocated. DBCC SQLPERF - It gives report on current usage
of transaction log in percentage. DBCC CHECKFILEGROUP -
Checks all tables file group for any damage.
How To Find That One Week Change in My DataBase we Have Done
Like We Have A database Test I Change Table,Stored Procd.
Then I Find Which SP,Table We Have Edit/Change in Seven
Dayes
146
i use few third party softwares. they r all having their
own databases .
but the data is repeated in all these databases - say a
person is in all the three databases, but his name is
stoared in diff format in all databases
i want to create a centralised database ,and i dont want to
re-enter the records .
using the exisating records how can i build a centralised
database?
104
Which command executes the contents of a specified file?
What is the disadvantage of using subquery exact after a
select statement?ex.
select (select * from sometable)
13
code to create procedure for taking databse backup in sql
server or i have the query for it but what it's query
returns means i want to show on my jsp that the databse
backup has been taken on the basis of that return
value.does it returns 0 or 1.wat is the code for that
You have modified 100 store procedures and want to
replicate these changes from development to prodution, and
production can have users using the Server/DB, how would
you replicate without causing issues?
104
what is package and it uses and how can u call a package