Viewing 15 posts - 346 through 360 (of 771 total)
"You have a data mismatch between what your attempting to insert into the table, and what the table expects"
hum?
where?
June 27, 2012 at 7:57 am
maybe you can help me with this too:
IF I do a select like:
(SELECT
[NIF_ANTIGO],
[NIF],
[FILIAL_NUMBER],
[STATUS],
[COD_GRP_CONTRIBUINTE],
[COD_TP_SINGULARES],
[COD_MET_TRIBUTARIO],
[COD_TP_IMPOSTOS],
[GRANDE_CONTRIBUINTE],
[NOME],
[MORADA],
[COD_CIDADE],
[C_POSTAL],
[TELEFONE],
[FAX],
[COD_PROVINCIA],
[COD_MUNICIPIO],
[COD_REP_FISCAL],
[DT_INICIO],
[DT_ALTERACAO],
[DT_CESSACAO],
[COD_MOT_CESSACAO],
[MOT_CESSACAO],
[COD_TP_INSTITUICAO],
[COD_FUNC],
[COD_COMUNA],
[COD_BAIRRO],
[OBS],
[DT_BEGIN],
[BI],
[OLD_NIF],
[PSERVTCO],
[PSERVTCP],
[PSERVA],
[DTACESSACAOTCO],
[DTACESSACAOTCP],
[DTACESSACAOA]
FROM
(SELECT
rn = ROW_NUMBER() OVER(PARTITION BY NIF_ANTIGO ORDER BY Cod_Bairro),
[NIF_ANTIGO],
[NIF],
[FILIAL_NUMBER],
[STATUS],
[COD_GRP_CONTRIBUINTE],
[COD_TP_SINGULARES],
[COD_MET_TRIBUTARIO],
[COD_TP_IMPOSTOS],
[GRANDE_CONTRIBUINTE],
[NOME],
[MORADA],
[COD_CIDADE],
[C_POSTAL],
[TELEFONE],
[FAX],
[COD_PROVINCIA],
[COD_MUNICIPIO],
[COD_REP_FISCAL],
[DT_INICIO],
[DT_ALTERACAO],
[DT_CESSACAO],
[COD_MOT_CESSACAO],
[MOT_CESSACAO],
[COD_TP_INSTITUICAO],
[COD_FUNC],
[COD_COMUNA],
[COD_BAIRRO],
[OBS],
[DT_BEGIN],
[BI],
[OLD_NIF],
[PSERVTCO],
[PSERVTCP],
[PSERVA],
[DTACESSACAOTCO],
[DTACESSACAOTCP],
[DTACESSACAOA]
FROM
BULK_CONTRIBUINTES_21...
June 26, 2012 at 6:51 am
It Does not matter what is the value, but it most be a value from the field
June 26, 2012 at 5:00 am
Because I need a value for the filed.
For example:
the cod_bairro can be 1, 2, 3, .....
I need one of this values.
June 26, 2012 at 4:54 am
"How do you decide which row to pick"
The records are like:
NIF_antigo ; NIF; Olther Fields; Cod_Bairro
00000001 1 1 ...
June 26, 2012 at 4:42 am
I have seens that they have only a diferente value. It's the cod_bairro. It the three records only this field has diferente values....
How can I return a distinct NIF_antigo...
June 26, 2012 at 3:46 am
or this piece of code:
IF (@MaxTotalidade > @MaxDiferenca)
BEGIN
IF (select count(sessaofim) from FicheirosImportar where
sessaoinicio <> 'T' and sessaofim > @MaxTotalidade and codrf =''+@codrf+'') <> 0...
June 23, 2012 at 1:33 pm
It seems like this happens only when the code enters in the condition:
IF (select count(sessaofim) from FicheirosImportar where
sessaoinicio ='T' and sessaofim > @MaxTotalidade
and sessaofim >...
June 23, 2012 at 1:30 pm
IF I do it like you told:
Declare the variable I receive this error:
The variable name '@MinVal' has already been declared. Variable names must be unique within a query batch or...
June 23, 2012 at 1:17 pm
That was the problem.
I should had B in one of the places instead of having A in both.
Thank you very much.
Problem solved.
June 23, 2012 at 6:34 am
That means that I can do as I told, correct?
Create a "master" stored procedure which calls the other three like this:
Create MasterProc
as
Begin
begin try
Begin Tran
exec proc 1
...
June 19, 2012 at 2:06 pm
How to make this:
SET @STRSQL = 'select @val = isnull(CODIGO,0) FROM '+@DB+'.DBO.UTILIZADORES WHERE NOME = ''sgsc'''
SET @PARMDEFINITION = '@Val INT OUTPUT'
EXECUTE sp_executesql @STRSQL , @PARMDEFINITION, @val...
June 19, 2012 at 5:53 am
Viewing 15 posts - 346 through 360 (of 771 total)