Comparing two columns in two tables
How do I compare, via SQL, the contents of two, or more, columns in two
different tables? The table structures are the same (one is a baseline
delivery, the other the current table), but the current table will have
more records. I would like to periodically monitor the activity in the
table, but don't have auditing and can't modify triggers...
ASE 12.0 and Unix
What types of comparision do you want to do? difference in number
of rows? values that appear in one but not the other? average value?
> How do I com...when have 4 Tables how to compare table with 4nd table? ( need to join and compare with datatime)
column ↘ImportIndex ImportFileTime ImportSource
value ↘80507 20060506001100 815
80511 20061109120011 CRD &nb...Comparing two tables
I wish to compare two tables. I wish to find out if entries in one table are similar to the ones in the other tabl.
Can someone please provide me with a code fragment to make this comparison.
Any help would be appreciated
I think you need to explain your question a bit more. By tables you mean database tables? What do you mean you want to see if they are "similar?" Do you mean if they match exactly? Have certain columns exactly matching? Have similar substrings? That one is a substring of another?Happy Programming!-- Scott Mitchell-- mitch...how to insert data into two table when two tables depend on each other?
suppose there are two table called tableA and tableB and the situation
is the primary key of tableA is a foreignkey of tableB and the primary
key of tableB is a foreignkey of tableA.in this type of situation how
we can insert data into 2 tables called tableA,tableB.pls tell me how
can i handle this situation very efficiently.explain in
Hello my friend,
What you are suggesting is a many-to-may relationship, which is bad. If you really need to do it this way, you need to remove the constraint so that the fields are there to query but the relationships are n...Comparing Tables between ASA and ASE
I have just under 100 ASA employee master tables that I have to compare
against a master master table on ASE.
Is there no simple way to search for incongruous data in either DBMS? or
some macro in Excel that will compare worksheets bit for bit??
Worse yet how do I get ASE to export descent excel files?
Posted via http://dbforums.com
maybe you can use the ASE master master table as a proxy table in ASA
and use a simple join ...
[Hermann O. Eckert GmbH]
On 1 Aug 2003 03:34:42 -0700, westsan <email@example.com>
&g...Comparing contents of two tables
Hi All,I am developing one tool using VB.Net which will compare data and schema of two identical databases. I am trying to compare the data of the two databases by comparing individual tables. The tables in turn will be compared on a row by row basis I am trying to do somethis like this I have mentioned my question in pink color below. Can anyone help me on thisThanks in Advance!!
Private Sub CompareData()
Dim conn1 As SqlConnection = New SqlConnection("workstation id=IE10DT2KC03212;packet size=4096;integrated security=SSPI;data source=IE10DT2KC03212;persist security inf...compare two tables and update
hi friends i have 2 tables AA and BB
AA TABLE HAS LOCCODE AND PERCENTAGE
IN BB TABLE HAS
I WANT TO COMPARE TWO TABLES BY LOCCODE IF MATCH
THE UPDATE PERCENTAGE IN BB TABLE
UPDATE SET b.PERCENTAGE = a.PERCENTAGE
FROM AA aINNER JOIN BB b ON a.LOCCODE = b.LOCCODE CSR~ Please Mark as Answer if it solves you...Comparing dates in two tables
Having some trouble figuring out how to put this together.I have table1(thread) has thread_id and table2(post) has thread_id that are related. table1(thread) has 1 record to many records in table2(post). Both tables have a datetime field and what i want to do is compare the datetime field in table1 to the records in table2 and get the most recent date along with all its related columns(title, subject, etc). this can either return the most recent date for table1 record or one of the related records date. So, (if anybody can figure this out) how would i put together a se...Compare two tables...URGENT!
Can anyone give me the query,cursor that I can use to to compare the data
between two similar tables.Data from col1,col2,col3,col4 needs to be
compared. Col1 is primary key in both the tables.It should return with
zero rows if they are same.But table1 is in diffrent databse and table2 is in diffrent database"Mark As Answer" If my reply helped you --
Hope the following code can helps out.. SELECT CASE WHEN COUNT(*) = 0 THEN 'Same' ELSE 'Different' ENDFROM ( ( SELECT *...How to insert into two tables at (Master table and Detail table)
I was hoping that the asp.net/learn/dataaccess would have had a tutorial for inserting into a MasterRecord and DetailRecord.
I have a page that I am working on that is a Reciepe. The Master Record has details such as customer, mix name, create date. The Detail Records has Ingredient Name, Ingredient Amount, etc.
I have been following the DAL and BLL concept of the asp.net/learn/dataccess tutorials. Does anyone know of an example that I can follow of setting up two tables and inserting into two tables from the same Button_click event.
You just need to reme...The same table (Table) cannot be the child table in two nested relations.
I"m getting this error when trying to load an XML document from a third party. I don't have the option of asking them to rename anything. Here's what i'm trying to accomplish.
DataSet _ds = new DataSet();
I tried InferSchema, IgnoreSchema and, of course, Auto.
I got the same error w/ Infer as Auto (above). With Ignore, I got an empty DataSet.
Get that url, and dump it to the browser. It seems like it's not meant to be loaded into a dataset. Or it's...SQL Quiz: How to compare two tables?
I need ideas.
How do I compare the data in two different tables using a T-SQL select ?
I need to know if both tables are *exaclty* equal (same data and # of rows).
Any ideas ?
Supposing the two tables (tabA, tabB) have the same structure, the same
number of rows (this is easy to check) and no duplicate rows, my idea is as
(a) create a temp table (tabT) with the same structure
(b) insert into tabT the rows in tabA
(c) insert into tabT th erows in tabB
(d) create a clustered index on tabT with ignore_dup_row
(e) if the numbe...stored procedure not inserting into linking table properly - two tables
Hi can anyone help me with the format of my stored procedure below.
I have two tables (Publication and PublicationAuthors). PublicaitonAuthors is the linking table containing foreign keys PublicaitonID and AuthorID. Seeming as one Publication can have many authors associated with it, i need the stored procedure to create the a single row in the publication table and then recognise that multiple authors need to be inserted into the linking table for that single PublicationID. For this i have a listbox with multiple selection =true.
At the moment with the storedprocedure below it is creati...