I am developing one desktop application using vb.net 2008 and Microsoft SQL Server 2005. I need a help for fetching the data from database between a given range.
the date field in my table is of type VARCHAR(25) and the date format stored is dd-mm-yyyy. when I using the between clause in the SQL query then it is not giving all the data every time i.e. the date criteria in where clause is not working fine.
while my clients requirement is to keep the date format as dd-mm-yyyy and fetch the data according to the given range.
I search on the forum and found many queries to fetch the data by converting or type casting the date field within sql query but nothing worked.
so please help me out with that what shoud I do in this case.
The table structure that I am using is as follows
/****** Object: Table [dbo].[tblTransaction] Script Date: 05/17/2011 21:49:11 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE [dbo].[tblTransaction](
[Tid] [int] IDENTITY(1,1) NOT NULL,
[Dataid] [int] NOT NULL,
[Vouch_type] [int] NULL,
[Dr_ac_name] [varchar](50) NULL,
View Complete Post