Viewing 15 posts - 826 through 840 (of 1,229 total)
You're welcome, thanks for the feedback.
May 20, 2011 at 5:32 am
Something like this?
WITH RandimisedResults AS (
select CaseNumber, AgentName,
rn = ROW_NUMBER() OVER (PARTITION BY AgentName ORDER BY NEWID())
from dbo.CaseSummary
where CaseDate >= @DateFrom
and ...
May 20, 2011 at 5:19 am
SELECT *
FROM customers c
INNER JOIN tickets t1 ON t1.CustId = c.CustId AND t1.[subject] = 'info'
INNER JOIN tickets t2 ON t2.CustId = c.CustId AND t2.[subject] = 'problem'
WHERE t2.ticketDate >...
May 20, 2011 at 4:35 am
SQLRO (5/20/2011)
Yes. You are right.
Paul's article shows an efficient and rigorously tested method for doing this.
May 20, 2011 at 3:53 am
SQLRO (5/20/2011)
Thanks for the reply.
The records will not be actually preassigned. The records will be allocated sequentially& dynamically i.e. any top 10 records should be assigned which are...
May 20, 2011 at 3:46 am
Hi Rohit
This looks like a scheme for selecting and using preassigned numbers for use as identity values in a table - is this the case?
Cheers
ChrisM
May 20, 2011 at 3:25 am
ursfriend77 (5/16/2011)
WHERE 1=1
AND md.vendor_id=sd.vendor_id(+)
AND md.inventory_id=sd.item_id(+)
Here i am using 2 tables main_data and sub_data, as for join rules we have to give n-1 join conditions,...
May 17, 2011 at 2:44 am
abhisheksrivastava85 (5/16/2011)
Thanks a lot for reply man, but it is returning average as 0 when i am using Sign function.
Check your data and then your code. The method works just...
May 16, 2011 at 11:37 am
SkyBox (5/16/2011)
That works, but unfortunately the data is for accounting - So rounding is not an option.
How does the system deal with VAT?
Is the datatype really varchar? If it is,...
May 16, 2011 at 8:20 am
Ninja's answered the question you originally posted - it's straightforward enough to write a query which will do what you are asking.
Expanding upon his comments, you need an intimate knowledge...
May 16, 2011 at 6:26 am
How confident are you that a column in one table which has a name matching the pk column in another table is a foreign key?
May 16, 2011 at 4:15 am
Work on the inner query
select stud_code,count(*) Num_Absences
from StudAbsent
where Absent_date between @StartDate and @EndDate
and cmpy_code='10'
group by stud_code
having count(*) > 2
until you are certain that the result...
May 16, 2011 at 1:17 am
Ray K (5/13/2011)
Brandie Tarvin (5/13/2011)
WOTD:Editededited😀
:laugh: :laugh: :laugh:
May 13, 2011 at 6:59 am
GilaMonster (5/10/2011)
terrykzncs (5/10/2011)
I know that SQL joins tables from left to right, but in what order should we join tables for the code to be most efficient?
Any order you like....
May 13, 2011 at 6:21 am
Is 29,999,999,997 rows representative of the data you wish to model? Or, with 10 names to start, 99,999,999,990 rows? Is the data itself representative?
May 13, 2011 at 6:00 am
Viewing 15 posts - 826 through 840 (of 1,229 total)