comparing datafields in different tables

  • I am a newbie to SQL and would like to know: Is there anyone who can help me write a select statement for comparing two datafields in two different tables? I.e. I have two tables, employeecustomdetail with field freetext04 and occupation table with datafiels name. I need to compare freetext04 and name because in freetext04 I have a value i.e rigger and in occupation.name I have Rigger0260. I would like to first only records where section of name is equivalent to freetext04 as I need to replace the values in either freetext04 or name so that they contain the same value.

    It seems very intricate to me, I know a possible solution to this may be using strings and the len functions, can one of you gurus please please help me.

    You can mail me at crazee_frecks@hotmail.com as well.

    Thanks

    Goldie

  • Can you post some data examples. Your explanation seems confusing.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net

  • I have two tables.Employeecustomedetail with field freetext04 and another table occupation with the field name. Now both freetext04 and occupation contains an employee's occupation. HOwever in freetext04 the occupation will be i.e 'rigger' and in occupation.name it will be rigger0260. How do I write a statement that compares these two fields? Does it make more sense now?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply