Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT INTO syntax

Status
Not open for further replies.

dquintard

Programmer
Apr 2, 2003
6
0
0
US
Can anyone tell me what can possibly be wrong with this INSERT statement? I can not seem to get it to work.
It is part of an embedded SQL script. It follows the necessary CREATE TABLE and ALTER TABLE statements.



sql:="CREATE TABLE table1 ("
sql:=cat(sql,"id char(4) CONSTRAINT pkcl_temp1_id PRIMARY KEY CLUSTERED (id),")
sql:=cat(sql,"c_f CHAR(255),vc_f VARCHAR(255),")
sql:=cat(sql,"dt_f DATETIME,sd_f SMALLDATETIME,")
sql:=cat(sql,"d_f DECIMAL(12,2), n_f NUMERIC(12,2), b_f bit)")

sql:="ALTER TABLE table1 ADD f_f FLOAT NULL, r_f REAL NULL, "
sql:=cat(sql,"i_f int NULL, si_f smallint NULL, ti_f tinyint NULL, ")
sql:=cat(sql,"m_f MONEY NULL, sm_f SMALLMONEY NULL")

>>>>> sql:="INSERT INTO table1 VALUES ('0001','','',"
sql:=cat(sql,"'2/29/2004 4:33PM','20000301 6:25',")
sql:=cat(sql,"'2147483647','21474836.46','1','2147483647','2147483647',")
sql:=cat(sql,&quot;'2147483647','32767','255','$2147483647', '$214748.3646')&quot;) <<<<<<<<<
 
Do you get an error message and if so, can you post it ? Missy Ed - Bolton, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top