Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL - Delete Spaces

Status
Not open for further replies.

dsmith1000

Programmer
Nov 21, 2001
8
US
Got a little problem. Got this query -

SELECT [offices].[officeName]
FROM offices
WHERE offices.officeName Not In (SELECT office FROM dailyFlash Where fDate = [todayDate];)
ORDER BY [office];

Using this query to get all the offices that have not placed a daily flash report into the system. How do I take out the spaces in the office name in both the main query and the subquery and compare that data? (For some reason the space goes away when updating with some office names. Therefore the need to compare without the spaces.)

Thanks for any help,
dave
 
You might be able to use a replace function.

dim strNewName
dim strOldName 'This should get the value you pull from the database.

strNewName = Replace(strOldName," ","")

Something along these lines should work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top