Click here to Skip to main content
16,004,887 members
Home / Discussions / Database
   

Database

 
AnswerRe: Help needed in SQL Server connection Pin
Colin Angus Mackay10-Jan-06 20:55
Colin Angus Mackay10-Jan-06 20:55 
QuestionDataAdapter.Fill taking forever Pin
Luis Alonso Ramos10-Jan-06 15:59
Luis Alonso Ramos10-Jan-06 15:59 
AnswerRe: DataAdapter.Fill taking for ever Pin
nguyenvhn10-Jan-06 16:21
nguyenvhn10-Jan-06 16:21 
GeneralRe: DataAdapter.Fill taking forever Pin
Luis Alonso Ramos10-Jan-06 17:03
Luis Alonso Ramos10-Jan-06 17:03 
GeneralRe: DataAdapter.Fill taking for ever Pin
Luis Alonso Ramos11-Jan-06 12:43
Luis Alonso Ramos11-Jan-06 12:43 
NewsUpdate - still not working Pin
Luis Alonso Ramos11-Jan-06 15:00
Luis Alonso Ramos11-Jan-06 15:00 
GeneralRe: Update - still not working Pin
nguyenvhn11-Jan-06 21:25
nguyenvhn11-Jan-06 21:25 
AnswerRe: Update - still not working Pin
Luis Alonso Ramos12-Jan-06 6:48
Luis Alonso Ramos12-Jan-06 6:48 
Thanks, but late yesterday we found a solution. Basically we changed the code from declaring a table variable to creating a temporary table, and now it's always as "fast" as it should be:
CREATE TABLE #Abonos (ID_semana int, ID_cliente int, Abono int)
INSERT INTO #Abonos
    SELECT R.ID_semana, R.ID_cliente, MIN(R.ID_abono)
      FROM Recibos R
      WHERE R.Estatus = 1 AND R.ID_semana >= @ID_semana1 AND R.ID_semana <= @ID_semana2
      GROUP BY R.ID_semana, R.ID_cliente

CREATE TABLE #AbonosPorDia (ID_semana int, DiaPago int, Pagados int)
INSERT INTO #AbonosPorDia
    SELECT OS.ID_semana, Recibos.DiaPago, COUNT(Recibos.ID_recibo) AS Pagados
      FROM Operacion_Semanas OS
      INNER JOIN Recibos ON OS.ID_semana = Recibos.ID_semana
      INNER JOIN #Abonos A ON Recibos.ID_abono = A.Abono
      WHERE OS.ID_semana >= @ID_semana1 AND OS.ID_semana <= @ID_semana2
      GROUP BY OS.ID_semana, Recibos.DiaPago
      ORDER BY OS.ID_semana
Thanks anyway for trying to help, I really appreciate it!

-- LuisR

nguyenvhn wrote:
My email address: happy#rainy@gmail#com


P.S. I don't recommend posting your e-mail address like this. CodeProject is commonly crawled by spiders looking for e-mail addresses for spam lists. Modify your post to remove it, or at least disguise it:

happyrainy at gmail dot com
happyrainy.gmail@com (swap @ and .)




Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!


The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
QuestionI cannot update the Data grid fields for the following example: Pin
kenn_rosie10-Jan-06 6:44
kenn_rosie10-Jan-06 6:44 
QuestionODBC - Getting table names ? Pin
Weckmann10-Jan-06 1:50
Weckmann10-Jan-06 1:50 
Question24hr Time Format Pin
tadhg889-Jan-06 23:56
tadhg889-Jan-06 23:56 
AnswerRe: 24hr Time Format Pin
Colin Angus Mackay10-Jan-06 0:19
Colin Angus Mackay10-Jan-06 0:19 
GeneralRe: 24hr Time Format Pin
tadhg8810-Jan-06 1:15
tadhg8810-Jan-06 1:15 
QuestionHelp for sql query(joins) Pin
rs_net9-Jan-06 18:20
rs_net9-Jan-06 18:20 
AnswerRe: Help for sql query(joins) Pin
Colin Angus Mackay9-Jan-06 20:52
Colin Angus Mackay9-Jan-06 20:52 
QuestionWhy the ODP.NET could not be installed? Pin
rushing9-Jan-06 15:25
rushing9-Jan-06 15:25 
QuestionSQL Server DataAdapter Pin
thebison9-Jan-06 10:02
thebison9-Jan-06 10:02 
QuestionRunning SQL server 2000 & 2005 side by side Pin
Tiger4569-Jan-06 1:00
Tiger4569-Jan-06 1:00 
AnswerRe: Running SQL server 2000 & 2005 side by side Pin
Colin Angus Mackay9-Jan-06 1:12
Colin Angus Mackay9-Jan-06 1:12 
GeneralRe: Running SQL server 2000 & 2005 side by side Pin
Tiger4569-Jan-06 1:46
Tiger4569-Jan-06 1:46 
GeneralRe: Running SQL server 2000 & 2005 side by side Pin
Colin Angus Mackay9-Jan-06 20:57
Colin Angus Mackay9-Jan-06 20:57 
GeneralRe: Running SQL server 2000 & 2005 side by side Pin
Tiger45610-Jan-06 17:24
Tiger45610-Jan-06 17:24 
GeneralRe: Running SQL server 2000 & 2005 side by side Pin
Colin Angus Mackay10-Jan-06 20:41
Colin Angus Mackay10-Jan-06 20:41 
GeneralRe: Running SQL server 2000 & 2005 side by side Pin
dl4gbe12-Jan-06 2:48
dl4gbe12-Jan-06 2:48 
QuestionRemote SQL Database Pin
HakunaMatada9-Jan-06 0:26
HakunaMatada9-Jan-06 0:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.