mardi 23 juin 2015

SQL IF null Replace with other column data

Hi I'm really new at sql,

i want to replace a null column to other column data in the same table.

Declare @ref As mgr.gl_jlhdr.ref_no
Declare @P_no As mgr.gl_jlhdr.jlno
IF ref = Null
Then ref = P_no
end if

pls help

error The type name 'mgr.gl_jlhdr.ref_no' contains more than the maximum number of prefixes. The maximum is 1.

Aucun commentaire:

Enregistrer un commentaire