Answered
ListRest Function in SQL
Hello,
I have a table with a file name like mainstreet_233232. Now I have another column in the same table as listing number. I want to replace the existing value of the listing number with the numbers in the file name. Here is my query
<cfquery name="getMLSNum" datasource="reo">
SELECT *
FROM disclosures
Where active = '1'
AND mlsNUM = '30456910'
</cfquery>
<cfoutput query="getMLSNum">
<cfquery name="updDisclosure" datasource="reo">
Update disclosures
set mlsNum = '#ListRest(GetMLSNum.file_name, "_")#'
Where RowID ='#getMLSNum.ROWID#'
AND mlsNum = '30456910'
</cfquery>
</cfoutput>
I am getting an error of "Invalid position in list"
Please help.
Thanks
I have a table with a file name like mainstreet_233232. Now I have another column in the same table as listing number. I want to replace the existing value of the listing number with the numbers in the file name. Here is my query
<cfquery name="getMLSNum" datasource="reo">
SELECT *
FROM disclosures
Where active = '1'
AND mlsNUM = '30456910'
</cfquery>
<cfoutput query="getMLSNum">
<cfquery name="updDisclosure" datasource="reo">
Update disclosures
set mlsNum = '#ListRest(GetMLSNum.file_name, "_")#'
Where RowID ='#getMLSNum.ROWID#'
AND mlsNum = '30456910'
</cfquery>
</cfoutput>
I am getting an error of "Invalid position in list"
Please help.
Thanks