Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2005, 02:25 AM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default Compare retrieved records

HI, i have a problem, i have 2 tables

tbl_IssueToTempB (input from user)
ToNo PartNo Qty VerifyBy
123 987 500 1
123 987 500 1
123 345 800 1
123 345 800 1

tbl_IssueTo (table to be compare)
TONo PartNo Qty
123 987 1000
123 678 1000
123 345 2000

i tried the code below but i cant get the PartNo tat dint match! during user fire an event, i check a ToNo for every different partNo. If one of the record dont match, i need to show user which partNo is not match, if every partNo in tat ToNo is match, i'll let them to proceed. can any1 guide me through tis? i stuck on tis problem for 4 days alrd!!!

StrSql="select Tbl_IssueTo.partNo,Tbl_IssueToTempB.qty from Tbl_IssueTo Left Outer join " & _
                 "(select partno,sum(qty) qty from Tbl_IssueToTempB where verifyBy=@verify And ToNo=@toNo group by partNo) " & _
                 "Tbl_IssueToTempB on " & _
                 "Tbl_IssueTo.partNo = Tbl_IssueToTempB.partNo where " & _
                 "Tbl_IssueTo.qty = Tbl_IssueToTempB.qty"
        
             ObjCmd=New SqlCommand(StrSql, ObjConn)
                With ObjCmd.Parameters:
                    .Add(New SqlParameter("@verify", Session("User_ID")))
               .Add(New SqlParameter("@ToNo", tbToNo.Text))
                End With

             ObjCmd.Connection.Open()
             ObjReader=ObjCmd.ExecuteReader()
             while objReader.Read=true
                Response.Write(ObjReader.item("Qty"))
                Response.Write(ObjReader.item("PartNo") & "<br />")
             end while
             ObjClose()
 
Old April 10th, 2005, 08:33 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default

hi.. any1 can guide me on tis..? any advice? any1.. im alone here..

 
Old April 11th, 2005, 08:32 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default

Thanks guys, just solved it. Sorry for the ignorance.

Regards
life's Ng






Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare records between two tables jaaboston Access VBA 1 December 21st, 2006 05:35 AM
compare these date fields and compare and get the susanring Oracle 1 July 24th, 2006 04:58 PM
Format Retrieved Records phungleon Classic ASP Databases 4 November 29th, 2004 12:39 PM
sorting retrieved data don baroo Classic ASP Basics 2 November 23rd, 2004 08:31 AM
have to hyperlink the data retrieved ractim ADO.NET 21 August 27th, 2004 09:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.