Viewing 5 posts - 1 through 5 (of 5 total)
Hi
Thanks a lot R. Brush.
You are simply great. The query worked as required.
August 6, 2013 at 12:02 am
Hi Thanks for the reply.
Yes. from the query we need to remove 'and'.
The column datetime1 in both the table is of type datetime.
The values which are present are like '2013-02-04...
July 29, 2013 at 10:16 pm
Hi,
Thanks for all your replies. Here is the query worked as required.
select t.cardno ,dateadd(dd, -datediff(dd, t.datetime1, 1), 1) AS date,
(select SUBSTRING(CONVERT(varchar, min(st.datetime1), 100), 13, 2) + ':' + ...
July 29, 2013 at 2:32 am
Hi,
Thanks for the reply.
However, the select query gives the results as min of dateime1 and max of datetime1. The o/p which I want is like
cardno, date, intime, outtime
1111, 04-02-2013, 08:45,...
July 28, 2013 at 10:33 pm
Thanks for the reply.
Here is the sql
CREATE TABLE table1(
[CARDNO] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DateTime1] [datetime] NULL,
[CHANNEL_NO] [smallint] NULL
) ON [PRIMARY]
CREATE TABLE table2(
[CARDNO] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DateTime1] [datetime] NOT NULL,
[action] [nchar](5)...
July 25, 2013 at 10:30 pm
Viewing 5 posts - 1 through 5 (of 5 total)