Viewing 15 posts - 31 through 45 (of 216 total)
Hi David ,
Above query u given is working only in case of a table contain all duplicate records..
But if there are some records which are disstinct it will not work...
I have slightly...
March 13, 2007 at 9:57 am
Hi ,
Try this solution.........
select clientid , min(date_in) ,
case when max(isnull(date_out,GETDATE()))= getdate()
THEN NULL
ELSE max(date_out)
END [MAX_DATE]
from client
group by clientid
Regards
March 13, 2007 at 9:15 am
Hi ,
Use the following query!! It's working..
SELECT a.e_id,a.name,a.address,
(case when datepart(qq,dt)=1 then sum(salary) else 0 end) QT_1 ,
(case when datepart(qq,dt)=2 then sum(salary) else 0 end) QT_2 ,
(case when datepart(qq,dt)=3 then sum(salary)...
March 8, 2007 at 9:44 am
Hi ,
use a replace function where u r populating the data into table.. e.x..
Select Replace('abc''nhju','''','''''') or
remove the apostrophee..from name
Select Replace('abc''nhju','''','')
Regards ,
Amit Gupta..
March 8, 2007 at 9:03 am
Hi ,
The columns u have used in the query r not valid.
Please verify. The column names u have used..
Regards,
Amit Gupta..
March 8, 2007 at 8:57 am
Hi ,
Can u send the sample data to me.. so that i can check my logic..
Anyway as per ur requirement i can send u a script which is given below...
March 8, 2007 at 8:06 am
It is a data length problem.. the field in which ur inserting the data has less size difined..
Please check the values which ur inserting..
Regards ,
Amit Gupta..
March 8, 2007 at 7:56 am
Hi ,
Try this script . it will solve ur problem..
select * from tab_a
union
select distinct j.* from (
select distinct z.b,k.name from(
select * from (
select a.i_d,count(*) b from (
select * from...
March 8, 2007 at 7:53 am
Hi ,
David first you have to see the format of record_date for e.g.
MY Record_Dtae field which contain a date value like "20070308' so iwill use the query like :
select
March 8, 2007 at 4:49 am
Hi,
But as per given requirement it is working fine...
Regards
Amit
March 6, 2007 at 9:47 am
Hi ,
Try This.. Its working..
select * from full_name1 a ,
full_name2 b
where soundex(a.col_1)=soundex(b.col_1)
Regards ,
Amit G.
March 6, 2007 at 4:45 am
Hi ,
Try This....Its working
select txtPriorCarrier,count(*) a from(
select * from PreviousCarrierForBA
union all
select * from PreviousCarrierForwc)a
group by txtPriorCarrier
order by 2 desc
Regards,
Amit G.
March 6, 2007 at 4:28 am
Hi ,
I know U r problem is know solved.. Take a look this one to solve ur problem...
select * from tblLineItems a
where reqdby in (select min(reqdby) from tblLineItems group by...
March 6, 2007 at 3:45 am
Hi ,
Excellent Question and very good answer by Td Wilson ...
Good One Boss..............
Regards ,
Amit Gupta...
March 6, 2007 at 3:39 am
Hi ,
This query might help you....
Update B set Code=substring(a.id,2,len(a.id)) from table a join table b on left(a.id,1)=b.id
Regards ,
Amit Gupta
March 1, 2007 at 3:08 am
Viewing 15 posts - 31 through 45 (of 216 total)