Business objects and parameters within single quotes?

Hi,

 

After a while staying away I've taken the plunge back into V9 and working through some "familiarization" issues.  

 

One stumbling block that I'm  wondering if anyone can help quickly with is...

 

I'm trying to create a business object that allows a free text search.  I know there are alternative methods (SP's to populate a temporary table, scripted BO's etc, .NET integration) but if possible I'd like to keep it as simple as possible.

 

If I introduce a parameter to a business objects query, it's picked up fine if it is outside of single quotes. I.e.. The following works fine:

 

SELECT Name FROM Customer WHERE Town = @Town

 

However, if I want to run a free text search, the parameter is ignored in the designer ( I haven't tried it during runtime yet) due to the TSQL's syntax of requiring the parameter inside single quotes...

 

SELECT CUSTOMER.eFolderId, eFolderName, eStageName, FullName, Company, Town
FROM CUSTOMER JOIN CUSTOMER_CATALOG ON (CUSTOMER.eFolderId = CUSTOMER_CATALOG.eFolderId)
WHERE CONTAINS(index_text, 'FORMSOF(INFLECTIONAL, @pQuery )')

 

Can anyone tell me if this is possible or do I need to delve into alternative methods?

 

Cheers,

 

Paul.

 

Tagged:

Comments

  • Actually ignore this question - the second example whilst reflective of what I need isn't valid SQL and I expect the engine is replacing the variables as SQL server would using  @p1, @p2 type syntax rather than using standard find/replace functionality...

     

    Cheers,

     

    Paul.