Click here to Skip to main content
16,018,904 members
Home / Discussions / Database
   

Database

 
GeneralRe: sql command error Pin
Tim Carmichael4-Aug-11 3:21
Tim Carmichael4-Aug-11 3:21 
GeneralRe: sql command error Pin
GenJerDan4-Aug-11 4:51
GenJerDan4-Aug-11 4:51 
GeneralRe: sql command error Pin
jschell4-Aug-11 8:27
jschell4-Aug-11 8:27 
GeneralRe: sql command error Pin
PIEBALDconsult4-Aug-11 14:29
mvePIEBALDconsult4-Aug-11 14:29 
GeneralRe: sql command error Pin
PIEBALDconsult4-Aug-11 14:33
mvePIEBALDconsult4-Aug-11 14:33 
GeneralRe: sql command error Pin
Shameel4-Aug-11 4:58
professionalShameel4-Aug-11 4:58 
QuestionHow to get all reference of a column in a database. Pin
digvijay dobhal2-Aug-11 19:36
digvijay dobhal2-Aug-11 19:36 
AnswerRe: How to get all reference of a column in a database. Pin
Nagy Vilmos2-Aug-11 22:24
professionalNagy Vilmos2-Aug-11 22:24 
There is not an easy answer here, it is down to your database schema.
One way I would approach this is to buy a bottle of good scotch and take it to the DBA. Ask the DBA "what tables link to plan using planId?"
If he can't help then you'll need to do some mining.

First find the candidate field names. Not knowing which DB you are using I can give a generic idea:

SQL
SELECT DISTINCT COLUMN_NAME FROM SYSTEM_COLUMNS

Here the table SYSTEM_COLUMNS is the system table containing all the column definitions and COLUMN_NAME is the field with the column name.

If you know the definition of the field planId you could add it into the query to narrow down the search.

Once you have your fields, you can then query to get the tables that contain these fields. It is /relatively/ easy SQL but does need a bit of leg work to read through the results and ensure you have no false positives.

If the table and column names do not follow a structure then I am afraid you may well have to use educated guesses.


Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

AnswerRe: How to get all reference of a column in a database. Pin
UNCRushFan3-Aug-11 1:43
UNCRushFan3-Aug-11 1:43 
GeneralRe: How to get all reference of a column in a database. Pin
digvijay dobhal3-Aug-11 1:51
digvijay dobhal3-Aug-11 1:51 
AnswerRe: How to get all reference of a column in a database. Pin
Shameel3-Aug-11 2:05
professionalShameel3-Aug-11 2:05 
GeneralRe: How to get all reference of a column in a database. Pin
UNCRushFan3-Aug-11 2:13
UNCRushFan3-Aug-11 2:13 
GeneralRe: How to get all reference of a column in a database. Pin
digvijay dobhal3-Aug-11 2:42
digvijay dobhal3-Aug-11 2:42 
Questionmysql SELECT WHERE Pin
samson radu2-Aug-11 1:33
samson radu2-Aug-11 1:33 
AnswerRe: mysql SELECT WHERE Pin
Luc Pattyn2-Aug-11 2:02
sitebuilderLuc Pattyn2-Aug-11 2:02 
GeneralRe: mysql SELECT WHERE Pin
samson radu2-Aug-11 2:20
samson radu2-Aug-11 2:20 
AnswerRe: mysql SELECT WHERE Pin
Luc Pattyn2-Aug-11 2:28
sitebuilderLuc Pattyn2-Aug-11 2:28 
GeneralRe: mysql SELECT WHERE Pin
samson radu2-Aug-11 2:44
samson radu2-Aug-11 2:44 
GeneralOrder by Pin
David Mujica2-Aug-11 2:44
David Mujica2-Aug-11 2:44 
GeneralRe: Order by [modified] Pin
samson radu2-Aug-11 2:52
samson radu2-Aug-11 2:52 
GeneralRe: Order by Pin
PIEBALDconsult2-Aug-11 2:57
mvePIEBALDconsult2-Aug-11 2:57 
GeneralRe: Order by Pin
samson radu2-Aug-11 3:06
samson radu2-Aug-11 3:06 
AnswerRe: mysql SELECT WHERE Pin
Nagy Vilmos2-Aug-11 22:27
professionalNagy Vilmos2-Aug-11 22:27 
QuestionError trapping in SQL Server 2005 [modified] Pin
vanikanc1-Aug-11 7:37
vanikanc1-Aug-11 7:37 
AnswerRe: Error trapping in SQL Server 2005 Pin
jschell1-Aug-11 8:25
jschell1-Aug-11 8:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.