Help with character count in queries.

  • Thread starter Thread starter Guest
  • Start date Start date
musicfreakcc said:
How can i remove records in a column that have less than 50 characters or so?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What do you mean "remove records in a column"? A record (row) contains
columns; a column doesn't contain a record. Do you mean delete a record
(row) that has a column w/ less than 50 characters?

DELETE *
FROM table_name
WHERE Len(column_name) < 50

If you mean set a column value to NULL if it contains a string that is <
50 chars:

UPDATE table_name
SET column_name = NULL
WHERE Len(column_name) < 50

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRK1uc4echKqOuFEgEQLZiwCfW9lfyu+M2WrFGVilOfASxayLVE0An0sZ
amxS7wmqB5AxDGDbmzbA+q2B
=s5T2
-----END PGP SIGNATURE-----
 
Back
Top