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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a NULL Value as a PARAMETER in a SQL Pass Thru

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
I have SEVERAL parameters in a FEX which calls a Microsoft SQL Stored Procedure.

Some of these parameters may need to be NULL.
I have tried pass NULL to a DATE type of receiving parameter, but I get an error.

How can I assign a NULL VALUE to a DEFAULT PARAMETER(S)?


Thanks,

Leo ;-)
 
What is HEXBYTE?

Where are the User Written Subroutines?


Thanks,

Leo ;-)
 
Sorry, its HEXBYT. Its definition depends somewhat on your platform. The following is from the Webfocus Online Language Reference for the desktop Developer's Studio.

HEXBYT translates an integer between 0 and 255 (base 10) into the corresponding ASCII character. You can use HEXBYT to produce characters that are not on your keyboard. The syntax is

HEXBYT (number, outfield)

where:

Argument Format Description
number Numeric A number between 0 and 255. The number is truncated to an integer. If the integer is greater than 255, the subroutine divides the integer by 256 and uses the remainder for this argument.
outfield A1 The name of the output field, or the format of the output value. If you supply the format, enclose it in single quotation marks (’).
The following request displays the names and salaries of employees and uses HEXBYT to enclose the names of employees earning less than $12,000 a year in brackets. Note that the ASCII codes for the left and right bracket are 91 and 93, respectively.

DEFINE FILE EMPLOYEE
BRACK/A17 = HEXBYT (91, 'A1')||LAST_NAME||HEXBYT (93, 'A1');
BNAME/A17 = IF CURR_SAL LT 12000 THEN BRACK ELSE LAST_NAME;

END
TABLE FILE EMPLOYEE
PRINT BNAME CURR_SAL BY EMP_ID
END

The user written subroutines are included with every version of Focus I know about, but the manual may be sold separately.
 
This won't work since the tables I am accessing via the Stored Procedure exist in a MS SQL environment.

Thanks,

Leo ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top