Viewing 15 posts - 406 through 420 (of 475 total)
Hi Sean
The MAX is applied to each group and since the auditdate column is in the GROUP BY clause you will get a group for each auditdate. This means...
February 13, 2013 at 11:45 am
Hi
Here's something that may work, I still need to test it over a larger set of data.
It uses quirky updates and I haven't done a lot with these, so I...
February 12, 2013 at 2:18 pm
Hi
Unfortunately you are probably going to have to use some sort of workaround to solve this issue.
Another method would be to export a query rather than the table and cast...
February 12, 2013 at 11:40 am
Thanks for the question and the nice explanation
February 12, 2013 at 11:19 am
Hi
You could try the following
INSERT INTO #tblTasks
SELECT TaskID,
Task,
CASE
WHEN ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) = COUNT(*) OVER (PARTITION BY (SELECT NULL)) THEN 1
ELSE 0
END LastOne
FROM tblOldTasks
This assumes that...
February 10, 2013 at 2:19 pm
Hi
It would probably be best to post some sample data with an example of what you require, however I'll take a stab at what I think you are trying to...
February 7, 2013 at 11:30 am
Hi
Not sure if this will help, but the following example packs a couple of varbinarys with 4 integers in both endians (assuming 4 bytes per integer). Then unpacks them....
February 4, 2013 at 12:53 pm
No problem,
I'll have to remember that 🙂 I don't use FOR XML much, but it is useful occasionally
February 1, 2013 at 12:13 pm
There are probably better people to replay to this than me, but I would say that you need to make this a subquery and alias the result from that. ...
January 31, 2013 at 11:36 am
No problem and you're welcome
January 31, 2013 at 11:10 am
Hi
This isn't exactly pretty ... but it's another way to skin the cat
;with cteOriginal (CompanyName, CompName1, CompName2, CompName3)
as
(
select 'A V H S L ALQUILER Y VENTA DE HOGARES', NULL, NULL,...
January 30, 2013 at 8:00 pm
Hi
Without the GO 3 and using either values or select
create table N (i int not null identity(100,1) constraint PK_ primary key,test bit);
create table #tmp (i int not null primary key);
GO
--...
January 29, 2013 at 5:26 pm
Hi
I think something like this may do what you want.
;with countbyuserday as (
SELECT userid, recorddate, count(*) numrec
FROM [#tasks_log]
GROUP BY userid, recorddate
),
seqbymaxnum as (
SELECT userid, recorddate, numrec, ROW_NUMBER() OVER (PARTITION BY...
January 29, 2013 at 12:07 pm
Abu Dina (1/28/2013)
Thanks Chris.But this is removing words like 'TO' from TOWER and 'EL from HOTEL etc...
That makes it tricky ... as you need to start looking for word bounds....
January 28, 2013 at 11:25 am
I'm guessing that since Fall is returning as least hires, that you need to have adventureworks to be able to answer this question correctly.
January 27, 2013 at 11:24 am
Viewing 15 posts - 406 through 420 (of 475 total)