Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This site is like first coffee in the winter morning..."

Geography

Where in the world do Tek-Tips members come from?

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

LeonelSanchezJr (Programmer)
30 Oct 03 12:18
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   

kiddpete (MIS)
30 Oct 03 13:05
Try using HEXBYTE. See the User Written Subroutines.
LeonelSanchezJr (Programmer)
30 Oct 03 14:06
What is HEXBYTE?

Where are the User Written Subroutines?

Thanks,

Leo   

kiddpete (MIS)
30 Oct 03 15:25
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.
LeonelSanchezJr (Programmer)
4 Nov 03 12:22
This won't work since the tables I am accessing via the Stored Procedure exist in a MS SQL environment.

Thanks,

Leo   

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close