Conversion Error From String @1
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the conversion error from string firebird date company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Firebird Date Format
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Interbase: conversion error from string “” up vote 1 down vote favorite I'm running IB2009 and I'm trying to count the number of records where a specific field is neither NULL nor empty: SELECT COUNT(A.ID) FROM MYVIEW A WHERE ((A.VARCHARFIELD1 IS NOT NULL) OR (A.VARCHARFIELD1 <> '')) where MYVIEW is a VIEW, and MYVIEW.ID is an INTEGER, while MYVIEW.VARCHARFIELD1 is a VARCHAR(18). I'm getting the error message Error at line 1, conversion error from string "" which I don't really understand, since when I drop the COUNT()-function, the query executes nicely. Do anyone know what I'm doing wrong? Thanks! sql interbase share|improve this question edited Jan 15 '10 at 11:49 asked Jan 15 '10 at 10:22 conciliator 3,26832656 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote I don't see anything wrong with using COUNT() in this case. Although it shouldn't matter you might try dropping all the parentheses in your WHERE clause. You also might try using COUNT(*) instead of COUNT(A.ID) just to see if it gives you different results. In any case, based on your description of the intent of the query I don't think that the query is going to do what you intended. If the query is supposed to return rows where the field is neither NULL nor empty I believe your WHERE clause should be WHERE A.VARCHARFIELD1 IS NOT NULL AND A.VARCHARFIELD1 <> '' With the 'OR' in there as originally written I think you'll get back every row in the table where A.VARCHARFIELD1 is NOT NULL, as the "field NOT NULL" predicate will allow in all non-NULL values, and since the two predicates are joined by an OR the second predicate won't matter. I hope this helps. share|improve this answer answered Jan 15 '10 at 12:11 Bob Jarvis 24.4k43766 Bob: well, I actually tried COUNT(*), but to no avail. You're
we will discuss things relating the ZEOSLib 6.6.x stable versions Moderators: gto, EgonHugeist Post Reply Print view Search Advanced search 3 posts • Page 1 of 1 louis Senior Boarder Posts: 56 Joined: 02.01.2009, 19:41 SQL Error: conversion error from string "0" Quote Postby louis » 03.02.2009, 10:18 Hallo, I have this error message: SQL Error: conversione error from string "0". Error Code: -413. Overflow occurred during datatype conversion. I http://stackoverflow.com/questions/2070789/interbase-conversion-error-from-string use delphi 5 with zeos 6.6.4. I need to use a TTimeField that can have 0.00 time inside but when I try to save the query, I have the error above in unit ZDbcInterbase6Utils. I understand this is because the time is empty but what I do to solve this problem? Thanks. Top mdaems http://zeoslib.sourceforge.net/viewtopic.php?t=2219 Zeos Project Manager Posts: 2766 Joined: 20.09.2005, 15:28 Location: Brussels, Belgium Contact: Contact mdaems ICQ WLM Yahoo Messenger Quote Postby mdaems » 03.02.2009, 10:52 Hi, Can you please file a bug report on the bug tracker? ( http://zeosbugs.firmos.at/ ) Please attach a minimal project showing the error and the script needed to set up the database. Mark Top louis Senior Boarder Posts: 56 Joined: 02.01.2009, 19:41 Quote Postby louis » 03.02.2009, 16:12 mdaems wrote:... Please attach a minimal project showing the error and the script needed to set up the database. Hi Mark, while I prepared the example I have uncovered where I mistook. During create table in database I assigned wrong default, see wrong code: Code: Select allCREATE TABLE CEDOLINI
(
ID_CEDOLINO Integer NOT NULL,
GIORNO1 Time DEFAULT 0 NOT NULL, <--- ERROR
PRIMARY KEY (ID_CEDOLINO)
);but the line correct is:Code: Select all GIORNO1 Time DEFAULT '00.00' NOT NULL, <--- CORRECT!
Thanks Top Display posts from previo
funcionarão. Por favor, habilite o javascript para ter acesso à todas as funcionalidades. Publicidade Últimos Tópicos Últimos Tópicos Resolvidos Tópicos melhor avaliados Tópicos Quentes Estatísticas do Fórum 0 Usuários ativos 0 http://forum.imasters.com.br/topic/472658-resolvido%C2%A0erro-conversion-error-from-string-0/ membros, 0 visitantes, 0 membros anônimos Siga o iMasters Siga o iMasters http://www.delphigroups.info/2/8/294955.html no Twitter Siga o iMasters no Linkedin Siga o iMasters no Facebook Siga o Feed iMasters Siga o iMasters no Github [Resolvido]Erro Conversion Error From String "0" Criado por #Allan , Ago 16 2012 11:05 Por favor, faça o login para responder 6 respostas neste tópico #1 #Allan conversion error #Allan Members 11 posts Postado 16 agosto 2012 - 11:05 Bom dia, estou tentando fazer um relatório que filtra entre duas datas e esta dando o seguinte erro: conversion error from string "0" segue abaixo as linha de comando! MaskEdit1.Text:= DatetoStr(DateTimePicker1.Date); MaskEdit2.Text:= DatetoStr(DateTimePicker2.Date); formRelPagarData.qrPagar.Close; formRelPagarData.qrPagar.SQL.clear; formRelPagarData.qrPagar.SQL.add('SELECT * FROM PAGAR WHERE DATVC BETWEEN '+MaskEdit1.text+' AND '+MaskEdit2.text); formRelPagarData.qrPagar.Open; obrigado desde já Allan 0 conversion error from Voltar para o topo Publicidade #2 FK. FK. fodase Banned 627 posts Postado 16 agosto 2012 - 11:47 1 Editado por FK., 29 agosto 2016 - 22:08 . 1 Voltar para o topo #3 #Allan #Allan Members 11 posts Postado 16 agosto 2012 - 14:15 FK muito obrigado pela sua ajuda, deu certo usando o ParamByName. foi meu primeiro post no iMasters, me desculpe pelo meu erro! 1 Voltar para o topo #4 FK. FK. fodase Banned 627 posts Postado 16 agosto 2012 - 14:46 3 0 Voltar para o topo #5 #Allan #Allan Members 11 posts Postado 16 agosto 2012 - 16:39 Só mais uma dúvida, nessa linha de comando q eu postei estou filtrando somente entre datas, que seria o total das contas que o cliente tem q pagar nesse período. Eu preciso também fazer um relatório que filtre o Fornecedor e tambem as datas! É so eu colocar mais um AND adicionar FORNE? 0 Voltar para o topo #6 FK. FK. fodase Banned 627 posts Postado 16 agosto 2012 - 16:52 4 1 Voltar para o topo #7 #Allan #
should I look for. select e.itemcode, e.sizeid, sum(d.monthqty*e.qty) from saleschmst m join saleschdet d on (d.compyrcode=m.compyrcode and d.invno=m.invno) left join extractassembly(d.itemcode, d.sizeid, 'N') e on (1=1) where m.compyrcode=4 and m.monthof=9 and e.itemcode is not null group by e.itemcode, e.sizeid Devinder Singh Delphi Developer 2007-08-30 05:07:58 PM Re:conversion error from string "0" If I remove sum/group by it works. Svein Erling Tysvær Delphi Developer 2007-08-31 05:37:23 AM Re:conversion error from string "0" Devinder Singh writes: Quote A query where I am joining a procedure gives me the captioned error. what should I look for. select e.itemcode, e.sizeid, sum(d.monthqty*e.qty) from saleschmst m join saleschdet d on (d.compyrcode=m.compyrcode and d.invno=m.invno) left join extractassembly(d.itemcode, d.sizeid, 'N') e on (1=1) where m.compyrcode=4 and m.monthof=9 and e.itemcode is not null group by e.itemcode, e.sizeid Try adding 'and d.monthqty is not null and e.qty is not null' to your where clause (just to check that the conversion error isn't something like your component set not knowing how to handle NULL). Set Devinder Singh Delphi Developer 2007-08-31 12:34:57 PM Re:conversion error from string "0" Still the same result. "Svein Erling Tysvær"