1086 + 68 = 0? [modified]
-
I knew there were invoices and credit notes. I just couldn't figure out why there weren't both together:
select * from caExportBatchRecord
where ExportRecordTypeCode in ('SINV, SCRN')
and ExportBatchID = 10 records
I even checked them indiviudally:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV'
1086 records
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN'
68 records
Last modified: 2hrs 25mins after originally posted --
Semicolons: The number one seller of ostomy bags world wide. - dan neely
-
I knew there were invoices and credit notes. I just couldn't figure out why there weren't both together:
select * from caExportBatchRecord
where ExportRecordTypeCode in ('SINV, SCRN')
and ExportBatchID = 10 records
I even checked them indiviudally:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV'
1086 records
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN'
68 records
Last modified: 2hrs 25mins after originally posted --
Semicolons: The number one seller of ostomy bags world wide. - dan neely
You get what you ask for.
-
You get what you ask for.
Yep. :laugh:
Semicolons: The number one seller of ostomy bags world wide. - dan neely
-
I knew there were invoices and credit notes. I just couldn't figure out why there weren't both together:
select * from caExportBatchRecord
where ExportRecordTypeCode in ('SINV, SCRN')
and ExportBatchID = 10 records
I even checked them indiviudally:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV'
1086 records
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN'
68 records
Last modified: 2hrs 25mins after originally posted --
Semicolons: The number one seller of ostomy bags world wide. - dan neely
On your individual checks, try adding the exportbatchid.
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV' and ExportBatchID = 1
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN' and ExportBatchID = 1
I bet you get zero for each query.
-
On your individual checks, try adding the exportbatchid.
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV' and ExportBatchID = 1
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN' and ExportBatchID = 1
I bet you get zero for each query.
I double your bet I don't. :-\ By the way, this is NOT a help forum. The text at the top of this page says, "Subtle Bugs is a forum to post examples of interesting, aggravating and subtle bugs that you've found and fixed."
Semicolons: The number one seller of ostomy bags world wide. - dan neely
-
I knew there were invoices and credit notes. I just couldn't figure out why there weren't both together:
select * from caExportBatchRecord
where ExportRecordTypeCode in ('SINV, SCRN')
and ExportBatchID = 10 records
I even checked them indiviudally:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV'
1086 records
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN'
68 records
Last modified: 2hrs 25mins after originally posted --
Semicolons: The number one seller of ostomy bags world wide. - dan neely
Brady Kelly wrote:
'SINV, SCRN'
Hmmmmmm, don't like those ticks, do you? :)
I'm largely language agnostic
After a while they all bug me :doh:
-
On your individual checks, try adding the exportbatchid.
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV' and ExportBatchID = 1
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN' and ExportBatchID = 1
I bet you get zero for each query.
-
I double your bet I don't. :-\ By the way, this is NOT a help forum. The text at the top of this page says, "Subtle Bugs is a forum to post examples of interesting, aggravating and subtle bugs that you've found and fixed."
Semicolons: The number one seller of ostomy bags world wide. - dan neely
Oops. Sorry, newbie here, and obviously not that helpful either. :laugh:
-
Oops. Sorry, newbie here, and obviously not that helpful either. :laugh:
Caydence wrote:
:laugh:
You got that right. This is one of those boards where it's OK to point and laugh. You can reserve being helpful for the serious boards. :)
Semicolons: The number one seller of ostomy bags world wide. - dan neely
-
I knew there were invoices and credit notes. I just couldn't figure out why there weren't both together:
select * from caExportBatchRecord
where ExportRecordTypeCode in ('SINV, SCRN')
and ExportBatchID = 10 records
I even checked them indiviudally:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV'
1086 records
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN'
68 records
Last modified: 2hrs 25mins after originally posted --
Semicolons: The number one seller of ostomy bags world wide. - dan neely
??? WTH Subject: 1086 + 86 = 0?
Brady Kelly wrote:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV' 1086 records select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN' 68 records
Reading seems to be a challenge here :wtf:
Dewm Solo - Managed C++ Developer
-
??? WTH Subject: 1086 + 86 = 0?
Brady Kelly wrote:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV' 1086 records select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN' 68 records
Reading seems to be a challenge here :wtf:
Dewm Solo - Managed C++ Developer
No, the real challenge seems to realising the subject line has sweet f-all to do with the actual bug. :cool:
Semicolons: The number one seller of ostomy bags world wide. - dan neely
-
Caydence wrote:
:laugh:
You got that right. This is one of those boards where it's OK to point and laugh. You can reserve being helpful for the serious boards. :)
Semicolons: The number one seller of ostomy bags world wide. - dan neely
Brady Kelly wrote:
OK to point and laugh. You can reserve being helpful for the serious boards
Pointing and laughing doesn't help? I should think that it at least drives the lesson home. :-D
-
No, the real challenge seems to realising the subject line has sweet f-all to do with the actual bug. :cool:
Semicolons: The number one seller of ostomy bags world wide. - dan neely
Of course you can always cheat and go back to change it. Then again, miss writing stuff seems to be a habit:
Brady Kelly wrote:
No, the real challenge seems to realising the subject line has sweet f-all to do with the actual bug.
;P
Dewm Solo - Managed C++ Developer
-
Of course you can always cheat and go back to change it. Then again, miss writing stuff seems to be a habit:
Brady Kelly wrote:
No, the real challenge seems to realising the subject line has sweet f-all to do with the actual bug.
;P
Dewm Solo - Managed C++ Developer
Give me a break, I'm still at work at 22h00 on a Friday night. By choice. :doh:
Semicolons: The number one seller of ostomy bags world wide. - dan neely
-
I knew there were invoices and credit notes. I just couldn't figure out why there weren't both together:
select * from caExportBatchRecord
where ExportRecordTypeCode in ('SINV, SCRN')
and ExportBatchID = 10 records
I even checked them indiviudally:
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SINV'
1086 records
select count(*) from caExportBatchRecord where ExportRecordTypeCode = 'SCRN'
68 records
Last modified: 2hrs 25mins after originally posted --
Semicolons: The number one seller of ostomy bags world wide. - dan neely
try where ExportRecordTypeCode in ('SINV', 'SCRN')
-
Bah - going and spoiling it :)
--------------------------- Blogging about SQL, Technology and many other things