Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Friends,

I am having a requirement of storing unique code as coupon code in an table.
I have already valid till and used/un-used category in the same table.
Now the data is in huge size and for pushing the new data or retrieving data for verification, it takes time.

Can anyone help in table structure of the same, what I am using currently is correct or not.

Existing Table Structure
C#
Column	Type	Length	
Date	datetime	8	
MOBILE_FROM	varchar	15	- Used from which mobile
SMS	varchar	150	- SMS Syntax to use the coupon
Received_On	datetime	8	- SMS Received on
Category	varchar	20	- Offer Type
Coupon No	varchar	20	
Status	varchar	5	- Used or Not
Product Id	varchar	20	- Used against which product
Valid_Till	datetime	8	
Last_Updated	datetime	8	- latest updated
Mapp_1	varchar	30	- Incharge 1
Mapp_2	varchar	30	- Incharge 2
Mapp_3	varchar	30	- Incharge 3
Posted
Updated 26-Jan-16 19:56pm
v2
Comments
deepankarbhatnagar 27-Jan-16 1:25am    
Show your table with datatypes first.
Arunprasath Natarajan 27-Jan-16 1:57am    
Added the table structure. Primary key is Coupon No. Which is aplhanumeric and will have 20char by default.
deepankarbhatnagar 27-Jan-16 2:00am    
Good, so what is your requirement then
Arunprasath Natarajan 27-Jan-16 2:20am    
This is what i am having. But when the size of table grows, then for retrieving the data it takes time. Should i need to have some other table.
deepankarbhatnagar 27-Jan-16 2:28am    
Your retrieve query might have some problem too..

1 solution

 
Share this answer
 
Comments
Arunprasath Natarajan 27-Jan-16 1:27am    
This is very useful and thanks.
But this is for single insert like booking portal. But I need help in getting the details of offer code which is already in the table.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900