if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_InviteFriends]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_InviteFriends]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[isap].[sp_InviteFriends]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [isap].[sp_InviteFriends]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_LoginTrack]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_LoginTrack]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[isap].[sp_LoginTrack]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [isap].[sp_LoginTrack]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_geInvitedFriends]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_geInvitedFriends]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[isap].[sp_geInvitedFriends]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [isap].[sp_geInvitedFriends]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DonateCustomer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DonateCustomer]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DonateDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DonateDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[InviteFriends]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[InviteFriends]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[IsapCredit]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[IsapCredit]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[IsapQueryCat]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[IsapQueryCat]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[KlceLive]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[KlceLive]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[KlceMonth]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[KlceMonth]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[KlcePrev]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[KlcePrev]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[LoginHistory]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[LoginHistory]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Temp2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Temp2]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[city]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[city]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detClassifieds]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detClassifieds]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberBlocked]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberBlocked]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberContacts]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberContacts]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberFriends]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberFriends]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberGuestbook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberGuestbook]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberInvitations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberInvitations]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberKrishak]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberKrishak]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberLekhak]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberLekhak]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberSpecializations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberSpecializations]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detMemberUdyojak]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detMemberUdyojak]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detNetworkMembers]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detNetworkMembers]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detNetworkMessages]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detNetworkMessages]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[detPrivateMessages]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[detPrivateMessages]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[employer_profile]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[employer_profile]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isapCategory]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isapCategory]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_Query]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_Query]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_bsb_reply]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_bsb_reply]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_bulletin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_bulletin]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_hindi_sections]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_hindi_sections]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_links]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_links]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_registration]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_registration]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_sections]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_sections]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isap_special_group]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[isap_special_group]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[job_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[job_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[job_sections]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[job_sections]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[job_subsections]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[job_subsections]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[krishak_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[krishak_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[lekhak_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[lekhak_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mstAdminUser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mstAdminUser]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mstEvents]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mstEvents]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mstMembers]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mstMembers]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mstNetworks]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mstNetworks]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[mstQueries]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[mstQueries]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[news_commodity_hindi]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[news_commodity_hindi]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[news_hindi]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[news_hindi]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ngo_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ngo_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[prasarak_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[prasarak_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[prmCategories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[prmCategories]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[prmCityState]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[prmCityState]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[prmClassifieds]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[prmClassifieds]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[prmQuerySubjects]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[prmQuerySubjects]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[prmSpecializations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[prmSpecializations]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[qual_specialisations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[qual_specialisations]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[qualifications]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[qualifications]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[resume_detail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[resume_detail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[resume_personal]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[resume_personal]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sanshodhak_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sanshodhak_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sudharak_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sudharak_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sysLastCounters]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[sysLastCounters]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Farmer_AgriImplements]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Farmer_AgriImplements]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Farmer_CropProblems]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Farmer_CropProblems]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Farmer_Insurance]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Farmer_Insurance]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Farmer_IrrigationType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Farmer_IrrigationType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Farmer_Landtype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Farmer_Landtype]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Farmer_OtherAssets]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Farmer_OtherAssets]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Farmer_OtherOccupations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Farmer_OtherOccupations]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_MemberCategories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_MemberCategories]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Member_Farmer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Member_Farmer]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Member_Organisation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Member_Organisation]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Organisation_Type]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Organisation_Type]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_Other_Assets]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_Other_Assets]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_agri_implements]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_agri_implements]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_crop_problems]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_crop_problems]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_education_field]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_education_field]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_education_level]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_education_level]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_employment_status]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_employment_status]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_family_occupations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_family_occupations]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_insurance]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_insurance]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_irrigation_types]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_irrigation_types]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_land_types]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_land_types]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_member_specialisation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_member_specialisation]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_specialisation_categories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_specialisation_categories]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbl_specialisations]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbl_specialisations]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[temp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[temp]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tempForEmail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tempForEmail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tempForEmailA]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tempForEmailA]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[temppassword]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[temppassword]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[udyojak_details]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[udyojak_details]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vw_FriendsOfFriendsALL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[vw_FriendsOfFriendsALL]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vw_MyFriends]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[vw_MyFriends]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vw_NetworkMsgsStatus]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[vw_NetworkMsgsStatus]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vw_NetworkUserStatus]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[vw_NetworkUserStatus]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vw_SearchExpertDetails]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[vw_SearchExpertDetails]
GO

CREATE TABLE [dbo].[DonateCustomer] (
	[OrderID] [int] NOT NULL ,
	[CustName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CustCompany] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CustAddress] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CustCity] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CustState] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CustCountry] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CustPhone] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CustEmail] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[DonateDetail] (
	[OrderID] [int] NOT NULL ,
	[ProductID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Vol_Don] [bit] NULL ,
	[Amount] [money] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[InviteFriends] (
	[FromMember] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ToMember] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[OnDate] [datetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[IsapCredit] (
	[ProductID] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[ProductName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Amount] [decimal](18, 0) NULL ,
	[AmountD] [decimal](18, 0) NULL ,
	[OrderBy] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[IsapQueryCat] (
	[group_code] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[group_name] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[KlceLive] (
	[month_code] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[current_entry] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[buy] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[sell] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[volume] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[pre_settle] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[today_open] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[high] [varchar] (53) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[low] [varchar] (53) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[today_date] [smalldatetime] NULL ,
	[update_time] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[prev_date] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[KlceMonth] (
	[month_code] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[month_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[KlcePrev] (
	[month_code] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[prev_settle] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[prev_date] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[LoginHistory] (
	[Month] [decimal](18, 0) NULL ,
	[Year] [decimal](18, 0) NULL ,
	[Counter] [decimal](18, 0) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Temp2] (
	[MyID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MyFriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendName] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[FriendsFriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsFriend] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsFriendUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[city] (
	[cit_code] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[cit_name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[sta_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detClassifieds] (
	[MessageID] [decimal](18, 0) IDENTITY (1, 1) NOT NULL ,
	[MemberID] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ClassifiedID] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Subject] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Message] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CreatedDate] [datetime] NULL ,
	[Status] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ExpireDate] [datetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberBlocked] (
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[BlockedMemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberContacts] (
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[ContactID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[ContactMemberID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Title] [varchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[LName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[NickName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmPhone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Mobile] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmFax] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmEmail] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmURL] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmStreet] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmState] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmCity] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmPostalCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[HmCountry] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Notes] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Interests] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[BirthDay] [datetime] NULL ,
	[CoName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoPhone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoFax] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoEmail] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoURL] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoStreet] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoCity] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoState] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoPostalCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CoCountry] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberFriends] (
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Status] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberGuestbook] (
	[MessageID] [decimal](18, 0) NOT NULL ,
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Message] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PostedByID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PostedOn] [datetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberInvitations] (
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[InviteEmail] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[InviteDate] [datetime] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberKrishak] (
	[memberid] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FarmArea] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FarmDesc] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FarmLocation] [nvarchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[SoilType] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Cropsgrown] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberLekhak] (
	[memberId] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[AreaofWriting] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberSpecializations] (
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[SpecID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detMemberUdyojak] (
	[memberid] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[IndustryName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Business] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[AnnualTurnover] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[businessProblem] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[detNetworkMembers] (
	[NetworkID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[JoiningDate] [datetime] NULL ,
	[IsActive] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detNetworkMessages] (
	[NtwMsgId] [decimal](18, 0) IDENTITY (1, 1) NOT NULL ,
	[NetworkID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Subject] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Message] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PostedBy] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PostedDate] [datetime] NULL ,
	[MainMsgID] [decimal](18, 0) NULL ,
	[Hits] [int] NULL ,
	[Status] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[detPrivateMessages] (
	[MessageID] [decimal](18, 0) NOT NULL ,
	[Subject] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Message] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ToMember] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FromMember] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MessageDate] [datetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[employer_profile] (
	[empl_code] [int] NULL ,
	[empl_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[cont_person] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[empl_email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[empl_address] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[empl_city] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[empl_country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[empl_profile] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[empl_pwd] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[profile_status] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[isapCategory] (
	[Cat_Code] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[Cat_Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Cat_EngName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_Query] (
	[id] [int] NULL ,
	[title] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[message] [varchar] (2000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[b_type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[com_grp_code] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_bsb_reply] (
	[email_from] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[com_grp_code] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_bulletin] (
	[id] [int] NULL ,
	[title] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[message] [varchar] (2000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[email] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[city] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[date] [smalldatetime] NULL ,
	[b_type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[com_grp_code] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_hindi_sections] (
	[section_id] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[section_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[display_flag] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_links] (
	[headline] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[country] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[link] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[email] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[link_id] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_registration] (
	[isap_code] [int] NOT NULL ,
	[cat_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[sex] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[date_of_birth] [smalldatetime] NULL ,
	[proffession] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[designation] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[organisation] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[cur_address] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[per_address] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[email] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[education1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[education2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[education3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[education4] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[education5] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[area_interest] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[area_expertise] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[membership1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[membership2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[membership3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[membership4] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[membership5] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[achievement1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[achievement2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[achievement3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[achievement4] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[achievement5] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_sections] (
	[section_id] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[section_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[display_flag] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[isap_special_group] (
	[group_code] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[group_name] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[job_details] (
	[job_code] [int] NULL ,
	[empl_code] [int] NULL ,
	[job_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job_desc] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[candidate_profile] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[qualification] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[exp_from] [tinyint] NULL ,
	[exp_to] [tinyint] NULL ,
	[salary] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job_section] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job_subsection] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job_location] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[reference] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[email] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[post_date] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[job_sections] (
	[section_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[section_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[job_subsections] (
	[sub_section_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[sub_section_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[krishak_details] (
	[isap_code] [int] NOT NULL ,
	[area] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[farm_desc] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[location] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[soil] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[crops] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[allied_one] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[allied_two] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[allied_three] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[lekhak_details] (
	[isap_code] [int] NULL ,
	[writing_for1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[writing_for2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[writing_for3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[writing_for4] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[writing_for5] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO


CREATE TABLE [dbo].[mstEvents] (
	[EventID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MemberId] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[EventName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[EventDate] [smalldatetime] NULL ,
	[EventTime] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Phone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Street] [varchar] (70) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[City] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[State] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PostalCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Particulars] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[URL] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Status] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Createddate] [datetime] NULL ,
	[isPending] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO


CREATE TABLE [dbo].[mstNetworks] (
	[NetworkID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ModeratorID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Particulars] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[NoOfMsgsHPG] [decimal](18, 0) NULL ,
	[ModerationReq] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[mstQueries] (
	[QueryID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[QueryDate] [datetime] NULL ,
	[Title] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[SubjID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Particulars] [varchar] (6000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PostedBy] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PosterEmail] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PosterCity] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PosterState] [varchar] (70) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PosterCountry] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Response] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Status] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ReferralDate] [datetime] NULL ,
	[ResponseDate] [datetime] NULL ,
	[Street] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Phone] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Crop] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[other] [nvarchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[QueryInHindi] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Keywords] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[news_commodity_hindi] (
	[new_code] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[com_grp_code] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[news_hindi] (
	[new_code] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[new_date] [smalldatetime] NULL ,
	[new_head_line] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[new_if_top] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[new_file_ref] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ngo_details] (
	[isap_code] [int] NULL ,
	[est_year] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[objective] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[area_activity] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[prasarak_details] (
	[isap_code] [int] NOT NULL ,
	[office] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[furniture] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[computer] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[phoneline] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[fax] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[amount] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[prmCategories] (
	[CategoryID] [nvarchar] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[CategoryName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PanelName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[prmCityState] (
	[City] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[State] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[prmClassifieds] (
	[ClassifiedID] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[ParentID] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[ClassifiedName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[DefaultStatus] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[prmQuerySubjects] (
	[SubjID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Subject] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[prmSpecializations] (
	[SpecID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[SpecName] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[qual_specialisations] (
	[qual_code] [smallint] NULL ,
	[spl_code] [smallint] NOT NULL ,
	[spl_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[qualifications] (
	[qual_code] [smallint] NOT NULL ,
	[qual_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[resume_detail] (
	[resume_code] [int] NULL ,
	[employer1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[employer2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[desig1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[desig2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job1_start] [char] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job1_end] [char] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job2_start] [char] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job2_end] [char] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job1_area] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job1_dept] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job2_area] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job2_dept] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job1_location] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[job2_location] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobdesc1] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobdesc2] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[totalyear] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[totalmonth] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[skills] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobarea1] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobdept1] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobarea2] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobdept2] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobarea3] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobdept3] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[jobdetail] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[location] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[salary] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[perks] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO


CREATE TABLE [dbo].[sanshodhak_details] (
	[isap_code] [int] NULL ,
	[focus1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[focus2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[focus3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[focus4] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[focus5] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[geo_area] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[sudharak_details] (
	[isap_code] [int] NOT NULL ,
	[panchayat] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[elected_date] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[location] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[help_one] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[help_two] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[sysLastCounters] (
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ContactID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[NetworkID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[SubjID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[QueryID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[EventID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Farmer_AgriImplements] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[agri_implement_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Farmer_CropProblems] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[crop_prob_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Farmer_Insurance] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[insurance_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Farmer_IrrigationType] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[irrigation_type_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Farmer_Landtype] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[land_type_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Farmer_OtherAssets] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[asset_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Farmer_OtherOccupations] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[occupation_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_MemberCategories] (
	[CategoryID] [nvarchar] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[CategoryName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[PanelName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Member_Farmer] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[Own_Land] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Leased_In_Land] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Leased_Out_Land] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Total_Land] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Cow_Indigenous] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Cow_CrossBred] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Buffalo] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Goat] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Poultry] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Pig] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Animal_Others] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Kharif_Crop1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Kharif_Crop2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Kharif_Crop3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Kharif_Area1] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Kharif_Area2] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Kharif_Area3] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Rabi_Crop1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Rabi_Crop2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Rabi_Crop3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Rabi_Area1] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Rabi_Area2] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Rabi_Area3] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Perennial_Crop1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Perennial_Crop2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Perennial_Crop3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Perennial_Area1] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Perennial_Area2] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Perennial_Area3] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ThirdSeason_Crop1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ThirdSeason_Crop2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ThirdSeason_Crop3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ThirdSeason_Area1] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ThirdSeason_Area2] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ThirdSeason_Area3] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Members_Adult] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Members_Children] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Members_Male] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Members_Female] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Income_Cash] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Income_Kind] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Asset_Land] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Asset_FD] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Asset_Jewellery] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Asset_Others] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Debt_Bank] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Debt_Coop] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Debt_Lenders] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Debt_SHGs] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Debt_Friends] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Farming_Problems] [varchar] (600) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Help_Sought] [varchar] (600) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Member_Organisation] (
	[MemberID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[OrgName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Mission] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Activities] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[GeoCoverage] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[EstYear] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[IncYear] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[RegdActs] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[SizeOfAsset] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Turnover] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Manpower] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Website] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Organisation_Type] (
	[org_type_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[org_type_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_Other_Assets] (
	[asset_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[asset_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_agri_implements] (
	[agri_implement_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[agri_implement_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_crop_problems] (
	[crop_prob_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[crop_prob_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_education_field] (
	[edu_field_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[edu_field_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_education_level] (
	[edu_level_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[edu_level_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_employment_status] (
	[emp_status_code] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[emp_status_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_family_occupations] (
	[occupation_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[occupation_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_insurance] (
	[insurance_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[insurance_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_irrigation_types] (
	[irrigation_type_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[irrigation_type_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_land_types] (
	[land_type_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[land_type_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_member_specialisation] (
	[MemberID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[spec_code] [smallint] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_specialisation_categories] (
	[spec_cat_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[spec_cat_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[order_by] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbl_specialisations] (
	[spec_cat_code] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[spec_code] [smallint] NOT NULL ,
	[spec_name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[temp] (
	[MyID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MyName] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MyFriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendName] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[FriendsFriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsFriend] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsFriendUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY]
GO




CREATE TABLE [dbo].[udyojak_details] (
	[isap_code] [int] NULL ,
	[bus_type] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[turnover] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[comments] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[vw_FriendsOfFriendsALL] (
	[MyID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MyName] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MyFriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendName] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MyFriendIsActive] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsFriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsFriend] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsFriendUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[MyStatus] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendStatus] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendFriendsIsActive] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[vw_MyFriends] (
	[MyID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendName] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[MyFriendUserName] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[Status] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[FriendsIsActive] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[vw_NetworkMsgsStatus] (
	[NetworkID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Msgs] [int] NULL ,
	[Pending] [int] NULL ,
	[Authorised] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[vw_NetworkUserStatus] (
	[NetworkID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Users] [int] NULL ,
	[Active] [int] NULL ,
	[InActive] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[vw_SearchExpertDetails] (
	[MemberID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[EName] [varchar] (112) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[CategoryName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Street] [varchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[City] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[State] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PostalCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Phone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PresentEmail] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[JoiningDate] [datetime] NULL ,
	[Gender] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Nationality] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Organisation] [varchar] (70) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Designation] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Qualification] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[ProfileText] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Fax] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[PermanentEmail] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[IndustryType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Payment] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE sp_InviteFriends 
@From varchar(10),
@To text
AS
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

setuser N'isap'
GO


CREATE PROCEDURE sp_InviteFriends 
@From varchar(10),
@To text
AS

Insert into inviteFriends (FromMember,ToMember,OnDate) 
values(@From ,@To,getdate())
return @@Rowcount

GO
setuser
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO


CREATE PROCEDURE sp_LoginTrack 
AS
Declare @Counter numeric
Declare @Month numeric
Declare @year numeric

Select @Month=Month(Getdate()),@Year=Year(Getdate())
Select @Counter=isnull(Counter,0)+1 from loginhistory 
where month=@month and year=@year

if @@RowCount>0 
update loginhistory set counter=counter+1 where month=@month and year=@year
else
insert into loginhistory (month,year,counter) values (@month,@year,1)
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

setuser N'isap'
GO


CREATE PROCEDURE sp_LoginTrack 
AS
Declare @Counter numeric
Declare @Month numeric
Declare @year numeric

Select @Month=Month(Getdate()),@Year=Year(Getdate())
Select @Counter=isnull(Counter,0)+1 from loginhistory 
where month=@month and year=@year

if @@RowCount>0 
update loginhistory set counter=counter+1 where month=@month and year=@year
else
insert into loginhistory (month,year,counter) values (@month,@year,1)

GO
setuser
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE sp_geInvitedFriends
 AS
Select Fname +'  ' + LName as [From Member] ,ToMember as [To] ,onDate as [Date] from invitefriends 
          left join mstmembers on frommember = [memberid] order by Fname,Lname
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

setuser N'isap'
GO


CREATE PROCEDURE sp_geInvitedFriends
 AS
Select Fname +'  ' + LName as [From Member] ,ToMember as [To] ,onDate as [Date] from invitefriends 
          left join mstmembers on frommember = [memberid] order by Fname,Lname

GO
setuser
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

