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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 updating a view

Author  Topic 

uniquegodwin
Starting Member

12 Posts

Posted - 2007-10-02 : 09:03:29
Hello everyone,
I'm using sqlserver 2005 with SQL management studio.I have a view and it has a problem.
The problem is that...SQL management studio automatically generated some sql script for me to update the view.But,it doesn't work.HELP ME please! This is the script it gave me...
-------------
UPDATE [skips].[dbo].[Schedule]
SET [ContractId] = <ContractId, int,>
,[DriverId] = <DriverId, int,>
,[TruckId] = <TruckId, int,>
,[Completed] = <Completed, bit,>
,[Day] = <Day, varchar,>
WHERE <Search Conditions,,>
--------------
When I try to execute it...I get this error ,
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '<'.

How do I make this work and update the view?
Thanks so much in advance

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-10-02 : 09:12:20
Type CTRL-SHIFT-M on your keyboard when you have the query window open, then proceed to populate the fields. The example is just a template.

Also, a word of caution. You may want to read up on things a bit more before making changes, especially if this is a production system.



Future guru in the making.
Go to Top of Page

tm
Posting Yak Master

160 Posts

Posted - 2007-10-02 : 09:34:54
Good thing to know using CTRL-SHIFT-M. Was manually changing the script from templates.
Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-10-02 : 09:42:07
Yep, it's handy and it is also on the QUERY menu "Specify template parameters" for those who prefer clicking.



Future guru in the making.
Go to Top of Page
   

- Advertisement -