Viewing 15 posts - 271 through 285 (of 375 total)
Thanks everybody for an educational and fun to watch discussion. I am not in the banking business but I will 'store' the functions provided in my 'treasure chest' because one...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
June 2, 2007 at 6:25 am
Try this example:
DECLARE @dThird DECIMAL(12,6)
DECLARE @d99 DECIMAL(12,6)
DECLARE @fThird FLOAT
DECLARE @f99 FLOAT
SET @dThird = 0.33
SET @fThird = 0.33
SET @d99 = 3 * @dThird
SET @f99 = 3 * @fThird
SELECT @d99...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
June 1, 2007 at 9:05 am
You may have problems with the trailing spaces if your MyField is CHAR datatype not VARCHAR. In this case try using RTRIM(MyField) LIKE '% %'.
This should help.
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 30, 2007 at 12:05 pm
I found out that the routine provided by Aaron does not always return all the SPs where the specific column name is mentioned so you might want to try this....
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 30, 2007 at 10:08 am
It looks like you don't use the Sum(IsNull(fd.synonymID, 0)) as drugID_count in the SELECT so I would remove it.
Then you could try to replace the having Sum(IsNull(fd.synonymID, 0)) = 0
with having Sum(IsNull(CAST(CAST(fd.synonymID...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 30, 2007 at 9:49 am
PS.
By the way, I do understand this is mostly an academic discussion because the selection of specific data types for storage and calculations depends on the particular case you...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 30, 2007 at 7:36 am
CREATE TABLE #tempdates
(
TempYear CHAR(4),
TempMonth VARCHAR(15)
)
declare @year char(4)
set @year = '2007'
declare @dat datetime
set @dat='1/1/'+@year +''
declare @i int
set @i=0
while @i<=11
begin
INSERT INTO #tempdates
(
TempYear,
TempMonth
)
select
datepart(yy,@dat )as Year,DATENAME (...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 30, 2007 at 7:25 am
I am still not completely convinced. There is no way you could get the 1.000000000000000000000001 into a float. There is not enough precision. The float is very good at dealing...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 30, 2007 at 7:21 am
Jeff, I think you misunderstood my post.
The undocumented (and I don't think it is documented) feature is the usage of SELECT into varable when you do the query that processes...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 25, 2007 at 7:27 am
COUNT
If you inclined to scratch your left ear using your right hand going over top of your head.
![]()
And funny part is that if...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 25, 2007 at 7:16 am
Sorry but I did not read your original post too carefully and did not realize your major objective was to make sure the index is used during your query.
I kind...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 25, 2007 at 7:08 am
Try this
SELECT
a.Desc
FROM TableA
INNER JOIN TableB ON b.field7 = CASE
WHEN ISNUMERIC(A.ID) = 1 THEN A.ID
ELSE NULL
END
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 24, 2007 at 5:33 pm
I am sorry but I tend not to agree with Sergiy on the precision. Where did you get the 14 digits precision of the decimals? Look at the following code and...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 24, 2007 at 8:57 am
The trick we use to get the data the way we want is to do the calculations using the FLOAT but store the final ( or intermitent - if we...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 24, 2007 at 8:32 am
I don't know about any specific articles I could point you to. I think I kind of deducted this myself based on what I know about the way the server...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
May 24, 2007 at 8:00 am
Viewing 15 posts - 271 through 285 (of 375 total)