Viewing 15 posts - 196 through 210 (of 414 total)
Papillon, you don't have to use dynamic sql in your solution...
Performance could be a problem in Papillon's solution if the table is large....
December 15, 2005 at 2:43 am
I don't think this will perform very well. Considering the data below. Your loop is iterated 10 times, and Sergiy's loop (and my loop) only 3 times.
set nocount on
go
create table...
December 14, 2005 at 7:18 am
...Sorry, I misunderstood...
Replace the last part by
select
adrid,
adrpart
from @AdressParts
order by
adrid,
case when id % 10 in (1,2) then 0 else 1 end,
case when id %...
December 14, 2005 at 5:23 am
If there are no errors in your data (i.e each field contains 9 commas and the first two entries in your list are always positive integers), and if I understand what you...
December 14, 2005 at 5:10 am
Thanks for posting the results of your test....
December 14, 2005 at 1:53 am
The @Student table is from govinn's post. It is a table variable and not a "real" table in order to avoid changing the table structure of the database when testing the query (I guess)....
December 13, 2005 at 2:07 am
You need to stress which ScreenId's and RoleId's are connected. In your first XML, you have 4 ScreenId's and 4 RoleId's describing one Screens entity, with no clear relation between...
December 12, 2005 at 6:02 am
Been thinking some more....
If you insist on the XML format (which I still think you shouldn't), I believe that the following will work:
CREATE...
December 12, 2005 at 5:48 am
I think you should consider changing your XML a bit. As things are now, it is hard to connect screenid and roleid. Instead try the following (where related screenid's and...
December 12, 2005 at 5:25 am
I was a little puzzled why Govinn's query didn't work. Then I realised that this could be because your table has more columns than you have stated above - a unique...
December 12, 2005 at 1:45 am
Oups, you're right. But the min should be correct....
December 11, 2005 at 1:03 am
Or better. What happens if you try
Select
count(D.EventID),
sum(CoverChrgAmt),
sum(PayDetail.PaymntAmt),
December 9, 2005 at 5:10 am
So if you write "select *" instead of the above, then it works? (still looks like varable assignment to me).
December 9, 2005 at 4:48 am
Where does he do that (mix variable assignment and non variable assignment)and how should the query be fixed?
December 9, 2005 at 4:32 am
An alternative, which may or may not be faster, I don't know. But it doesn't require a unique id.
SELECT distinct t.date, t.Unit, t.Company_Name /* or simply select t.* */
FROM...
December 9, 2005 at 4:29 am
Viewing 15 posts - 196 through 210 (of 414 total)