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.
Author |
Topic |
cpwynn
Starting Member
2 Posts |
Posted - 2006-07-06 : 14:16:03
|
Heres my procedure:CREATE PROCEDURE dbo.zzBlock @fileName varchar (255), @data intASINSERT INTO dbo.ZZHLPDocInformation (docInfoBlocked)VALUES (@data)WHERE (docInfoDocFilename = @fileName)GOI want to insert a variable (@data) into the docInfoBlocked column, where the filename is @filename.... I get a syntax error near WHERE.... any suggestions???? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-07-06 : 14:20:00
|
Perhaps what you want is an update:UPDATE dbo.ZZHLPDocInformationSET docInfoBlocked = @dataWHERE docInfoDocFilename = @fileNameTara Kizeraka tduggan |
|
|
cpwynn
Starting Member
2 Posts |
Posted - 2006-07-06 : 15:01:18
|
Thanks!!!! works like a charm... one more question... what do i do since its the column accepts the 'bit' datatype... i either want the value to be 1 or null??? how do i input a null value for @data???? (NOTE: im using ASP) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-07-06 : 15:02:56
|
If the column is bit, then you need to define @data as bit. If you want @data to be NULL, then pass in a NULL from your application. But maybe I don't understand your question.Tara Kizeraka tduggan |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|