![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Wed, Apr 30 2008 12:45 AM | Permanent Link |
Richard Harding | Tim,
I have recently upgraded from v1.08 to v1.09b3. The last column is no longer appending the CAST(Number AS VARCHAR) portion to the TestID1 column. It was working in v1.08. CREATE TABLE "Test" ( "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1) NOT NULL, "Number" INTEGER NOT NULL, "Category" VARCHAR(3) COLLATE "ANSI" NOT NULL, "TestID1" VARCHAR(10) COLLATE "ANSI" COMPUTED ALWAYS AS Category || '/' || CAST(Number AS VARCHAR) ) "ID","Number","Category","TestID1" 1,1,"AAA","AAA/" 2,2,"bbb","bbb/" This is where I get into a problem with the Version Mismatch errors if I roll back to v1.08. ------------------ Richard Harding Windella Computer Knowhow 28 Freeman Drive Lochinvar NSW 2321 Phone: 61 2 4930 7336 Mobile: 0419 016 032 email: rharding@wck.com.au |
Wed, Apr 30 2008 4:16 AM | Permanent Link |
Uli Becker | Richard,
> "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1) NOT NULL, > "Number" INTEGER NOT NULL, > "Category" VARCHAR(3) COLLATE "ANSI" NOT NULL, > "TestID1" VARCHAR(10) COLLATE "ANSI" COMPUTED ALWAYS AS Category || '/' || CAST(Number AS > VARCHAR) > ) I cannot say why the computed value isn't returned rorrectly (Tim has to clarify this), but if you replace COMPUTED ALWAYS AS Category || '/' || CAST(Number AS by GENERATED ALWAYS AS Category || '/' || CAST(Number AS it works fine. Regards Uli |
Wed, Apr 30 2008 10:50 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Richard,
<< I have recently upgraded from v1.08 to v1.09b3. The last column is no longer appending the CAST(Number AS VARCHAR) portion to the TestID1 column. It was working in v1.08. >> It's a length issue. The workaround is to define the column as such: CREATE TABLE "Test" ( "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1) NOT NULL, "Number" INTEGER NOT NULL, "Category" VARCHAR(3) COLLATE "ANSI" NOT NULL, "TestID1" VARCHAR(10) COLLATE "ANSI" COMPUTED ALWAYS AS CAST(Category || '/' || CAST(Number AS VARCHAR) AS VARCHAR(10)) ) -- Tim Young Elevate Software www.elevatesoft.com |
Thu, May 1 2008 3:45 AM | Permanent Link |
Richard Harding | Thanks Tim & Uli,
CASTing the expression to VARCHAR(10) did not make a difference -ie CAST(Category ||'/' || CAST(Number AS VARCHAR) AS VARCHAR(10)). Using GENERATE instead of COMPUTE gives the expected result. Thank you . . . . . Richard Harding |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |