<div>Hey Naven</div>
<div> </div>
<div>My problem got solved</div>
<div> </div>
<div>i actually missed soemthign in where clause i have added the option called aprove date in it and it fetched the record in 10 minutes time</div>
<div> </div>
<div>Thanks so much for ur time in replying to my mail</div>
<div> </div>
<div>Regards</div>
<div>Vik<br><br> </div>
<div><span class="gmail_quote">On 5/8/08, <b class="gmail_sendername">Vikas...</b> <<a href="mailto:vikas.image@gmail.com">vikas.image@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi Naven</div>
<div> </div>
<div>thanskf ro the reply</div>
<div> </div>
<div>please find the query below</div>
<div> </div>
<div>************************************************</div>
<div><br>SELECT top 100 percent convert(varchar,a.approvedate,112) as [date], <br>rtrim(a.accountnumber)+replicate(' ',16-len(rtrim(a.accountnumber))) as accountnumber,<br>dbo.Get_Value(accountname,100) as accountname ,<br>
convert(varchar, convert(datetime,createdate),112) as AccountOpenDate , <br>dbo.Get_Value(a.comment,1016) as OperatingIns,<br>dbo.Get_Value((select acctstatuscode from svs_account..acctstatus c where c.acctstatusid=a.statusid),16) as AccountStatus ,<br>
(rtrim(icnumber1)+replicate (' ',15-len(rtrim(icnumber1)))) as CUSTID , <br>dbo.Get_Value(signaturename,100) as [CUSTID Name],<br>(case when (select count(*) from svs_account..signcardtable s where s.accountnumber=b.accountnumber and s.branchnumber=b.branchnumber and s.signcardnumber=b.signcardnumber)>=1 then<br>
'ENABLE '<br>else 'DISABLE ' end)as CUSTIDstatus,<br>rtrim(a.imagefilename)+replicate(' ',22-len(rtrim(a.imagefilename)))as imagefilename ,icnumber1 as CustomerID,signaturenumber ,<br>
(rtrim(b.ICNumber1)+'.tiff')+replicate(' ',22-len(rtrim(b.ICNumber1)+'.tiff')) as SignatureFile ,a.Branchnumber, approvedate<br>from svs_account..account a , svs_account..signature b <br>where a.accountnumber=b.accountnumber and a.branchnumber=b.branchnumber<br>
and b.icnumber1 not in (<br>select imagefile from legacydetailtbl) </div>
<div> </div>
<div> </div>
<div>************************************************<br><br> </div>
<div><span class="e" id="q_119c73122216f0f6_1">
<div><span class="gmail_quote">On 5/8/08, <b class="gmail_sendername">Neven MacEwan</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:neven@mwk.co.nz" target="_blank">neven@mwk.co.nz</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Vikas<br><br>Can you post the text of the query?<br><br>Basic Pointers<br><br>1/ Add indexes for ther foreign keys (these can allow duplicates)<br>
2/ Restrict the result set (I assume you dont want the query to return 10 million rows)<br>3/ use ansi join syntax<br><br>N<br><br><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px; BORDER-LEFT: #ccc 1px solid">
<div><span>Hi<br> I have an query related to an sql sever 200o using delphi 5. Not sure if this is the right palce to ask it. Still i belive may be soemone can help me in this<br> I am creating a store procedure.<br> In that i am fetching the information on the basis of join between two table.<br>
say table 1 and table2. Now thign is at my client place table 1 has 10 million records and table 2 has 15 million records.<br> Now i have done a join between these two table depending on tabl1.x=table2.x and table1.y=table2.y. I have used the primary key in colum x of table 1 that emans it automaticaly created a clustered idex. Now problem is when i execute this query it takes more than hour to run this query. Any way i can reduce the time of query using any option.i can't use primary keys on table2 sicne i do have duplicate values.<br>
Regards<br>Vikas<br>Solution consultant<br>NCR coorporation<br><br>-- <br> vikas<br></span></div>------------------------------------------------------------------------<br><br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>Post: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a><br>Admin: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote>
<br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a><br>
Admin: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br>
</blockquote></div><br><br clear="all"><br></span></div>-- <br><span class="sg"> vikas </span></blockquote></div><br><br clear="all"><br>-- <br> vikas