LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 25 Jan 2002 15:33:23 -0800
Reply-To:   Sigurd Wilson Hermansen <hermans1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sigurd Wilson Hermansen <hermans1@WESTAT.COM>
Organization:   http://groups.google.com/
Subject:   Re: Insert into a proc sql/ sql server
Content-Type:   text/plain; charset=ISO-8859-1

Not sure where you found this syntax for a SQL INSERT... I would expect to see something along the lines of INSERT INTO <table1> SELECT a,c,b FROM <table2> ... The SQL INSERT appends new rows to a table. The SQL UPDATE replaces values in specific columns of a table (and often includes conditions).

Sig

"Jon Bodfish" <jbodfish@urrea.org> wrote in message news:<5ba13f8cab3acf616c304eadee934b02.63760@mygate.mailgate.org>... > Hello, > > Unfortunately, I am experiencing some trouble when loading SAS data from > proc sql into a SQL Server (SQL 2000) table. After submitting the > statements listed below my log states the following: "[ODBC SQL Server > Driver][SQL Server]Cannot insert explicit value for identity column in > table 't_PAT_patients' when IDENTITY_INSERT is set to OFF" > > > libname a odbc dsn=TestBase; > > proc sql; > insert into a.t_PAT_Patients (PAT_RACE) > select PAT_RACE from WWDPat; > > > > But PAT_RACE is not an identity column in t_PAT_Patients. However, if I > upload the SAS dataset to a junk table in SQL server, then run the same > insert either from proc dbload or direcly in SQL then I do not > experience any problems. > > > Thanks for you help in advance.


Back to: Top of message | Previous page | Main SAS-L page