+ Reply to Thread
Results 1 to 3 of 3

Create Table (SQL)

  1. #1
    Registered User
    Join Date
    06-27-2014
    Location
    boston usa
    MS-Off Ver
    2000
    Posts
    2

    Create Table (SQL)

    I execute this query to create a table but I get few errors and I can not see were the mistake is can some one please take a look @ the script
    Thank you
    errors
    Msg 102, Level 15, State 1, Line 31
    Incorrect syntax near 'PLU_Number_Inventory_Prices'.

    when I del that like I get the same error from the next line?

    CREATE TABLE IMPORT_SCAN1
    (
    "Row_ID" INT NOT NULL,
    "PLU_Number_INVENTORY" VARCHAR(14) NOT NULL,
    "Alternate_PLU" VARCHAR(14) NULL DEFAULT NULL,
    "Case_PLU" VARCHAR(14) NULL DEFAULT NULL,
    "Plu_Description" VARCHAR(20) NULL DEFAULT NULL,
    "Long_Description" VARCHAR(80) NULL DEFAULT NULL,
    "Size" VARCHAR(5) NULL DEFAULT NULL,
    "UOM" VARCHAR(2) NULL DEFAULT NULL,
    "Brand_Number" INT NULL DEFAULT '0',
    "Department_Number" SMALLINT NULL DEFAULT '0',
    "Subdepartment_Number" VARCHAR(5) NULL DEFAULT NULL,
    "Family_Number" SMALLINT NULL DEFAULT '0',
    "Scale_Usage" TINYINT NULL DEFAULT '0',
    "FoodStamps" BIT NULL DEFAULT '0',
    "WIC" BIT NULL DEFAULT '0',
    "WIC_FV" BIT NULL DEFAULT '0',
    "WIC_Food_Group" INT NULL DEFAULT '0',
    "Kit" BIT NULL DEFAULT NULL,
    "FoodServiceItem" BIT NULL DEFAULT NULL,
    "Store_Number" INT NULL DEFAULT NULL,
    "Plu_Number_INVENTORY_HISTORY" VARCHAR(14) NOT NULL,
    "Qty_Sold" DECIMAL(18,2) NULL DEFAULT NULL,
    "Sales" DECIMAL(18,2) NULL DEFAULT NULL,
    "Costs" DECIMAL(18,2) NULL DEFAULT NULL,
    "Date" DATE NULL DEFAULT NULL,
    "Month" INT NULL DEFAULT NULL,
    "Qty_Received" DECIMAL(18,2) NULL DEFAULT NULL,
    "Qty_Adjusted" DECIMAL(18,2) NULL DEFAULT NULL
    "PLU_Number_Inventory_Prices" VARCHAR(14) NOT NULL,
    "Pack_Size" SMALLINT NULL DEFAULT '1',
    "Case_Cost" DECIMAL(18,4) NULL DEFAULT '0',
    "Margin" DECIMAL(18,4) NULL DEFAULT '0',
    "Markup" DECIMAL(18,4) NULL DEFAULT '0',
    "Multiplier" TINYINT NULL DEFAULT '1',
    "Price" DECIMAL(18,2) NULL DEFAULT '0',
    "Formula_Number" SMALLINT NULL DEFAULT '0',
    "Sale_Multiplier" TINYINT NULL DEFAULT NULL,
    "Sale_Price" DECIMAL(18,2) NULL DEFAULT NULL,
    "Sale_Limit" SMALLINT NULL DEFAULT NULL,
    "Sale_Card_Needed" BIT NULL DEFAULT NULL,
    "Sale_Starts" NCHAR(10) NULL DEFAULT NULL,
    "Sale_Ends" NCHAR(10) NULL DEFAULT NULL,
    "Sale_Formula_Number" SMALLINT NULL DEFAULT NULL,
    "Sale_First_Date" DATETIME NULL DEFAULT NULL,
    "Sale_Last_Date" DATETIME NULL DEFAULT NULL,
    "Sale_Days" INT NULL DEFAULT NULL
    "PLU_Number_Inventory_Taxes" VARCHAR(14) NOT NULL,
    "Tax_Zone" INT NULL DEFAULT '1',
    "Tax_1_Number" INT NULL DEFAULT '0',
    "Tax_2_Number" INT NULL DEFAULT '0',
    "Tax_3_Number" INT NULL DEFAULT '0'
    )

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Create Table (SQL)

    There should be a comma at the end of this line:
    "Qty_Adjusted" DECIMAL(18,2) NULL DEFAULT NULL

  3. #3
    Registered User
    Join Date
    06-27-2014
    Location
    boston usa
    MS-Off Ver
    2000
    Posts
    2

    Re: Create Table (SQL)

    Thank you Kyle123
    I looked and looked
    thank you for taking the time

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Create a macro to create a pivot table in a worksheet
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2015, 10:53 AM
  2. Replies: 2
    Last Post: 04-16-2013, 06:17 AM
  3. Replies: 0
    Last Post: 09-01-2011, 12:07 PM
  4. Create a new table from the main table when user press Enter button
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2010, 05:08 AM
  5. Replies: 3
    Last Post: 04-15-2009, 11:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1