Help with Insert statement

  • This is driving me crazy and I can't figure out why I get this message:

    Server: Msg 213, Level 16, State 5, Line 6

    Insert Error: Column name or number of supplied values does not match table definition.

    From this query:

    IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES

    WHERE TABLE_NAME = 'Curl')

    DROP TABLE Curl

    Create table Curl (access_time datetime, duration int)

    INSERT INTO Curl

    SELECT access_time, duration

    From Connections

    Where duration > 1

    I know it is some syntactical little problem but I am stumped. I know it has to do with the select statement under the insert. Ever have one of those days:) Please help!

  • need a "go" before teh insert.

    Steve Jones

    steve@dkranch.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply