Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]How to MODIFY SQL Datetime field with null

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]How to MODIFY SQL Datetime field with null
 Login/Join
 
Member
posted
I need to reset a SQL datetime field (HYYMDm formart in WebFOCUS master file) to have null value by using WebFOCUS MODIFY FILE. Blanks, 0s and null will generate a format error. I can use SQL stored procedure to do that, but like to know how to use WebFOCUS MODIFY FILE to do this. Any help will be appreciated.

This message has been edited. Last edited by: <Emily McAllister>,
 
Posts: 1 | Registered: November 02, 2016Report This Post
Expert
posted Hide Post
Bear in mind that MODIFY will utilise the attributes within the synonym, so you need to ensure that the field within the synonym has the attribute MISSING=ON.

Also ensure that the column within the SQL table is nullable.

Alternatively, use SQL passthru to do the update, which would not use the synonym.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
If I understand your requirements correctly, you want to change a date-time field to null, for a relational table, using MODIFY.

And, you are following Tony's suggestion to have MISSING=ON in the synonym, and making sure the column is nullable in the table.

With that, you might now want to try setting the column to 'MISSING' in your MODIFY..
SET OFFLINE-FMT = STANDARD
SET NODATA = NULL
MODIFY FILE CAR_SALES
 FREEFORM MAKE MODEL
 COMPUTE LEASE_DATE = MISSING;
 MATCH MAKE MODEL
  ON NOMATCH REJECT
  ON MATCH UPDATE LEASE_DATE
 DATA
  FORD,FOCUS,$
END
-RUN
TABLE FILE CAR_SALES
PRINT *
END  
  MAKE        MODEL       PURCHASE_DATE            LEASE_DATE                   
  ----        -----       -------------            ----------                   
  FORD        FOCUS       2016/11/19 00:00:00.000  NULL                     

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]How to MODIFY SQL Datetime field with null

Copyright © 1996-2020 Information Builders