User Profile
Collapse
-
srathi started a topic comparing two tables to look for mismatches and a way to edit the table valuein SQL Servercomparing two tables to look for mismatches and a way to edit the table value
Hello Everyone,
I am trying to compare data in the country field between two tables to look for differences. The problem is one table has value as "United States" and the other has it as "USA". Another example is England and United Kingdom. So it takes both of these as a mismatch.
I cannot really change value in either of the tables and so I need a way to edit value just for my query and get results.... -
-
hey pbmods,
i'll def keep the post guidelines in mind going forward. and thanks for looking into my query...
now, there's a slight problem witht concat. the sql version i'm using does not support this function.
also is there a way i can remove characters and spaces from the fields i'm comparing? basically, i'd like to see if "ABB" (probably use the Len function to pick a part of the "name...Leave a comment:
-
thanks pbmods.
so i have this table, description_tbl that has the fields: name and description. I'd like to compare the two fields and see if the 'value' in the name field exists anywhere in the description field.
so if the name is Microsoft and the desc field has something like "Inc. provides...." it should a part of my results because microsoft does not exist in the description field.
both...Leave a comment:
-
Comparing two varchar fields from separate tables
hi,
how do i compare two varchar fields?
my table has two fields, name and description. i need to find those records where the name does not match with or exist in the description field anywhere. should i use a "not exists"?
thanks,
s -
-
thanks for the quick response. my table has over 300 fields so i would have to do the null or '' for each. is there a faster way to do this?Leave a comment:
-
Need to extract only some values from the table
Hello Everyone,
I am looking for some help again....
So my table has CompanyID, companyname, companytype, address, Phone, and Fax etc...
I want to extract records that only have phone no. and nothing else. My query is giving me all companies that have phone so it's including fax, address etc. which i don't to see. i want the query to return the companyids that have phone numbers only.
Any... -
-
the personid is unique and primary. hope that helps. thanks for looking into this.
-SLeave a comment:
-
extracting values from a table
Hi,
My table has following fields personid, firstname, lastname. I'm trying to extract those names that do not have either the firstname or the last name
so if my table has values like
personid/firstname/lastname
1 Jim Lee
2 Erik
3 Smith
I want the query to return # 2 and # 3 since the last name is missing in # 2 and the first name is missing in # 3....
No activity results to display
Show More
Leave a comment: