SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 How to get unique value from DB
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Arunavally
Yak Posting Veteran

India
58 Posts

Posted - 10/19/2013 :  06:53:10  Show Profile  Reply with Quote
Hai,
I have maintained batch table

This field have

Stu_Id(Primary Key) BatchId (Not Primary key)
STU0001 APR042013
STU0002 APR062013
STU0003 APR042013


In form_load i want to load batch id frm DB to Combo Box. But i want to only one set of Id allow in combo box. That means..

In 1st row BatchId is APR042013
In 3rd row BatchId is APR042013 (Same)

But i want to display one Id (APR042013)instead of these two. and also 2nd row Id.

Kindly help me sir.

Thanks in advance
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30277 Posts

Posted - 10/19/2013 :  12:23:09  Show Profile  Visit SwePeso's Homepage  Reply with Quote
SELECT DISTINCT BatchID FROM dbo.Table1



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

Arunavally
Yak Posting Veteran

India
58 Posts

Posted - 10/21/2013 :  00:55:55  Show Profile  Reply with Quote
Thank you.
quote:
Originally posted by SwePeso

SELECT DISTINCT BatchID FROM dbo.Table1



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000