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)
 String + : in store procedure?

Author  Topic 

ndl
Starting Member

4 Posts

Posted - 2008-02-08 : 13:12:23
I am curious what is a string with : in a store procedure means? For example, Get_Invoice:, Any_string: etc.

Thanks,

ndl

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-08 : 13:14:54
can you provide an example of where you saw this. I dont think there is any special meaning for it.
Go to Top of Page

ndl
Starting Member

4 Posts

Posted - 2008-02-08 : 13:25:28
Thanks for quick reply.

Like this below:

Calculate_Unapplied_Per_Payment:

SET @UNAPPLD_CASH = (@TRNS_AMT + ISNULL(@TOT_CR_APPLD_AMT, 0)) -
(ISNULL(@TOT_APPLD_AMT, 0) + ISNULL(@TOT_ADJ_AMT, 0) + ISNULL(@WOFF_TOTAL, 0))


Insert_Per_Payment:

-- INSERT UNAPPLIED CASH PAYMENT INTO TEMP TABLE --
-- DON'T REPORT IF UN-APPLIED CASH = ZERO --
IF ISNULL(@UNAPPLD_CASH, 0) <> 0
INSERT INTO @VAR_INVC_TABLE
VALUES (@COMP, @CUST, @PROCESS_LEVEL, @PROCLEVL_NAME, @BATCH_NBR, @TRNS_TYPE, @INVC, 0,
@GL_DATE, @PMNT_SEQ, @APP_SEQ, @TRNS_AMT, @UNAPPLD_CASH * (-1),
ISNULL(@LST_PARTIAL_AMT, 0), @LST_PARTIAL_DATE, @FUTURE, @APPLIED)


Reset_Per_Payment:
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-08 : 13:36:25
quote:
Originally posted by ndl

Thanks for quick reply.

Like this below:

Calculate_Unapplied_Per_Payment:

SET @UNAPPLD_CASH = (@TRNS_AMT + ISNULL(@TOT_CR_APPLD_AMT, 0)) -
(ISNULL(@TOT_APPLD_AMT, 0) + ISNULL(@TOT_ADJ_AMT, 0) + ISNULL(@WOFF_TOTAL, 0))


Insert_Per_Payment:

-- INSERT UNAPPLIED CASH PAYMENT INTO TEMP TABLE --
-- DON'T REPORT IF UN-APPLIED CASH = ZERO --
IF ISNULL(@UNAPPLD_CASH, 0) <> 0
INSERT INTO @VAR_INVC_TABLE
VALUES (@COMP, @CUST, @PROCESS_LEVEL, @PROCLEVL_NAME, @BATCH_NBR, @TRNS_TYPE, @INVC, 0,
@GL_DATE, @PMNT_SEQ, @APP_SEQ, @TRNS_AMT, @UNAPPLD_CASH * (-1),
ISNULL(@LST_PARTIAL_AMT, 0), @LST_PARTIAL_DATE, @FUTURE, @APPLIED)


Reset_Per_Payment:



Ok. i think they are labels. You can serach for GOTO statements in your procedure which references them. You can use GOTO label to skip some statements and jump the control of execution to another batch. : indicates the end of label name.
see the definition of goto

[url]http://doc.ddart.net/mssql/sql70/ga-gz_3.htm[/url]
Go to Top of Page

ndl
Starting Member

4 Posts

Posted - 2008-02-08 : 13:49:32
Thanks visakh16.
Go to Top of Page
   

- Advertisement -