Columns double when running a simple select table

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Columns double when running a simple select table

Wesley Newswanger

I am running into a weird problem with Squirrel snapshot 20170214_2214 causing my columns to double in my Pervasive database.

 

If I run a simple Select * from query on a table it adds a whole set of duplicate columns. The duplicate columns do not show in the query. After this happens I get the following error when attempting to link in MS Access – ‘Cannot define field more than once’. Squirrel shows the column names twice.

 

Here is an example of table schema from Pervasive before and after running a query.

 

/* ==========================================

* TABLE: INVENTORY_COST

* ========================================== */

CREATE TABLE "INVENTORY_COST"(

"PART" CHAR(20),

"LOCN" CHAR(2),

"COST" NUMERIC(16,6),

"MATL" NUMERIC(16,6),

"LABOR" NUMERIC(16,6),

"OVHD" NUMERIC(16,6),

"OUTS" NUMERIC(16,6),

"FREIGHT" NUMERIC(16,6),

"OTH" NUMERIC(16,6),

"CHG_DATE" DATE,

"CHG_TIME" TIME,

"CHG_BY" CHAR(8),

"CHG_PGM" CHAR(8),

"FILLER" CHAR(30));

 

CREATE UNIQUE NOT MODIFIABLE INDEX "INVENTORY_COSTK00" USING 0 ON "INVENTORY_COST"("PART", "LOCN");

 

 

/* ==========================================

* TABLE: INVENTORY_COST

* ========================================== */

CREATE TABLE "INVENTORY_COST"(

"PART" CHAR(20),

"LOCN" CHAR(2),

"COST" NUMERIC(16,6),

"MATL" NUMERIC(16,6),

"LABOR" NUMERIC(16,6),

"OVHD" NUMERIC(16,6),

"OUTS" NUMERIC(16,6),

"FREIGHT" NUMERIC(16,6),

"OTH" NUMERIC(16,6),

"CHG_DATE" DATE,

"CHG_TIME" TIME,

"CHG_BY" CHAR(8),

"CHG_PGM" CHAR(8),

"FILLER" CHAR(30),

"column0" CHAR(20),

"column1" CHAR(2),

"column2" NUMERIC(16,6),

"column3" NUMERIC(16,6),

"column4" NUMERIC(16,6),

"column5" NUMERIC(16,6),

"column6" NUMERIC(16,6),

"column7" NUMERIC(16,6),

"column8" NUMERIC(16,6),

"column9" DATE,

"column10" TIME,

"column11" CHAR(8),

"column12" CHAR(8),

"column13" CHAR(30));

 

CREATE UNIQUE NOT MODIFIABLE INDEX "INVENTORY_COSTK00" USING 0 ON "INVENTORY_COST"("PART", "LOCN");

 

Best Regards,

Wesley S. Newswanger    IT & Database Administrator

Keystone Collections
Office:  866.881.6680    ext. 1028
Email:    [hidden email]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Columns double when running a simple select table

John Hardin
On Fri, 3 Mar 2017, Wesley Newswanger wrote:

> If I run a simple Select * from query on a table it adds a whole set of duplicate columns.

> Here is an example of table schema from Pervasive before and after running a query.

{snip}

Just to be clear about what you're saying: running a SELECT query in
Squirrel causes the table schema in the database to be modified?


--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  [hidden email]    FALaholic #11174     pgpk -a [hidden email]
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   Taking my gun away because I *might* shoot someone is like cutting
   my tongue out because I *might* yell "Fire!" in a crowded theater.
                                                   -- Peter Venetoklis
-----------------------------------------------------------------------
  10 days until Albert Einstein's 138th Birthday

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Columns double when running a simple select table

Wesley Newswanger
In reply to this post by Wesley Newswanger

It appears to have something to do with viewing and possible sorting on the table columns tab. Switching from one table to another with the columns tab open sometimes causes all the column data to be shown twice.

 

How this gets back into my Pervasive schema is something I have not been able to duplicate consistently. Sometimes it happens, but most times the schema is unchanged. I wish I could figure out a way to duplicate it consistently.

 

I restarted Squirrel and cannot get it to corrupt the tables. I am going to dig into it further on my end. We did just do a major software update and possibly they had something wrong in there update process.

 

Best Regards,

Wesley S. Newswanger    IT & Database Administrator

Keystone Collections
Office:  866.881.6680    ext. 1028
Email:   
[hidden email]

From: Wesley Newswanger
Sent: Friday, March 03, 2017 9:47 AM
To: '[hidden email]' <[hidden email]>
Subject: Columns double when running a simple select table

 

I am running into a weird problem with Squirrel snapshot 20170214_2214 causing my columns to double in my Pervasive database.

 

If I run a simple Select * from query on a table it adds a whole set of duplicate columns. The duplicate columns do not show in the query. After this happens I get the following error when attempting to link in MS Access – ‘Cannot define field more than once’. Squirrel shows the column names twice.

 

Here is an example of table schema from Pervasive before and after running a query.

 

/* ==========================================

* TABLE: INVENTORY_COST

* ========================================== */

CREATE TABLE "INVENTORY_COST"(

"PART" CHAR(20),

"LOCN" CHAR(2),

"COST" NUMERIC(16,6),

"MATL" NUMERIC(16,6),

"LABOR" NUMERIC(16,6),

"OVHD" NUMERIC(16,6),

"OUTS" NUMERIC(16,6),

"FREIGHT" NUMERIC(16,6),

"OTH" NUMERIC(16,6),

"CHG_DATE" DATE,

"CHG_TIME" TIME,

"CHG_BY" CHAR(8),

"CHG_PGM" CHAR(8),

"FILLER" CHAR(30));

 

CREATE UNIQUE NOT MODIFIABLE INDEX "INVENTORY_COSTK00" USING 0 ON "INVENTORY_COST"("PART", "LOCN");

 

 

/* ==========================================

* TABLE: INVENTORY_COST

* ========================================== */

CREATE TABLE "INVENTORY_COST"(

"PART" CHAR(20),

"LOCN" CHAR(2),

"COST" NUMERIC(16,6),

"MATL" NUMERIC(16,6),

"LABOR" NUMERIC(16,6),

"OVHD" NUMERIC(16,6),

"OUTS" NUMERIC(16,6),

"FREIGHT" NUMERIC(16,6),

"OTH" NUMERIC(16,6),

"CHG_DATE" DATE,

"CHG_TIME" TIME,

"CHG_BY" CHAR(8),

"CHG_PGM" CHAR(8),

"FILLER" CHAR(30),

"column0" CHAR(20),

"column1" CHAR(2),

"column2" NUMERIC(16,6),

"column3" NUMERIC(16,6),

"column4" NUMERIC(16,6),

"column5" NUMERIC(16,6),

"column6" NUMERIC(16,6),

"column7" NUMERIC(16,6),

"column8" NUMERIC(16,6),

"column9" DATE,

"column10" TIME,

"column11" CHAR(8),

"column12" CHAR(8),

"column13" CHAR(30));

 

CREATE UNIQUE NOT MODIFIABLE INDEX "INVENTORY_COSTK00" USING 0 ON "INVENTORY_COST"("PART", "LOCN");

 

Best Regards,

Wesley S. Newswanger    IT & Database Administrator

Keystone Collections
Office:  866.881.6680    ext. 1028
Email:    [hidden email]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Loading...