Thursday, March 22, 2012
DISTINCT First Name and Last Name for Mail Merge
don't know, but maybe that is an area to start?
http://www.4guysfromrolla.com/webtech/tips/t103101-1.shtml
good luck|||It doesn't need to be that deep.
I thought of another idea. How do I use SELECT DISTINCT to return all rows in my table and only unique address fields?|||I think that a group statement might accomplish this??
as in
select f_name from table group by f_name
I re-read your post...
address validation is a trick...
the address field can be set up many ways, and the street
type designation can also be setup in a whole slew
of different ways...
what does your address field look like (sample data)
thanks
tony|||Soundex is a practically useless algorithm.
You can select distinct First/Last names in a subquery, but then which address would you use if the two records do not agree?
Here is one of the simplest methods:select YourTable.*
from YourTable
inner join --DistinctNames
(select Max(PrimaryKey) as PrimaryKey
from YourTable
group by FirstName,
LastName) DistinctNames
on YourTable.PrimaryKey = DistinctNames.PrimaryKey|||You da' Blindman! Thanks, that's exactly what I needed.|||I hate to post an extension to the question in the same place, but here goes. My owners are listed more than once if they own more than once parcel of land. What I need to do next is continue the merge to each only once, but add up their land acreage amounts and total for each person. Thoughts anyone? Thanks in advance.sql
Friday, February 24, 2012
display string having length greater than 255
I have a created a table and entered data into the table as follows:
CREATE TABLE t ( id INT , txtcol varchar(1000) )
INSERT INTO t ( id , txtcol ) VALUES ( 1 , 'ATXR_SOURCE_ID,CDDL_AG_PRICE,CDDL_ALLOW,CDDL_ALTDP_EXCD_ID,CDDL_CAP_IND,CDDL_CHG_AMT,CDDL_COINS_AMT,CDDL_CONSIDER_CHG,CDDL_COPAY_AMT,CDDL_DED_AC_NO,CDDL_DED_AMT,CDDL_DIS_PA_LIAB,CDDL_DISALL_AMT,CDDL_DISALL_EXCD,CDDL_DISC_AMT,CDDL_DP_PRICE,CDDL_FROM_DT,CDDL_PAID_AMT,CDDL_PF_PRICE,CDDL_PR_PYMT_AMT,CDDL_PRICE_IND,CDDL_REF_IND,CDDL_RISK_WH_AMT,CDDL_SB_PYMT_AMT,CDDL_SURF,CDDL_TOOTH_BEG,CDDL_TOOTH_END,CDDL_TOOTH_NO,CDDL_TOT_PA_LIAB,CDDL_UNITS,CDDL_UNITS_ALLOW,CGCG_ID,CGCG_RULE,DPCG_DP_ID_ALT,DPDP_ID,DPTC_CD,PDVC_LOBD_PTR,PSDC_ID,UTUT_CD' )
Now if i select data using the query below the txtcol field displays only 255 characters :
SELECT * FROM t
Y is this happening?
This is happening because of your client application (QA, SSMS or something else) has a setting not to display field values grater than 255 bytes. Inspect application options, then.