Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ayu
Starting Member
43 Posts |
Posted - 2008-07-23 : 08:20:36
|
i have select query:select distinct r.custnmbr, s.inet1 as email_id, r.custclas from sales00 sjoin restore01 ron r.custnmbr=s.master_idwhere r.modifdt > '12/31/2002'and s.master_type = 'cus'and s.inet1 like '%@%'but while executing it gets me error like:An error occurred while executing batch. Error message is: Non-negative number required.Parameter name: countdo anyone give me solution.. also i want custnmbr starts with alphabet(a-z)..so what condition i have to put in where clause to get that?thanks a lot!!!. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-07-23 : 08:26:27
|
[code]SELECT DISTINCT r.CustNmbr, s.Inet1 AS Email_ID, r.CustClasFROM Sales00 AS sINNER JOIN Restore01 AS r ON r.CustNmbr = s.Master_IDWHERE r.ModifDt >= '20030101' AND s.Master_Type = 'cus' AND s.Inet1 LIKE '%@%.%' AND r.CustNmbr LIKE '[a-zA-Z]%'[/code] E 12°55'05.25"N 56°04'39.16" |
|
|
ayu
Starting Member
43 Posts |
Posted - 2008-07-23 : 08:40:09
|
thanks Peso..but i got results from A-G and then it disconnected and got the same error:An error occurred while executing batch. Error message is: Non-negative number required.Parameter name: countdo anyone know why its getting and what will be the solution.as other all sql queries are running properly..thanks. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-07-23 : 08:44:29
|
Maybe you should post FULL code you use? E 12°55'05.25"N 56°04'39.16" |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
ayu
Starting Member
43 Posts |
Posted - 2008-07-23 : 08:52:58
|
the results i m getting from A-G custnmbrs are:custnmbr email-id custclas------------------------------A.002 sweet6@yahoo.com standardA.Brwon01 brwon@aol.com patient............................................................Gelonde gelonde@cigma.net ind-patientas i want till Z-custnmbr but i m getting error..and that is the only simple select query..i have not edited anything..SELECT DISTINCT r.CustNmbr, s.Inet1 AS Email_ID, r.CustClasFROM Sales00 AS sINNER JOIN Restore01 AS r ON r.CustNmbr = s.Master_IDWHERE r.ModifDt >= '20030101' AND s.Master_Type = 'cus' AND s.Inet1 LIKE '%@%.%' AND r.CustNmbr LIKE '[a-zA-Z]%'thanks for ur help. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
ayu
Starting Member
43 Posts |
Posted - 2008-07-23 : 09:19:30
|
yup!! Peso..thanks for ur help..but before posting my query here i saw both the links in this forum..but i didn't get rid of this error that's why i posted new topic..don't know why m getting an error like this as all several sql queries r running perfect..but stucking in middle while executing this only query..anyways, thanks for ur help peso..but do u think any alternative what's the reason as query is simple joining two tables..thanks. |
|
|
|
|
|