Viewing 15 posts - 8,251 through 8,265 (of 13,469 total)
the short answer is because functions in SQL are different than functions in a programming language...they pretty much have to return data, and cannot change/update data.
because dynamic SQL could potentially...
January 4, 2011 at 12:43 pm
also, this is just incorrect...maybe a copy paste error?
@email is declared as a nvarchar(50), but you seem to be assigning it the results of a boolean...
January 4, 2011 at 12:38 pm
i copied and pasted your code into SSMS, and your syntax errors all seem to revolve around two issues: every CREATE PROC... statement must be in it's own batch...adding a...
January 4, 2011 at 12:35 pm
sc-w (1/4/2011)
update dbo.wce_contact set firstname = dbo.ProperCase(firstname)
Error:
Msg 1014, Level 15, State 1, Line 1
TOP clause...
January 4, 2011 at 12:13 pm
spelling error.
select statement gets SubmitTime,
but the update statement is using SubmittedTime
January 4, 2011 at 8:34 am
sc-w (1/4/2011)
Thanks for both the replies.I really like that function. How do i declare @OriginalText to be an actual field that alread exists?
Thanks again.
I should have added that to my...
January 4, 2011 at 8:12 am
this is the ProperCase function I use; it's from a post by Jeff Moden, i believe, harvested long long ago.
you can search for "ProperCase" or "InitCaps" here on SSC and...
January 4, 2011 at 6:07 am
why via the web interface of some provider? all the providers i know support email to sms, which is easier to do from SQL server; the problem is you have...
January 4, 2011 at 5:12 am
just tested this, and it works fine, assuming you have dbmail setup with a profile;
--DROP TRIGGER [TR_Logon_Trigger_Track_sa] ON ALL SERVER
GO
CREATE TRIGGER TR_Logon_Trigger_Track_sa
ON ALL SERVER FOR LOGON
AS
BEGIN
--the auditing...
January 3, 2011 at 1:21 pm
i would update it to an arbitrary number so that SQL's locking mechanism locks the row, then complete the work:
BEGIN TRANSACTION
DECLARE @iCnt As BigInt
SELECT @iCnt = Counter
FROM CR_CONTROL
--arbitrary update to...
January 3, 2011 at 9:45 am
you could tackle it it two ways.
since you KNOW you are going to update the table to teh next counter value (unless the transaction rolls back) update the table to...
January 3, 2011 at 8:39 am
GilaMonster (1/3/2011)
I'm exceedingly curious why he wants to remove them all. No good reason usually for that and unless i missed it no reason given in initial post.
re-reading the post,...
January 3, 2011 at 7:42 am
putting in all those descriptions was incredibly time intensive for someone to do...and you want to delete them because they bother you, not because of a business reason.
You should check...
January 3, 2011 at 6:39 am
instead of quotes, you could use the builtin QUOTENAME function to get brackets, which would still be syntactically correct:
SELECT 'EXEC sp_helpdb ' + QUOTENAME(name) + ' FROM sys.tables
January 1, 2011 at 11:58 am
well, adding two optional parameters to your proc, i'd suggest something like this:
ALTER PROCEDURE [dbo].[sp_listcategoryproducts]
@dolar float,
@katid int,
@sayfano int,
--used to set group size of paging
@BatchSize int = 10,
--used to decide which...
December 29, 2010 at 12:28 pm
Viewing 15 posts - 8,251 through 8,265 (of 13,469 total)