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
Moto Precise Fit Rear Wiper Blade
Easton Stealth Reflex Composite Hockey Stick
Yardworks 4-Ton Log Splitter
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.
After reading my post, I figured it out...I transposed the first and second columns of data....