Now I'm confused Razzak. Are you saying you DON'T need the quotes in the
database designer screen or do?

David Blocker
[EMAIL PROTECTED]
781-784-1919
Fax: 781-784-1860
Cell: 339-206-0261
----- Original Message -----
From: "A. Razzak Memon" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, August 12, 2004 7:45 PM
Subject: [RBG7-L] - Re: Data Designer Default Dates


>
> Try the following code to create a new table and
> see what you get:
>
> -- start
> SET ERROR MESSAGE 2038 OFF
> DROP TAB ToTeachADB
> CREATE TABLE `ToTeachADB` +
> (`ReleaseDate` DATE DEFAULT 01/01/1900 NOT NULL +
> ('Value for column ReleaseDate cannot be null'), +
>   `Entry_Date` DATE DEFAULT 01/01/1900 NOT NULL +
> ('Value for column Entry_Date cannot be null'), +
>   `Up_Date`=(IFNULL(Up_Date,.#DATE,Up_Date)) DATE)
> SET ERROR MESSAGE 2038 ON
> RETURN
> -- end
>
> I used the exact same default values as well as
> the expression using Database Designer without
> any problem!
>
> Very Best R:egards,
>
> Razzak.
>
>
> At 11:43 PM 8/12/2004 +0100, Alastair Burr wrote:
>
> >Thanks, Razzak, that makes sense. However, it seems R:Base
> >will not accept quotes around a date value unless they are
> >put in manually.
> >
> >Part of my Create Table command was:
> >
> >  `ReleaseDate` DATE     DEFAULT '01/01/1900' NOT NULL  +
> >('Value for column ReleaseDate cannot be null') ,  +
> >  `Entry_Date`  DATE     DEFAULT '01/01/1900' NOT NULL  +
> >('Value for Entry_Date cannot be null.') ,  +
> >  `Up_Date`= (IFNULL(Up_Date, .#DATE, Up_Date)) DATE ,  +
> >
> >but the quotes around the default value seem to get lost.
> >
> >There does not seem to be a need to put default text in
> >quotes. Is that right or is that luck and quotes really
> >ought to be used ?
> >
> >----- Original Message -----
> >From: "A. Razzak Memon" <[EMAIL PROTECTED]>
> >To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
> >Sent: Thursday, August 12, 2004 10:38 PM
> >Subject: [RBG7-L] - Re: Data Designer Default Dates
> >
> >
> > >
> > > At 10:59 AM 8/12/2004 +0100, Alastair Burr wrote:
> > >
> > > >Having removed the old default, created the table again and by using
> >single
> > > >quotes around the default date values ('01/01/1900') everything now
> >appears
> > > >to be working.
> > > >
> > > >I still don't understand what's happening, however, because I had to
put
> >the
> > > >quotes around the default date values manually after running the
create
> > > >table command - they seem to get stripped out somehow - and without
them
> >the
> > > >default dates are not inserted but with them they are!
> > >
> > > Here's the reason why you have to put quotes around
> > > the dates:
> > >
> > > You could NOT put a date literal in an expression
> > > (like SET VAR v1 DATE = ('01/31/2004' + 1)) without
> > > putting the quotes around the date. This is to let
> > > R:BASE know that you are not putting in a math
> > > expression with 1 divided by 31 divided by 2004.
> > >
> > > That should help you understand the reason.
> > >
> > > Very Best R:egards,
> > >
> > > Razzak.
> > >
>
>

Reply via email to