Forum Replies Created

Viewing 15 posts - 8,251 through 8,265 (of 13,469 total)

  • RE: Returing Tables filled from a query inside a Function

    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...

  • RE: need help about procedure

    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...

  • RE: need help about procedure

    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...

  • RE: Upper/lower case text

    sc-w (1/4/2011)


    I nearly missed that post, i tried the following but it generates an error. Any thoughts?

    update dbo.wce_contact set firstname = dbo.ProperCase(firstname)

    Error:

    Msg 1014, Level 15, State 1, Line 1

    TOP clause...

  • RE: sp procedure error

    spelling error.

    select statement gets SubmitTime,

    but the update statement is using SubmittedTime

  • RE: Upper/lower case text

    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...

  • RE: Upper/lower case text

    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...

  • RE: CLR to do a HTTPS Push to SMS Gateway

    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...

  • RE: Audit of sa logon

    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...

  • RE: Locking of Tables

    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...

  • RE: Locking of Tables

    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...

  • RE: remove all description

    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,...

  • RE: remove all description

    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...

  • RE: sql quotes help

    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

  • RE: stored procedure for paging table

    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...

Viewing 15 posts - 8,251 through 8,265 (of 13,469 total)