ASP.NET - How to write stored procedure with loop passing form asp.net
Asked By bhanupratap singh on 26-Nov-12 06:37 AM
I have two table
1. Consignment
2. Delivery
I need to check data into consignment. If record exist in consignment table then I need to check this very record into delivery table. if Record matches with consignmnet table with delivery datable, then ok. If record does not matches then all columns from consignmnet(first table) table of that record should come out and bind it to gridivew.
thanks
Check this procedure it does not full fill my need
ALTER procedure [dbo].[sp_SelectOutStandingggg]
(
@CODE_NAME varchar(40)
,@TOO varchar(40)
,@sdate DATE
,@edate DATE
)
as
begin
select cn.CODE_NAME as Booking_Branch,cn.CNMT,cn.TOO,cn.CNDT,cn.GOODS,cn.TOTAL,cn.NOPKG,cn.CWGHT,cn.DC,cn.PVTMARKA
from CONSIGNMENT as cn
join DELIVERY as dlv
on cn.CODE_NAME+cn.CNMT<>dlv.CODE_NAME+dlv.CNMT
where cn.CODE_NAME=@CODE_NAME and TOO=@TOO and (CNDT BETWEEN @sdate AND @edate) order by cn.CODE_NAME
end
Robbe Morris replied to bhanupratap singh on 26-Nov-12 09:10 AM
This explains the different index configurations a SQL Server table can have Any typical SQL Server table can consist of these following index configurations: 1
This explains how (in which order) the SQL Server stores the records in the table. Most of us assume the records are stored in the order as they were entered
Hi guys, Does any one know how I can write date from an excel spreadsheet into an sql server table? Any help would be appreciated. Thanks. Hi Dennis, One way of copying the data from an Excel spreadsheet to a SQL Server table is with the use of Import / Export utility of SQL Server. Go to
Hi All, I want to transfer data from excel sheet to a table in sql server 2005. All the columns in excel sheet are same as column in my table but
This explains the best scenarios to create CLUSTERED index on the table in SQL Server. Following are the scenarios which work good by having a CLUSTERED index on the table
Hi All, I am loading one .csv file data into sql server table using ssis dataflow task. after loading data one column row value is appending into another
This explains the maximum number of columns allowed for keys (Primary, index and foreign keys) in SQL Server. SQL Server imposes a maximum allowed number of columns for creation of keys and here
SQL Server Specification Limits – Maximum bytes allowed for the Keys in SQL Server SQL Server This explains the maximum size in bytes that is allowed for keys (Primary, index and foreign keys) in SQL Server. SQL Server imposes a maximum allowed size for creation of keys and here is the
This explains about the SSIS in SQL Server. To begin with SSIS stands for SQL Server Integration Services , a new platform fo r DTS (Data Transformation Services ). In Real World scenario
how to import data from excel file into the SQL server Use DTS or SSIS You can use the SQL Server Data Transformation Services (DTS) Import Wizard or the SQL Server Import and Export Wizard to