DBA Studio question

From: Teresa Redmond <pixelmeow_at_aol.com>
Date: Thu, 04 Oct 2001 17:04:30 -0400
Message-ID: <f8jprtoc9b0ncqi9n9s8upvtt38q3j998o_at_4ax.com>



Hi, all:

I'm using DBA Studio to figure out the syntax for a SQL statement that I will be sending in via Java code and the thin driver. I'm seeing some really strange things happening...

One table, portal.cart, has 4 columns: pkey, udb_pkey, suid, and time_stamp. When I open the table data editor, I see all information in all columns. When I select "Show SQL" and type "select * from portal.cart", I only am shown 2 columns, pkey and udb_pkey. Every time it is only these two.

The problem is that I'm trying to use the timestamp to clear out records every half hour or so. I'm using this Java code:

"DELETE from cart, saved_data where to_date(cart.time_stamp, 'YYYY-MM-DD') < ? AND saved_data.cart_pkey = cart.pkey";

and getting the error SQL command not ended properly, so I started fiddling with it in DBA Studio. I'm using today's date instead of the ? that stmt.setTimestamp uses, and "select" instead of "delete", and have even tried only selecting the cart.time_stamp column. I get errors ranging from nullpointererror (-1), to invalid column name, to missing right parenthesis.

Then the craziness with missing columns in a select * statement.

Any ideas? (I'm very new to SQL, please bear with me... and have been reading everything I can find with no results...) Thanks in advance. :-)

-- 
Teresa Redmond
Associate Software Engineer
Anteon Corporation
tredmond_at_anteon.com
Received on Thu Oct 04 2001 - 23:04:30 CEST

Original text of this message