dbTalk Databases Forums  

How To Script

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss How To Script in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian
 
Posts: n/a

Default How To Script - 06-06-2007 , 11:05 AM






I need to update a value in IMA_GLInvAcctNbr from 11283 to 11500. the table
name is dbo.item. What would my script look like to do this in SQL server
2005? The column has a silver key by it too in SQL Server Management
Studio.



Thanks



Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: How To Script - 06-06-2007 , 04:32 PM






Brian (b.houghtby (AT) eaglecrusher (DOT) com) writes:
Quote:
I need to update a value in IMA_GLInvAcctNbr from 11283 to 11500. the
table name is dbo.item. What would my script look like to do this in
SQL server 2005? The column has a silver key by it too in SQL Server
Management Studio.
UPDATE dbo.item
SET IMA_GLInvAcctNbr = 11500
WHERE IMA_GLInvAcctNbr = 11283


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #3  
Old   
Brian
 
Posts: n/a

Default Re: How To Script - 06-07-2007 , 08:51 AM



What does the silver key mean?

"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote

Quote:
Brian (b.houghtby (AT) eaglecrusher (DOT) com) writes:
I need to update a value in IMA_GLInvAcctNbr from 11283 to 11500. the
table name is dbo.item. What would my script look like to do this in
SQL server 2005? The column has a silver key by it too in SQL Server
Management Studio.

UPDATE dbo.item
SET IMA_GLInvAcctNbr = 11500
WHERE IMA_GLInvAcctNbr = 11283


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #4  
Old   
Jason Lepack
 
Posts: n/a

Default Re: How To Script - 06-07-2007 , 10:03 AM



Quote:
What does the silver key mean?
It means that it is in a foreign key relationship to another table.

On Jun 7, 9:51 am, "Brian" <b.hough... (AT) eaglecrusher (DOT) com> wrote:
Quote:
"Erland Sommarskog" <esq... (AT) sommarskog (DOT) se> wrote in message

news:Xns9947EFB6764B9Yazorman (AT) 127 (DOT) 0.0.1...



Brian (b.hough... (AT) eaglecrusher (DOT) com) writes:
I need to update a value in IMA_GLInvAcctNbr from 11283 to 11500. the
table name is dbo.item. What would my script look like to do this in
SQL server 2005? The column has a silver key by it too in SQL Server
Management Studio.

UPDATE dbo.item
SET IMA_GLInvAcctNbr = 11500
WHERE IMA_GLInvAcctNbr = 11283

--
Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ownloads/books...
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ns/books.mspx- Hide quoted text -

- Show quoted text -



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.