Viewing 15 posts - 10,786 through 10,800 (of 15,381 total)
Andrew-495157 (9/7/2012)
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...
September 10, 2012 at 7:23 am
surma.sql (9/7/2012)
I need help.
I am getting an error while i am try to connect the server B from server A. so please help me for this,
I take screenshot so...
September 7, 2012 at 3:37 pm
There are probably a number of things that can be done. However we don't have enough details to even hazard a guess.
Take a look at this article. http://www.sqlservercentral.com/articles/SQLServerCentral/66909/%5B/url%5D
It does a...
September 7, 2012 at 3:32 pm
Andrew-495157 (9/7/2012)
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 =...
September 7, 2012 at 2:55 pm
I can not only replicate this I can explain why it is happening. It is a bit strange but is further proof that implicit conversions should be avoided. When selecting...
September 7, 2012 at 1:43 pm
Andrew-495157 (9/7/2012)
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...
September 7, 2012 at 1:06 pm
Luis Cazares (9/7/2012)
SELECTCAST( GETDATE() AS DATE),
DATEADD( DD,DATEDIFF(DD, 0, GETDATE()),0)
If you just need dates with no time, you should store them that way and even with...
September 7, 2012 at 11:16 am
Andrew-495157 (9/7/2012)
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...
September 7, 2012 at 11:12 am
You do this with some pretty simple date math. Just use the beginning of the day when comparing.
See this article from Lynn about some common datetime routines. http://www.sqlservercentral.com/blogs/lynnpettis/2009/03/25/some-common-date-routines/%5B/url%5D
September 7, 2012 at 11:03 am
Andrew-495157 (9/7/2012)
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...
September 7, 2012 at 10:59 am
I think is the one Lynn was thinking of.
http://msdn.microsoft.com/en-us/library/ms190309.aspx
Implicit conversions, which is what you have when datatypes don't match (like int and varchar) will always attempt to use the higher...
September 7, 2012 at 10:53 am
vinay.varaala (9/7/2012)
this is the querywhere Simmons_PanelID=5479 AND convert(Date,Reading_Date,103)='2012-09-05'
Your where clause has rendered this nonSARGable. You don't need to convert your date to a formatted date string for this...
September 7, 2012 at 9:02 am
ChrisM@Work (9/7/2012)
sqlnaive (9/7/2012)
For such kind of reasons we should avoid float and real datatypes ? And rather use decimal and numeric ?
Have a look in BOL under CONVERT to see...
September 7, 2012 at 8:38 am
Hi and welcome to SSC.
This can certainly be done but in order to help you need to first help us. You will need to post ddl (create table scripts),...
September 7, 2012 at 8:09 am
bitbucket-25253 (9/7/2012)
SQL* (9/7/2012)
Hi All,I have posted the question in General discussion, but i did not find any answer so i am posting her:
thanks
Clicking on the above link returned 111...
September 7, 2012 at 7:35 am
Viewing 15 posts - 10,786 through 10,800 (of 15,381 total)