473,414 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

446: Impossibile risolvere il conflitto di regole di confronto per l'operazione

Ho trasportato sul Sql-Server del cliente:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Standard Edition on Windows NT 5.2 (Build 3790: )

un db sviluppato su un mio sql-server di sviluppo:
Microsoft SQL Server 7.00 - 7.00.1063 (Intel X86)
Desktop Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

Gli applicativi funzionano benissimo, tranne una SP che segnala l'errore
446, che da BOL è descritto come "Impossibile risolvere il conflitto di
regole di confronto per l'operazione ", e quando appare l'operazione che
fallisce viene indicata in "equal to".

Adesso sono un po' in difficoltà perchè sono nella sede del cliente a
Calais, il firewall chiude i newsreader e non ho con me tutta la
bibliografia da ufficio.

Il problema avviene nella dichiarazione di un cursore:
DECLARE CURSORE_LINEE CURSOR
LOCAL SCROLL STATIC
FOR
SELECT B.CODICE_LINEA, B.PRODUTTIVITA, B.LOTTO_MINIMO, B.MOLTEPLICITA,
NUMERO_LOTTI=COALESCE((SELECT COUNT(1)
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA
),0),
QTA_LAVORATA=COALESCE((SELECT SUM(QTA_ASSEGNATA)
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA
),0.0),
TEMPO_USATO=COALESCE((SELECT SUM(TEMPO_USATO)
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA
),0.0),
ULTIMO_FORMATO=COALESCE((SELECT TOP 1 [FORMATO]
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA
ORDER BY PROGRESSIVO DESC
),'NESSUNO')
FROM TB_PRODUTTIVITA_LINEE AS B
WHERE B.CODICE_ORIGINE=@ORIGIN
ORDER BY PRODUTTIVITA DESC

Ho commentato varie cose, e ho visto che il problema si verifica se c'è
uno qualunque delle 4 assegnazioni col Coalesce (ma non credo il
problema sia nel coalesce, quanto piuttosto in qualcosa
dell'assegnazione stessa).

Se qualcuno ha qualche idea, anche solo su cosa guardare o cosa provare
a verificare, è il benvenuto.

Ciao

Alberto

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 20 '05 #1
2 5596
> SELECT B.CODICE_LINEA, B.PRODUTTIVITA, B.LOTTO_MINIMO, B.MOLTEPLICITA,
NUMERO_LOTTI=COALESCE((SELECT COUNT(1)
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA
),0),


Risolto così:
SELECT B.CODICE_LINEA, B.PRODUTTIVITA, B.LOTTO_MINIMO, B.MOLTEPLICITA,
NUMERO_LOTTI=COALESCE((SELECT COUNT(1)
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA COLLATE DATABASE_DEFAULT
),0),

Saluti

Alberto
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 20 '05 #2
> SELECT B.CODICE_LINEA, B.PRODUTTIVITA, B.LOTTO_MINIMO, B.MOLTEPLICITA,
NUMERO_LOTTI=COALESCE((SELECT COUNT(1)
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA
),0),


Risolto così:
SELECT B.CODICE_LINEA, B.PRODUTTIVITA, B.LOTTO_MINIMO, B.MOLTEPLICITA,
NUMERO_LOTTI=COALESCE((SELECT COUNT(1)
FROM #TEMP_PIANO
WHERE ID_LINEA=B.CODICE_LINEA COLLATE DATABASE_DEFAULT
),0),

Saluti

Alberto
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brynn | last post by:
My function versus the Int(DateDiff()) approach Here was the code used ... then the results By the way, my function and aspfaq.com's calculations are equal (and correct for that matter). ...
8
by: Giulio | last post by:
I'm doing a class who takes in constructor a vector<int> keeps and makes some statistic on the vector whitout modifiing it. I would like not to make a copy of the vector for the class. to let the...
5
by: Linda | last post by:
Hi, I'm trying to get the Left/Top/Height/Width properties for some text boxes on a form to match exactly. Three of them are fine, but the fourth will not accept the changes I type into the...
0
by: Francesco | last post by:
Ciao a tutti... Premetto che non sono molto pratico di MySql (anche se ho già fatto qualche piccola applicazione che sfrutta questo DBMS) Ho un problema da risolvere molto importante. Ho un...
2
by: Parret | last post by:
Ciao a tutto l'NG, proseguo col mio scontro con il C#.... Ieri mi sono trovato con l'esigenza di selezionare dalla rubrica di windows il nominativo e il numero di telefono di una persona, per poi...
0
by: and251076 | last post by:
Buongiorno, da pochi giorno ho installato la versione 2005 di Visual Studio, ma ahi mè non funziona tutto perfettamente. Infatti non riesco ad eseguite le miei applicazioni web in localhost. Se...
3
by: thomas_escolan | last post by:
Hi everybody, Can somebody tell me why My Xpath expressions don't work this this file ? Expression : //g I maid some tries with XPath Explorer under Eclipse 3.2, but got no result beyond the...
3
by: Ja NE | last post by:
hello (again). here is something I have slighlty idea how to do, but so far (after few days) I haven't found the right way to do it. have a mysql query for id,name,text and than, in while loop...
14
by: n3o | last post by:
Hello Comp.Lang.C Members, I have an issue with user input that I have been trying to figure out for the longest. For instance, let's say you have something like this: void foo() { int num;...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.