× 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.


  • Subject: Re: Help on SQL Server 7 to AS/400 conversion on V4R4
  • From: Pete Hall <pbhall@xxxxxxxxxx>
  • Date: Sun, 26 Mar 2000 11:14:30 -0600

At 22:04 03/25/2000 , Kirk Goins wrote:
>  ALTER TABLE COPYLMS.ACTIVITYTYPE
>         ADD CONSTRAINT DF_ACTIVITYTYPE_OVERRIDECREDITCOMPANY_ID
>         WITH DEFAULT '0' FOR OVERRIDECREDITCOMPANY_ID,
>
>         ADD CONSTRAINT DF_ACTIVITYTYPE_OVERRIDECREDITLOCATION_ID
>         WITH DEFAULT '666' FOR OVERRIDECREDITLOCATION_ID,
>
>         ADD CONSTRAINT PK__ACTIVITYTYPE__69C6B1F5 PRIMARY KEY
>         (
>                 ACTIVITYTYPE_ID
>         ) WITH  FILLFACTOR = 90
>;
>
>The AS/400 is complaining about the WITH DEFAULT with error msg
>
>SQL0199  30    1486  Position 2 Keyword WITH not expected. Valid tokens:
>                      CHECK UNIQUE FOREIGN PRIMARY.
>
>According to the book I have...
>"DEFAULT is a constraint that determines which value is inserted into the
>column if no value is specified for the column on an insert"
>
>How do I do this on the AS/400??

If these are numeric columns (probably integer), try removing the 
apostrophes around the literal values. Their use indicates that the target 
column is alpha. You could also use one of the cast functions, but I 
wouldn't think that would be necessary. This is just a guess but the WITH 
DEFAULT clause is valid on the AS/400. What version of OS400 are you running?



>The AS/400 is complaining about the WITH FILLFACTOR with error msg
>
>SQL0199  30    1525  Position 4 Keyword WITH not expected. Valid tokens:
>ADD DROP ALTER.

<snip>

>Do I even care on the AS/400 about the FILLFACTOR parm ?

No you don't. Just delete WITH FILLFACTOR.
Pete Hall
pbhall@execpc.com
http://www.execpc.com/~pbhall
+---
| 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 ...

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.