• Subject: Re: Date type L
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Mon, 29 Jun 1998 17:23:54 -0500

May I assume that your SQL looked something like:
CREATE TABLE QTEMP/DUH2 (DATEFIELD DATE NOT NULL WITH DEFAULT,
CHARFIELD CHAR (15) NOT NULL WITH DEFAULT)                    

Then what happened is the NOT NULL WITH DEFAULT.  This is a default on prompted 
SQL.

For example if I run:
INSERT INTO QTEMP/DUH2 (CHARFIELD) VALUES('spud')
SELECT * FROM DUH2
I'll get:
DATEFIELD  CHARFIELD
06/29/98   spud     

Try the following instead:
CREATE TABLE QTEMP/DUH2 (DATEFIELD DATE , CHARFIELD CHAR (15) NOT
NULL WITH DEFAULT)                                               
INSERT INTO QTEMP/DUH2 (CHARFIELD) VALUES('spud')
SELECT * FROM DUH2
I'll get:
DATEFIELD  CHARFIELD
-          spud     




venu_yamajala@goodyear.com on 06/29/98 05:17:39 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Subject:        Date type L

Hi All,

 I am doing some study on L type data values. I have created a test PF with 10
L data type fields. All 10 fields get different formats with different
separators. Now I tried to add data into the PF using SQL by INSERT statement.
I tried to add data into only one field (say Fld9 which is in ISO format). I
moved some value 2000-02-29. The record is added. But when I did a SELECT
statement, surprisingly I found data in all the other fields also. I didnot add
data into it. The otehr fields got current date as their values. This looked
something strange to me. I am not good at L type fields. So can anybody explain
me how this is possible and why it is happening like this?? Thx in advance.

Regards,
Venu
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.