Hi I'm hoping an expert can help me.
I moved an Access database to SQL, fine. However one of the SQL queries now fails. Works frin with the JET 4.0 SQL but not SQL Server. I think it needs to be broken into more than one step but not sure how to go about it. The statement is:
SELECT replace(pSection,select sectionName from sections where sectionID=pSection), pName
FROM products
WHERE pID='PWBTZ1';
the pID is usuall a variable passed as part of the ASP wrapped around the database but in this case I've provided a hard example.
Obviously in SQL the replace function needs 3 parameters but it wont except the embedded Select.
Any ideas how best to proceed??
Reece
I moved an Access database to SQL, fine. However one of the SQL queries now fails. Works frin with the JET 4.0 SQL but not SQL Server. I think it needs to be broken into more than one step but not sure how to go about it. The statement is:
SELECT replace(pSection,select sectionName from sections where sectionID=pSection), pName
FROM products
WHERE pID='PWBTZ1';
the pID is usuall a variable passed as part of the ASP wrapped around the database but in this case I've provided a hard example.
Obviously in SQL the replace function needs 3 parameters but it wont except the embedded Select.
Any ideas how best to proceed??
Reece