i want to print out default value to 0 if the field is NULL with this sql
<cfquery name="q_file_info" datasource="mydns">
select nvl(html_files,'0') as html_files, nvl(pdf_files,'0') as pdf_files
from file_info
</cfquery>
<cfoutput>
HTML files : #q_file_info.html_files#
PDF files: #q_file_info.pdf_files#
</cfoutput>
how come it doesn't work? they still output nothing (blank) for both html and pdf files, instead of 0. is there another way to default NULL value? thank you so much.
<cfquery name="q_file_info" datasource="mydns">
select nvl(html_files,'0') as html_files, nvl(pdf_files,'0') as pdf_files
from file_info
</cfquery>
<cfoutput>
HTML files : #q_file_info.html_files#
PDF files: #q_file_info.pdf_files#
</cfoutput>
how come it doesn't work? they still output nothing (blank) for both html and pdf files, instead of 0. is there another way to default NULL value? thank you so much.