I am trying to display the RowID alongside all columns from a Select * statement.
I am using Oracle with Toad to run the SQL statement.
I have two tables that I need to compare, but I do not have any unique identifiers to use when sorting the two tables for comparison. So I thought that using the RowID to sort the two tables in order to compare them could help.
Is there a way to add RowID to a Select * statement? I cannot add all the columns names as there are over 50 of them. I will be doing this to multiple sets of tables where the number and name of columns will vary.
Any help or ideas around this would be greatly appreciated.
Thanks in advance,
Marwan
ROWIDTOCHAR
when displayingROWID
? – CheddarMINUS
? techonthenet.com/sql/minus.php – SuctorialMINUS
to get the 'offending' rows, but then I have to go through the data to figure out what the discrepancy is between the data. What is currently being used (and I am being thrown into this) is an Excel spreadsheet that does the comparison for the two tables using three tabs, one for each table, and the third for comparing the results. The users want to be able to sort the data so that they can analyze the differences in the data between the two tables. – CheddarMINUS
withROWID
, and I got error ORA-01790, which states that the expression has different datatypes.SELECT ROWID, abc.* FROM table_1 abc MINUS SELECT ROWID, bcd.* FROM table_2 bcd
Do I have to convertROWID
to a specific data type? I understood thatROWID
is its own data type. Help. I understand that by performing the above statement/query, I will get back all the rows since theROWID
values will be different in both tables. – CheddarROWID
withROWIDTOCHAR(ROWID)
in eachSELECT
query, and it works now. – Cheddar