Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Where to put the brackets!

Author  Topic 

fuzzyjon
Starting Member

15 Posts

Posted - 2008-02-13 : 09:20:23
Hi there,

I am using the following statement but seem to be getting a Syntax Error. I think this is something to do witt the fact that I don't have brackets around the values. However, no matter where I try to put the brackets I seem to get an error!

Any help would be much appreciated!

Thanks,

Jon



INSERT INTO organisation_links (organisation_number_1,
organisation_number_2, relationship, amended_on, amended_by)
VALUES 2786, Select organisation_number, 'HEAD', '01/12/2007', 'Jon'
from organisations where organisation_number IN (143, 177)

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-02-13 : 09:22:38
INSERT INTO organisation_links (organisation_number_1,
organisation_number_2, relationship, amended_on, amended_by)
Select 2786,organisation_number, 'HEAD', '01/12/2007', 'Jon'
from organisations where organisation_number IN (143, 177)

Em
Go to Top of Page

fuzzyjon
Starting Member

15 Posts

Posted - 2008-02-13 : 09:27:17
Aah.... I get it now!!!

Cheers Em,

Jon
Go to Top of Page
   

- Advertisement -