Hi guys. I'm writing a Java program using MS SQL.
Here is my SQL Code for one table:
CREATE TABLE a00753665_Items(Item_Sku VARCHAR(20), Description VARCHAR(80), Price FLOAT, Discount FLOAT, PRIMARY KEY(Item_Sku))
INSERT INTO %s VALUES('%s', '%s', '%.2f', '%.2f')", ITEM_TABLE_NAME, item.getProductNumber(), item.getDescription(), item.getPrice(), item.getDiscount())
This is the data that should be getting inserted:
Tassimo T46 Home Brewing System
43-0439-6
179.99
0.30
Moto Precise Fit Rear Wiper Blade
0210919
799
0.0
Easton Stealth Reflex Composite Hockey Stick
83-4567-0
89.99
0.5
Yardworks 4-Ton Log Splitter
60-3823-0
399.99
0
The table is created fine. But the inserts are giving me that error.
Data is taken from an Item object with these variables:
private String productNumber;
private String description;
private double price;
private double salePrice;
Any help is appreciated...My brain is tired..I think I just need someone else to take a look at it.
Thanks
After reading my post, I figured it out...I transposed the first and second columns of data....
Thanks guys!@

New Topic/Question
Reply



MultiQuote


|