Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NTZ?? what does this code mean?

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I ran across some code someone had done a while ago on my website and it has the following syntax:

sSQL = sSQL & NTZ(Session("LocationID"))


I haven't been able to look it up anywhere, and I haven't found where it has been declared a variable or a function anywhere.

it is used in the following context:

ElseIf Session("EditMode") = "New" Then
sSQL = "insert into employee (LocationID, FirstName, MiddleName, LastName, "
sSQL = sSQL & "Designation, Email, Priority) values ("
sSQL = sSQL & NTZ(Session("LocationID"))
sSQL = sSQL & ",'" & sFirstName & "' "

thanks.
How much more water would there be in the ocean if it weren't for sponges?
 
There's no listing of such a function for vbscript -- It may be some function of a custom library, but I doubt you can get much help around here for it. :-(
penny.gif
penny.gif
 
that's ok - if I know that it's not some kind of wierd vbScript thing, that in itself helps. How much more water would there be in the ocean if it weren't for sponges?
 
turns out that it was a programmatically defined function which was defined in another file that was server side included on the asp page that called it.

How much more water would there be in the ocean if it weren't for sponges?
 
I am going to guess that the NTZ based upon the name of the function takes a string, and if null returns zero..

and it probably looks something like:
function NTZ(value)
if not isNull(value) then ntz = value else ntz = 0
end function


Am I right?
 
hot diggity dog. you're right. how did you know that? Is it a standard name for a function that is commonly used? or maybe it came from an example somewhere? How much more water would there be in the ocean if it weren't for sponges?
 
Well for memory NZ does that
in SQL Server I think it is ..
probably where idea came from. codestorm
 
Yeah..


Transact SQL uses NV and Oracle SQL uses NVL.

NTZ looked like it stood for Null To Zero

.
.. Eat, think and be merry .
... ....................... .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top