Dreamweaver rs SQL format question

I have sql code from access that I want to use in my record set in Dreamweaver.

This works in Microsoft Access:
SELECT Administrator_VhStock.[NO], Replace(IIf([Administrator_VhStock]![TRIM] Is Null,[Administrator_VhStock]![note],[Administrator_VhStock]![TRIM]+"  "+[Administrator_VhStock]![note]),Chr(13) & Chr(10),"</br>") AS totnote
FROM Administrator_VhStock;

I get an error when using this sql in a Dreamweaver record set.
[SQL Anywhere]Syntax error near '!' on line 1
Mark DrelingerMISAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
What kind of database is the web site using?
Mark DrelingerMISAuthor Commented:
sql anywhere
MlandaTCommented:
Access allows ! to seperate the table and column name. SQL Anywhere uses the period (.)
SQL Anywhere also does not have an IIF function
I'm not sure about the REPLACE and the Chr(13) and Chr(10)
Try this:
SELECT 
	Administrator_VhStock.[NO], 
	Replace(
		CASE [Administrator_VhStock].[TRIM] 
			WHEN Null THEN [Administrator_VhStock].[note]
			ELSE [Administrator_VhStock].[TRIM]+'  '+[Administrator_VhStock].[note]
		END
	),Chr(13) & Chr(10),'</br>') AS totnote
FROM Administrator_VhStock;

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark DrelingerMISAuthor Commented:
Thanks very much. I also learned that Char instead of Chr for SQL Anywhere.
I really appreciate your help.
mark
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.