|
|
I have gone through the reference what you gave. but there is no hint for combining the insert and update events in a single trigger?
I want to combine them because i am going to perform the same operations partially.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
CREATE TRIGGER TRIGGER_NAME
ON TABLE-NAME
FOR INSERT, UPDATE
.....
.....
.....
you can achieve your functionality by writing your logic in this trigger!
Gautham
|
|
|
|
|
Hi ,
I installed the SQL Server 2005 with all the components.actually i want to bractice the SQL Server Business Intelligence Development Studio as i study.....the thing is SQLServer BI is different, meening that new -> project template is diffent..It is same as MS Visual Studio 2005.(I have already installed that also.)
i want BI as it is in initial...
something wrong that i doing?? Is it same? i want that as it is...any setting to build..
Thanks in advance!
|
|
|
|
|
While raising an error using the RAISERROR statement is there any specific state and level no to be given, will it affect any thing. If so what nos i can specify?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
|
RAISERROR ( { msg_id | msg_str } { , severity , state }
Error numbers for user-defined error messages should be greater than 50,000
severity the user-defined severity level associated with this message
State an arbitrary integer from 1 through 127 that represents information about the invocation state of the error. A negative value for state defaults to 1.
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Thank you all.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Glad to help Always.
Regards,
Satips.
|
|
|
|
|
Hi
i have 2 questions in SQL 2005
First:
How to upload a picture in the database as i want each user to put his pic
second:
How to make the search CaseSentive
so it can diffrentiate bet
bahaa & BaHaa
Thanks a lot
|
|
|
|
|
I am currently working Asp.net with c#, inserting data from webform into sqlserver 2000 datatable.
table id column contain identity increment.It will increment id for every new recored.
I inserting 10 recoreds id 1 to 10 into table then deleted last two records (9&10) then inserting a new record
these record id having 11 insted of 9 in id column.
Plz help me .......
Thanks in adv
|
|
|
|
|
This is normal. The absolute simplest thing to do is to code your application so it does not expect or require contiguous identifiers.
The database records the next identifier for a table with an IDENTITY column in the table's metadata. It uses and increments that value when inserting a new row. You can only reset the value by truncating the table, removing all existing rows, or using the DBCC CHECKIDENT command. You have to set a special option to insert a value into the identity column.
If you really can't stand to have gaps, you'll need to manage the identifiers yourself.
|
|
|
|
|
Hello to every One,
i'm using database in my web form for login and user purpose.. due to some reasons i have to format my pc.
after that when i again re-install sql server 2000 and visual studio7 i'm unable to connecto to the database in the following line:
Protected sqlconnection1 As SqlConnection = New SqlConnection("data source=.;initial catalog=daccrop;persist security info=False;user id=dac1605;pwd=dac1605;workstation id=self;packet size=4096")
Actually i have changed the server and computer name in my new installation i.e from "DAC_147_347" to "garg" and again i don't remember how the authentication was done i.e windows or by sql server login. Following is the modified coding for connecting to database..
Protected sqlconnection1 As SqlConnection = New SqlConnection("data source=GARG;initial catalog=dac1605;integrated security=SSPI;persist security info=False;workstation id=GARG;packet size=4096")
This is still not working..
suggest me how should i know the setting done in sql server and after knowing how should i implement it.
The Error shown to me is:
"SQL server does not exist or access is denied"
Thank You..
|
|
|
|
|
Use Enterprise manager to view the Server properties and see how security is set up. If it is set up for windows authentication, then change your connection to use that. If Sql server or mixed, then use EM to view the logins, and find the login you wish to use. Reset the password, then update your connection string.
|
|
|
|
|
Hi Guys,
The database is remotely located in other place and I have no more time to go back there. How can I backup the database remotely to my local machine?
I am using MsSQL2005 for my remote web development, and I just wanted to have a copy of the database into my local machine.
I hope you can help me with this.
hifiger2004
|
|
|
|
|
If you can, back the database up to a shared drive (or ftp directory that you have access to) on the remote, then copy (ftp) the backup file to your machine.
|
|
|
|
|
Hi Rob,
That's what I am thinking before. But if there are some other ways to do it aside from ftp then i will go for it.
Anyway, since there's a lot of time wasted for finding some other ways, I rather go for ftp.
Thanks for your support Rob.
hifiger2004
|
|
|
|
|
hi,
i am using MSSQL2000.
i wrote a query with sum() of aggregate function.
like
Select sum(sal)from table1 where empid=1 and date>'1/23/2006'
in this if thers is no record it rteurn 'NULL'
is it possible to return it as 0
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
i got its answer
SELECT isnull(sum(Sal),0) FROM table1 WHERE...
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
of cause,
the code like this:
Select case when sum(sal) is null then 0 esle sum(sal) end
from table1 where empid=1 and date>'1/23/2006'
|
|
|
|
|
thank u
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Hai everybody,
Can any one give me a hint how to throw an exception explicitly in SQL stored Procedure inside the try catch block.
and how can i quit form the procedure in mid way
Thanks in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
The command is called raiserror. If you do a seach on it you will find plently of examples. If you want to quit a stored procedure and you don't want to use raiserror with a high enough severity then you the Return key word to exit the procedure.
Hope that helps.
Ben
|
|
|
|
|
Thank you Ben.
It is working fine.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I make a DataBase and create the table and procedure all in the the default schema and primery file group
Can any one tell me how to replace the tables and procedures in a new file group and schema
merwa
|
|
|
|