× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'll give that a shot, but since this a sample set of tables for a class...
I got's to work with what they give me...




On Thu, Jul 29, 2010 at 8:05 AM, <rob@xxxxxxxxx> wrote:

-- The SET OPTION statement is only allowed in REXX, in a precompiled
program, or in SQL routines. In a precompiled program, it must be the
first
SQL statement in the program.


http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/topic/db2/rbafzsoption.htm

See if you can play with it to get this to work
set option datsep='/';
insert into qtemp/kirk values('1999/11/11');

But me, I'd start using the ISO standard '-' instead.


Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Kirk Goins <kirkgoins@xxxxxxxxx>
To: Midrange-L <midrange-l@xxxxxxxxxxxx>
Date: 07/28/2010 01:06 AM
Subject: SQL Newbie Question about Dates
Sent by: midrange-l-bounces@xxxxxxxxxxxx



I'm just getting started with taking a web based Intro to SQL class (Not
IBM
i Specific ). I'm using a V6R1 system to practice on. They gave us some
sample code to create a couple of small tables along with a set of INSERTs
to run to populate them. Everything was fine until the INSERT with a DATE
column. It appears not to like the '/' in the dates

where this fails
INSERT INTO Orders (CustomerID, PlanID, OrderDate, CancelationDate)
Values (1, 'D1002', '1999/11/11', NULL);

and this works
INSERT INTO Orders (CustomerID, PlanID, OrderDate, CancelationDate)
Values (1, 'D1002', '1999-11-11', NULL);

Is there a way to tell the system to use '/' instead of '-' ina DATE
field?

Thanks

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


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





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.