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 2012 Forums
 Transact-SQL (2012)
 Help

Author  Topic 

eltonyau
Starting Member

1 Post

Posted - 2014-03-29 : 05:43:33
Can anyone tell me what this code means? super new to sql and i dont know how to decipher this code


CREATE proc [dbo].[uspStore]
@uType varchar(50)=null,
@Officeid bigint=null,
@SupplyId bigint=null,
@DF2 bigint=null,
@df8 bigint=null,
@ItemID varchar(1000)=null,
@SuppliedValue varchar(1000)=null,
@ReceivedQty varchar(1000)=null,
@Reason varchar(1000)=null,
@Message varchar(2000)=null,
@DF4 varchar(50) =Null,
@DF5 varchar(50) =Null,
@PgName varchar(100)=Null,
@ClsName varchar(100)=Null,
@FnName varchar(100)=Null,
@IssueId bigint=null,
@AvailablebalanceInStock varchar(200)=null,
@Qty varchar(200)=null,
@ReturnId bigint=null,
@ReturnExchangeId bigint=null,
@ReturnedQty varchar(200)=null,
@SupplierId bigint=null,
@DistributorId bigint=null,
@FinYear varchar(200)=null,
@TenderId bigint =null,
@IsApproved smallint=null,
@RateId varchar(200)=null,
@TenderIdStr varchar(100)=null,
@AgreementId varchar(100)=null,
@FinancialYear varchar(10)=null,
@ConsigneeId bigint=null,
@OrderId bigint=null,
@StrTenderItemRateId varchar(100)=null,
@strQtyAnnual varchar(100)=null,
@strQtyOrder varchar(100)=null,
@strLots varchar(100)=null ,
@SupplierIdStr varchar(100)=null,
@SupplyType varchar(10)=null,
@ChalanNo varchar(500)=null,
@BillDate varchar(50)=null,
@BillID bigint=null
as
begin

if @uType='ShowWordReport'
Begin

Select T287001 as ID,T287003 as Name,T287002 as Type from T287 where T287DF7=1 and T287005=@Officeid
End

else if @uType='bindSupplyDetails'

Begin
select T234002 as ItemCode,T234003 as ItemName,T234010 as StrengthSpecific,T234013 as Form,T234004 as unit,T286004 as batchno,CONVERT(varchar,T286005,105) as mfgdate,
CONVERT(varchar, T286006,105) as expirydate,T286010 as brandname,T286007 qtysuppliedunit,(T286009*T286007) as Amt,T286001 as SupplyitemDetail from T234 inner join T286 on T286003= T234001
and T286002=@SupplyId inner join T285 on T285001=T286002 where ISNULL(T285009,0)=@IsApproved

end

What does the T_ _ _ _ _ _ mean?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-03-29 : 10:00:20
quote:
What does the T_ _ _ _ _ _ mean

that is the column name from table T287 or T234 or T286

you can find out more about that table using sp_help. Example

exec sp_help T287



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -