Viewing 15 posts - 91 through 105 (of 135 total)
Found some things and put them together to get this,
work in progress but promising
DECLARE @TestNum float
SET @TestNum = 99.001 --0.123456780000000 --99.1 --90
select Case when (CHARINDEX('.',REVERSE(@TestNum))-PATINDEX('%[^0]%',REVERSE(@TestNum))) >...
July 21, 2010 at 8:39 am
Sorry,
when I run these I get
10.1
and
10.8
when really I would like
10.08
and
10.8
Many Thanks for your help,
Oliver
July 20, 2010 at 5:25 am
Sorry, thats what I did try. Did you mean to change the two lines.
Many Thanks,
Oliver
July 20, 2010 at 5:13 am
Hi,
Thanks for the reply using numeric
SELECT CAST(10.086 AS NUMERIC(20 , 2))
SELECT CAST (10.8 AS NUMERIC(20 , 2))
returns
10.09
and 10.80 - but I would like it to report 10.8 because otherwise...
July 20, 2010 at 4:54 am
See below.
Thanks for your help
CREATE TABLE [dbo].[SPATIAL_USGS_PROVINCE](
[OBJECT_ID] [int] IDENTITY(1,1) NOT NULL,
[numeric](25, 5) NULL,
[PERIMETER] [numeric](25, 5) NULL,
[WEP_PRVG_] [numeric](11, 0) NULL,
[WEP_PRVG_I] [numeric](11, 0) NULL,
[int] NULL,
[NAME] [varchar](50) NULL,
[TYPE] [varchar](2) NULL,
[REG] [smallint]...
July 9, 2010 at 7:50 am
Hi,
Yes I would be very interested to see what function you have developed. I am trying to find out what polygon the lat long point lies in for thousands of...
July 9, 2010 at 7:33 am
Hi,
Thank you for your continued support. I already have Alastair's superb book.
I have attached the 3 execution plans to for the 3 queries in your post. They all use the...
July 9, 2010 at 2:47 am
Sorry for the incorrect execution plans, I was running a query which included the function.
The core part of my scalar function is
DECLARE @intersect nvarchar(255)
declare @fet geometry
declare @longitude float
declare @latitude float
set...
July 8, 2010 at 10:00 am
Hi,
Thanks for the reply I have put the code into the modified trigger as below
ALTER FUNCTION [dbo].[GET_USGS_PROVINCE]
(@latitude float, @longitude float)
RETURNS nvarchar(255)
AS
BEGIN
-- Declare the return variable here
DECLARE @intersect nvarchar(255)
declare @fet geometry
--...
July 8, 2010 at 6:15 am
Hi thank you for your continued help with this.
I added the trigger and got an error trying to run it, it still looks like I cant reference a vairable outside...
July 8, 2010 at 5:18 am
Hi,
Many thanks for the response.
I have uploaded two sql plans one before rebuilding the spatial index on after.
For 500 rows it took 1min 40secs
Currently running SP1 SQL Server Standard.
Thanks for...
July 8, 2010 at 3:09 am
Thank you very much for taking the time to work on this I really appreciate it.
I added you code and when I try to run it I get this error
Msg...
July 7, 2010 at 7:44 am
Hi thanks for the reply,
yes this does work, the only issue with this is that I only want it to delete records that I have deleted in the table, not...
July 6, 2010 at 8:35 am
Also I have tried with this slight code change.
But get error:
Msg 5334, Level 16, State 2, Procedure POP_HEADER_LOGS, Line 108
The identifier 'deleted.PK_INDEX' cannot be bound. Only target columns are allowed...
July 6, 2010 at 7:47 am
Thanks for your comments.
The issue I am having with this is that when I append many rows to the table with the trigger on I recieve and error, however when...
July 5, 2010 at 11:54 am
Viewing 15 posts - 91 through 105 (of 135 total)