Viewing 15 posts - 1 through 15 (of 38 total)
Lynn wrote "You really don't get it, do you"
In the UK this would be considered a provocative and rude statement. I will assume cultural differences apply here.
Having used RBDMS since...
September 10, 2012 at 2:24 am
Lynn wrote "This means it HAS TO do an implicit conversion of the nvarchar value 'AB' to INT in order to complete the test and fails since 'AB' can not...
September 9, 2012 at 3:45 pm
SELECT Job_Bag
FROM Job_Bag
WHERE
Job_Bag.Description_Reference = 1609
AND Job_Bag.Cust_Order_No = '70255'
* A row exists which matches the WHERE cluase conditions
* The row with value 'AB' in column Description_Reference has value '70255'...
September 9, 2012 at 3:01 am
AB70255
August 2012
Query results using copy paste from SQL SMS results pane
September 9, 2012 at 2:46 am
I don't understand.
I described EXACTLY the results.
Not sure how else to post them?
I
September 8, 2012 at 2:14 pm
Hi Lynn
Sorry for delay in replying - beautiful sunny Saturday here in the UK
The result of the "OR" code is that a resultset containg all, and only, the rows with...
September 8, 2012 at 10:00 am
As I mentioned before there was already the value "AB" in a row in the table which cannot be converted to a string.
So one might expect the code to fail...
September 7, 2012 at 5:50 pm
" There are also implicit conversions in .net"
Assuming you don't mean VB.net Option Explicit, or the Implicit keyword.
And ingoring the VAR debate.....
Can you give some examples of implicit conversions...
September 7, 2012 at 4:55 pm
The problem with the SP code is indeed the reliance on SQL implicit conversion. Easily fixed. Easily undersood.
The interesting issue is why, like many defects, it only emerged after the...
September 7, 2012 at 4:37 pm
Thanks everyone.
Putting the peices together I think the answer is this:
The fragment of the SP causing the error is this:
SELECT Job_Bag
FROM Job_Bag
WHERE Job_Bag.Description_Reference = @OrderID
ANDJob_Bag.Cust_Order_No = @OrderReference
*...
September 7, 2012 at 2:30 pm
@SSCertifiable
There is a consistency within SQL issue here which I don't understand
Why did the conversion NEVER fail with the value 'AB' is in the column?
This value has been there since...
September 7, 2012 at 11:19 am
Thanks to all.
BUT - the issue is not conversion per se. I don't need any more info on coercion, casting, conversion etc!
The issue now is - why the code has...
September 7, 2012 at 11:05 am
OK
When SQL compares column values with a variable value where the values are diferent data types.
There are 2 posibel methods:
1 Coerce each column value as it is read row by...
September 7, 2012 at 10:52 am
Yes - I understand conversion and casting
I wonder if you would re-read my previous post? To confirm what is in it.
September 7, 2012 at 10:39 am
I had thought that SQL coerced the @OrderID int value to a varchar to do the comparison
You are suggesting that SQL does the coercion the other way - coerces all...
September 7, 2012 at 10:29 am
Viewing 15 posts - 1 through 15 (of 38 total)