|
What is your question? You want to write a delete trigger but don't know how? Have you tried reading the documentation[^]?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thanks for ur attention
i know the syntax of how to write a trigger but i want to take the row that is deleted from the first table and insert that row in the second table
thank you in advance.
haitham
|
|
|
|
|
The logical table deleted contains the data for the row(s) you are deleting. Write an INSERT INTO query that takes the rows in this table and inserts them into your history table.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thank you very much for this help
haitham
|
|
|
|
|
Hi!
is it possible to get a logical sum on two integers in sql??
thanks for any help
life is study!!!
|
|
|
|
|
never mind that..
fyi, you just do it like in c and others
life is study!!!
|
|
|
|
|
How to connect Crystal Report with DSN using C# Code?
CrystalReportViewer1.ReportSource=Server.MapPath("CrystalReport1.rpt");
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.UserID="sa";
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.Password="abc";
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.ServerName=".";
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.DatabaseName="db";
Instead of Database Name, I want to use DSN(XYZ);
What will be the syntax?
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.DSN="XYZ";
above Code will not run.
|
|
|
|
|
Hi All,
I need to port Mysql database records to SQL sever database.
How can I do this ?
Mohammed Said Emam Osman
Software Engineer
|
|
|
|
|
There are several ways you could do this, including:
1. Export each of your MySQL tables to text files, then use the SQL Server BCP utility to load them into your SQL Server database.
2. Write an SSIS package to perform the migration
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi ,
im not getting how to open mdf,ldf database files ..
can any one tell me how to retrieve the database from these files ..
thanks ...
|
|
|
|
|
Here[^].
The obvious way to retrieve the data is to use Access. That's what created them. If you mean how to get to the data in code, then there's tons of info on the web. We couldn't possibly help more, as you don't say what language you're using, if that's what you mean.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I think you mean .mdb files - those are created by Access.
|
|
|
|
|
mrsuman wrote: im not getting how to open mdf,ldf database files ..
These are the SQL Server database (mdf) and log (ldf) files. You can view the objects using SQL Server Management Studio.
|
|
|
|
|
Hi ,
thanks for your reply, i am having one mdf and ldf files , i
want to restore the database from these two files . i tried to open with
access , but im getting error .
if u have any idea please let me explain ..
|
|
|
|
|
mrsuman wrote: thanks for your reply, i am having one mdf and ldf files , i want to restore the database from these two files . i tried to open with access , but im getting error .
Looks like you haven't read my reply... these are SQL Server databases, not Access files
|
|
|
|
|
i am importing data from Excel to Sql Server Table but I got
follwing error.
Heterogeneous queries require the ANSI_NULLS AND ANSI_WARNINGS
my code
Insert Into JewelryUploadTemp
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\share\JewelryUploadSampleMar2008.xls','select * from [chetan$]')
in stored procedure
I am waiting for help...
Best Regards,
Chetan Patel
|
|
|
|
|
Did you not try searching Google[^] to find out what the error message means?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
Are you using a SP.
Try this;
Generally the error is due to needing to set the properties
when you create the stored procedure. Try recreating your
stored procedure using:
SET ANSI_NULLS ON
GO
SET ANSI_WARNINGS ON
GoodLuck
|
|
|
|
|
Dear all,
Here i m facing a problem with some group by date here i m getting two rows of a single date for values fetching. if any one wants i can give the code for ur easy answer giving.
thank you
sai krishna
|
|
|
|
|
When you are using date as group by field then it create new group for each and every record with different time.
ex/
01/10/2007 10:10:00 PM
01/10/2007 12:10:00 PM
so use Convert Function for Convert Date in dd/mm/yyyy fromat for correct answer
Best Regards,
Chetan Patel
|
|
|
|
|
thanks i got it
sai krishna
|
|
|
|
|
hi fellows,
i want to change the data type of a table1(column1) that exists as a foreign key in table2(column2).
i want to change the data type of column1(table1) but sql server gives the error that column2(table2) is dependent on column1(table1) so the data type cannot be changed.
waht query should i use to ensure that when data type is changed of column1, then the data types of all the referencing columns in different tables should be changed?
reply soon plz!!
modified on Saturday, March 8, 2008 3:34 AM
|
|
|
|
|
Suspend referential integrity between the 2 tables, then make your changes.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
how do i suspend refrential integrity constraint?
|
|
|
|
|
Bring your table up in Design mode. From the 'Table Designer' menu select 'Relationships'. Set the 'Enforce Foreign Key Constraint' option to 'No'.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|