473,388 Members | 1,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Comparing tables

Hi,

I want to know how can i write a stored procedure for the following sceario.

Take if there are three tables, table1, table2, table3 and table1 is linked with table2 and table 2 is linked with table3.

Now i have to compare a data in table 3 for one of the rows in table1 where as For the same row in table1 there will 100 rows in table 2 and for each row in table2 there will be 100 rows in table 3.

So I need to write a stored procedure to compare the data in table 3 with some value and throw execption.

I will give u rows of all the three tables;


Tabel1

tag

name

date

expirydate


Table 2

tag

table1_tag

name

expirydate



Table3

tag

table2_tag

name

status

date

expiry


Now I have to compare the status of table 3 with values 0 and 2 and throw error.

Can u please send me stored procedure for the above scenario

Thanks and Regards
Abdul Razak
May 14 '06 #1
1 1405
Please reply for the below mail its urgent please..................................

Hi,

I want to know how can i write a stored procedure for the following sceario.

Take if there are three tables, table1, table2, table3 and table1 is linked with table2 and table 2 is linked with table3.

Now i have to compare a data in table 3 for one of the rows in table1 where as For the same row in table1 there will 100 rows in table 2 and for each row in table2 there will be 100 rows in table 3.

So I need to write a stored procedure to compare the data in table 3 with some value and throw execption.

I will give u rows of all the three tables;


Tabel1

tag

name

date

expirydate


Table 2

tag

table1_tag

name

expirydate



Table3

tag

table2_tag

name

status

date

expiry


Now I have to compare the status of table 3 with values 0 and 2 and throw error.

Can u please send me stored procedure for the above scenario

Thanks and Regards
Abdul Razak
May 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
by: Odd-R. | last post by:
I have to lists, A and B, that may, or may not be equal. If they are not identical, I want the output to be three new lists, X,Y and Z where X has all the elements that are in A, but not in B, and...
4
by: osmethod | last post by:
Hello, I have read many articles about comparing tables, like - loops, delete queries, appending to temp table with index etc Problem: 2 tables T1 & T2. Data is suppposed to be the same in...
0
by: laxmiuk | last post by:
I've original version of a table called PMM (Product Material Master). Thro' a web interface, user can change that table contents. Once changed, i need to raise an ECN (Engineering CHange Note)...
2
by: windandwaves | last post by:
Hi Guys I want to find out if two tables are identical (e.g. same fields, same indexes, etc....). Not the data, but the table structure itself. Is there a smart way to do that? Cheers
1
by: Reg Rat | last post by:
Hello all, I'm led to believe that the .Net framework offers intelligent string comparison such that é follows e in an alphabetic sort rather than appearing after z, for example. Does this mean...
19
by: Will Lastname | last post by:
In one of the applications that I'm working on I have 2 sets of functions that build different datasets. Imagine 4 columns in a datagrid. Inside those 4 columns I have nested datalists. Two of...
21
by: Kristaps | last post by:
Hi everyone! I have some questions, maybe someone can help me... I write script for table comparing, but it works wery slovly. There is the script, can anyone give some tip how can I make this...
3
by: hasnain | last post by:
Dear All, I want to compare two tables. Both of the tables have same fields but their location in terms of columns can be different. My target is to get those fields only whose values are found...
5
by: Franck | last post by:
how come unchanged always true even if data changed This code come from my saving button: ============================================ DataSet ds1 = new DataSet(); DataSet ds2 = new...
4
by: gillianbrooks91 | last post by:
Forgive me for asking this question, I've trawled through nearly every available post on this subject that I can find for a few weeks now but nothing quite points me in the right direction. I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.