Viewing 15 posts - 8,461 through 8,475 (of 10,144 total)
David, I reckon there's an error in the WHERE clause - it's challenging writing code with no data to test against - but try this:
WHERE date_sent between @start_date and @end_date
and...
April 17, 2009 at 6:01 am
Hi David
I'd try it with the following values first:
@vendor_name = '(All)'
@search_type = 'Parent Company'
and if this fails, then deconstruct the two new operations in the WHERE clause, perhaps...
April 17, 2009 at 5:27 am
mithun.gite (4/17/2009)
GilaMonster (4/17/2009)
mithun.gite (4/17/2009)
See, anyone who sees the query can guess that its not the actual query to optimize,,
Then what was the point of posting it?
its just a matter...
April 17, 2009 at 4:56 am
Hi David, give the following a try:
SELECT
vrd.request_id,
vrd.wk_ref,
convert(varchar,vrd.[date],103) as date_recorded,
vrq.request_type,
vrd.add_ref,
vpc.parent_company,
vrd.vendor_name,
vrd.cca,
vrd.litigation,
vr.reason_required,
convert(varchar, NULLIF(vrd.date_received, '1900-01-01'), 103) AS date_received,
datediff(dd,vrd.date_requested,case vrd.date_received when '1900-01-01' then vrd.date_requested else vrd.date_received end) as days_to_receipt,
convert(varchar, NULLIF(vrd.deadline_date, '1900-01-01'), 103) AS deadline_date,
convert(varchar,...
April 17, 2009 at 4:44 am
mithun.gite (4/17/2009)
GilaMonster (4/17/2009)
mithun.gite (4/17/2009)
select * from emp where dept_no in(10,20,30)
As in this query only...
April 17, 2009 at 4:22 am
mithun.gite (4/17/2009)
April 17, 2009 at 3:27 am
SELECT CASE WHEN @aFrom > @aCount THEN 0 ELSE CEILING((@aCount-@aFrom+0.0001)/@aRatio) END
April 17, 2009 at 3:17 am
RBarryYoung (4/16/2009)
john.arnott (4/16/2009)
Am I so obsessed with big round numbers that I would ...Coincidentally, that's also how I got my first date... :w00t:
C'mon Barry ya can't just leave this...
April 17, 2009 at 2:53 am
mithun.gite (4/17/2009)
Dear Friends,I have one query like
select * from emp where dept_no in(10,20,30)
Can anyone help me in using EXISTS instead of IN ?
Pls.....
Thanks in Advance
Mithun
SELECT *
FROM emp a
WHERE...
April 17, 2009 at 2:43 am
sacheen.nemade (4/17/2009)
Agentid - Integer
Chain - Varchar(2000)
Chain , it contains all sub-agents(Agentid) list seprated by '-'
For eg
agentid 100
chain would be 100-101-102
Chain gets longer as new...
April 17, 2009 at 2:35 am
Please can you provide a script for table arr2, and some sample data. The link below will show you how to provide sample data in a format which is convenient.
Is...
April 17, 2009 at 1:35 am
Shayne.Gui (4/16/2009)
but I don't know how to get it using Openquery,a user may have multivalue of...
April 17, 2009 at 1:15 am
Well-known films by Stanley Thread:
Fear and The Thread
Thread's Kiss
Threads of Glory
Marriage to The Thread
The Thread moves to England
Dr. Strangethread
2009: A Thread Odyssey
A Clockwork Thread
R Barry Thread
The Threading
Full Metal Thread
Eyes Sewn...
April 16, 2009 at 10:55 am
Hello
First thing I'd do with this is take the switch out of the join:
@search_type = 'Parent Company', tv.vendor_name = '(All)'
- inner join @vendor_names_tab tv ON vpc.parent_company = vpc.parent_company --...
April 16, 2009 at 10:31 am
April 16, 2009 at 9:49 am
Viewing 15 posts - 8,461 through 8,475 (of 10,144 total)