If the situation is for a singular field, I have done a Case statement and applied whatever value I wanted to indicate a NULL

(case when table.field IS NULL
Then "NULL"
Else table.field
End case) as field_name

Thanks,

Steve


Steven Bennett
Manager, Applications Development

AIT Worldwide Logistics, Inc.
Chicago, Illinois, USA
Office: +1 (630)766-8300 / Ext: 6472
Fax: +1 (630) 250-3708
www.aitworldwide.com<http://www.aitworldwide.com/>


our people deliver.(r)

[cid:image001.png@01D84A6C.D5CA06A0]<http://www.facebook.com/aitworldwide> [cid:image002.png@01D84A6C.D5CA06A0] <http://www.linkedin.com/company/24870> [cid:image003.png@01D84A6C.D5CA06A0] <http://www.glassdoor.com/Overview/Working-at-AIT-Worldwide-Logistics-EI_IE31929.11,34.htm> [cid:image004.png@01D84A6C.D5CA06A0] <http://www.youtube.com/user/aitait701>

[cid:image005.jpg@01D84A6C.D5CA06A0]<http://fundraising.stjude.org/site/TR/Walk/Walk?team_id=223905&pg=team&fr_id=89696>


From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Robert Rogerson
Sent: Thursday, April 7, 2022 10:39 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Run SQL Scripts and saving NULL to Excel

CAUTION: This message originated externally, please use caution when clicking on links or opening attachments!

I tried Google and the IBM site but couldn't find an answer.

I run a query that results in NULL values. When I try to save the results
to a spreadsheet (using Save As on the context menu) the columns that
contained NULLs in the results show as blanks in the Excel spreadsheet.

I've tried changing the values for nulls in Edit->Preferences->Results Tab
to NULL, (NULL), <NULL> but these appear to only change what is displayed
on the results pane.

Does anyone know what needs to be changed so that when a NULL is
encountered in the results and then I save the results to Excel the NULL is
preserved (or at least not blank).

Any advise would be appreciated,

Thanks,

Rob
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l<https://lists.midrange.com/mailman/listinfo/midrange-l>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l<https://archive.midrange.com/midrange-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.

Help support midrange.com<http://midrange.com> by shopping at amazon.com<http://amazon.com> with our affiliate link: https://amazon.midrange.com<https://amazon.midrange.com>


**********************************************************************************************************************

This electronic message transmission contains information from AIT Worldwide Logistics, Inc. and is confidential
and/or legally privileged and shall remain the property of AIT Worldwide Logistics, its subsidiaries, affiliates
and parent companies. The information is intended only for the use by the designated person(s) named above. If you
are not the intended recipient, any disclosure, copying, distribution or use of or any other action or reliance based
on the contents of this information is strictly prohibited. If you received this electronic transmission in error,
please notify the sender listed above.

Global services provided by AIT Worldwide Logistics are subject to the applicable terms and conditions published at
http://www.aitworldwide.com/terms-and-conditions.

**********************************************************************************************************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.