Viewing 15 posts - 346 through 360 (of 475 total)
Not sure if I have your requirement right for this, but here's a start.
This will fill each class to capacity before moving to the next. If you want an...
May 20, 2013 at 6:41 pm
Sorry I misunderstood the requirement. This should do it
declare @runDate date
set @runDate = '6/11/2013';
with originalQuery as (
select c.c_id,c.p_id,
f.e_dt,@runDate as RunDate,f.f_id,f.amt f_amt,
bf.actual_dt,bf.bf_id,bf.c_id as bfC_id,
bfm.bfm_id,bfm.f_id as bfmF_id,bfm.amt bfm_amt,bfm.alloc_dt,
case when bfm.amt is...
May 20, 2013 at 3:05 am
Hi
You could try the following. The results of the MAX aggregates need to be cast to varchar so that they can be provided in the same column.
declare @runDate date
set...
May 19, 2013 at 7:49 pm
Good question ... looked for the catch, but completely missed it, where's that coffee
May 14, 2013 at 1:29 pm
So something like
SELECT * into #something
FROM (
select 1 ID, 0 ActiveFlag, '1/1/2013' SomeDate union all
select 1, 0, '2/1/2013' union all
select 1, 1, '3/1/2013' union all
select 1, 0, '4/1/2013' union all
select...
May 9, 2013 at 3:52 pm
You're welcome
If you post an example of the coordinates you get for a rectangle I can have a look at it for you
May 9, 2013 at 12:50 pm
Hi
This is ugly, but it seems to work ... I think.
There is bound to be a more elegant and efficient way to do this:-)
WITH tryThis as (
SELECT s.workdate,...
May 8, 2013 at 9:10 pm
If you could post some sample data showing some of the issues and your expected results we can get a clearer idea of what you require.
Here's a link that details...
May 6, 2013 at 4:40 pm
Hi
Without some example data this is just a guess at how you could do. The following example depends on the ids being 9 characters long with an arbitrary delimiter....
May 6, 2013 at 2:52 pm
Hi
For the circle you could create a buffer from the centrepoint for the radius:
SET @g1 = Geography::Point(Lat, Lon, SRID).STBuffer(radius)
For the rectangle you could try the following. I'm assuming that...
May 3, 2013 at 5:09 pm
Hi
The problem appears to be that you are joining in CLIENT_ID to CLIENT_ID in your recursive query rather than HST.CLIENT_ID to LNK.LINK_CLIENT_ID.
I'm assuming that the extra descriptive text in the...
April 23, 2013 at 1:59 pm
Hi
Try replacing your IF functions with a CASE statements, eg
if(rating = 5, 1, 0)
becomes
CASE WHEN rating = 5 THEN 1 ELSE 0 END
In SQL 2012 there is also the IIF...
April 21, 2013 at 8:50 pm
HowardW (4/16/2013)
April 16, 2013 at 1:54 pm
Viewing 15 posts - 346 through 360 (of 475 total)