yeah that might be a good idea.

but,
You could always use String.Format("T:{0}-{1:3}",Date.Now.Year.ToString
().Substring(2,2)
, SomeSQLRowcountFunction(student_details) )

this i what i wanted maybe i can work with something like this.

thanks guys :) sry if you couldn't understand what i wanted anyway i got a
clue how to do it thanks :)

2009/11/18 Raghupathi Kamuni <[email protected]>

> May be you have to maintain the Registration numbers in another table
> say....
>
> CREATE
> TABLE [dbo].[Registration](
> [Year] [int] NOT NULL,
> [RegistrationNumber] [int] NOT NULL
> )
>
> Based on the year, you have to autoincrement RegistrationNumber.
>
> While inserting Student_Details generate the Student_ID from
> RegistrationNumber
>
> Hope that helps !
>
> On Tue, Nov 17, 2009 at 4:06 PM, nu1silva <[email protected]> wrote:
>
>> hi all,
>>
>> im developing a Student Management software and im just going through
>> the registration of a student.
>>
>> i need to assign the registration number -->  T(year)-(# of
>> registration for the year) so it'll be like
>> T09-001 or T09-089 or T09-243 an so on....
>>
>> i get the input of the year and can count the number from the
>> database.
>>
>> how can i get the registration number?
>>
>> the sample o the Student Database...
>>
>> CREATE TABLE Student_Details
>> (
>>        Student_ID varchar(10) NOT NULL UNIQUE,                 -- example
>> ( T09-001 )
>>        Fname varchar(255),
>>        Lname varchar(255),
>>        Full_Name varchar(255),
>>     --
>>        Address varchar(255),
>>        DOB datetime,
>>        ContactNO varchar(15),
>>        email varchar(25),
>>        additional_detail varchar(255),
>>        Course_ID varchar(10),
>>        Dateof_Admission datetime,
>>        --Dateof_Graduation datetime,
>>        PRIMARY KEY(Student_ID)
>> )
>>
>>
>> help!!! :(
>>
>
>


-- 
Thank You,
Best Regards,

Nuwan S. Silva
170, St. Anthony's Road,
Moratumulla, Moratuwa,
Sri Lanka.
Mobile  : +94 779 804 543
email    : [email protected]

Reply via email to