SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Multipart Identifier Could Not Be Found
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lyleholc
Starting Member

USA
2 Posts

Posted - 05/21/2013 :  19:49:48  Show Profile  Reply with Quote
Dear All,

I'm new to SQL and I can't figure out the right syntax. I'm trying to code a TSQL statement in SQL Express 2012 to get the Soundex value for a word in a table. The database is WP1, the Table is IPUSQL, the field is Word. I've tried qualifying, using brackets, etc. but to no avail. I'd also like to be able to set the field Soundx to the Soundex value for all the words in the Table IPUSQL. Below is a little snipet from one of my attempted queries.

USE WP1
GO

SELECT SOUNDEX(IPUSQL.WORD)

Much appreciate any thoughts.

Sincerely,

Lyle

jimf
Flowing Fount of Yak Knowledge

USA
2869 Posts

Posted - 05/21/2013 :  20:07:44  Show Profile  Reply with Quote
I think you just need
SELECT SOUNDEX(sql.WORD)
FROM IPUSQL sql

and

UPDATE IPUSQL
SET Soundx = SOUNDEX(Word)

Jim


Everyday I learn something that somebody else already knew
Go to Top of Page

lyleholc
Starting Member

USA
2 Posts

Posted - 05/21/2013 :  21:17:20  Show Profile  Reply with Quote
Hi Jim,

Cool, that worked!

Thank you so much!!

Lyle

UPDATE IPUSQL
SET Soundx = SOUNDEX(Word)
FROM IPUSQL
WHERE IPUSQL.ID = '4'
SELECT * FROM IPUSQL
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000