Is it possible to construct a query so that I can find out what tables have a particular column? Then if it has the column query that table for an ID number? Is this possible?
Sure, I think you can look at the contents of the X$Field system table, described here:
http://ww1.pervasive.com/library/docs/psql/794/sqlref/sqlsystb.html
Related
My requirement is simple...
I have a table in SQL with more than 300 columns in it and I need to compare the data present in those columns with the source table.
Now every time I cannot waste my time finding where is the column I want to compare the data by dragging.
So my question is...Is there any short cut or code to go to a specific column when in case of a large table as in my requirement.
Any help is highly appreciated.
There are multiple ways to compare two tables based on the requirement.
If your source can be accessible for you then simple MINUS will do.
In Oracle:
SELECT COL1,COL2,COL3.... FROM SOURCE
MINUS
SELECT COL1,COL2,COL3.... FROM TARGET
In Informatica you can generate MD5 hash for the column you want to compare from both Source and Target and check whether both hashes are matching.
I am currently having one problem and I need your help. In my data table, I have one column contains all information that I need, but it has json type. Hence, I have to use SQL query to parse these information.
However, those information now becomes several columns, and that's not what I need. So, may I ask if I want to change these information into rows, which mean transpose the table result, what function should I use? Thanks in advance. My table result contains several rows and several columns.
I have a table with a column called names, it is meant for there to be several rows with the same name. I need to find a way to make a query to give as result a 4% random sample of the rows with every name using Access SQL syntax. For example, if there are 100 rows of each name in the table, for it to return 4 random rows for each name on that column. Does that make sense?
I'm not very experienced on Access SQL and SQL in general, yet. Any guidance will be greatly appreciated!!!!! :)
This material might be helpful
http://support.microsoft.com/kb/153747/en-us
I have a table PatientChartImages. It has a column ChartImage, which contains the binary of images. Now, we are planning to create a separate table which will contain the Binary of Images and will join both the tables to get requisite data. Now, we do not want to change the front end and I cannot use triggers. So, is there any way by which if a query refers to ChartImage column of PatientChartImages, it picks data from the third table? Please suggest.
I think inner-join does this. I've only overheard it's use - but this might lead you towards your answer.
I have multiple tables which all have the same structure --except a couple of them have one column misnamed. I would like a sql statement that would allow the user to select that misnamed column using the correct name (there are only 2 possible names for the column-the correct one and the wrong one). I was thinking I could have the query first look at the all_tab_columns view to look up the table and decide which spelling of that column the table has to retrieve the data...
I understand the difficulty of renaming/altering existing production tables, but it seems like the best solution to this problem is simply to update the misnamed tables with the correct column name. Is there a reason (beyond extra work) that this is infeasible?