Viewing 15 posts - 436 through 450 (of 475 total)
This may do what you require?;with origQry as (
select A.CurrentLine,A.MappingLine,A.SourceLine,
A.Amount as AmountA,
B.Amount as AmountB,
A.RowNumber as RowNbrA, B.RowNumber as RowNbrB,
(A.Amount-B.Amount) as [Difrence (AmountA - AmountB)]
from [dbo].[AmountTable] A
Inner join [dbo].[AmountTable] B
on B.RowNumber...
November 21, 2012 at 11:42 am
Personally I would use Perl or something like that to pre-format the file before trying to load it.
eg
#open files for input and output
open (IN,"<undelimited.txt") || die ("Failed to open input");
open...
November 20, 2012 at 12:17 pm
Assuming that there are rules for each of the Employee groups
You create a rule table
CREATE TABLE [dbo].[EmployeePermsRules] (
[EmployeeGroup] [varchar](50) NOT NULL,
[System1] [varchar](1) NULL,
[System2] [varchar](1) NULL,
[System3] [varchar](1) NULL
)
INSERT [dbo].[EmployeePermsRules] ([EmployeeGroup], [System1],...
November 19, 2012 at 4:25 pm
Hi Darrin
Try the following
SELECT geometrycolumn.STBuffer(5000).STEnvelope()
FROM spatialtable
This will only work with Geometries not Geographies. I could probably come up with something to do a rough extent on a geography if...
November 19, 2012 at 3:24 pm
bochambers (11/18/2012)
November 18, 2012 at 8:11 pm
bitbucket-25253 (11/18/2012)
Unfortunately the cited reference for the correct answers does NOT or I could not find the "tie breaking rule" in that reference. Any one have better luck ?
Nope...
November 18, 2012 at 11:26 am
dwain.c (11/15/2012)
It occurred to me on lookback that this is going to fail if #Companies has more than one column or that column has a data type that is incompatible...
November 16, 2012 at 1:02 pm
It's a bit ugly ... but you could do something like
;with companyNotNull as (
SELECT * FROM #Companies WHERE CompanyID = @CompanyID
),
companyNull as (
Select CompanyID FROM #CompanyGroups WHERE CompanyGroupID = @CompanyGroupID
)
SELECT...
November 15, 2012 at 8:22 pm
This is probably way off base ... but is there something external to the database getting in the way? For example an over enthusiastic virus checker.
November 15, 2012 at 12:05 am
capnhector (11/12/2012)
nope he handles the leading "," with the initial ISNULL. the OP does not initialize the @columns variable so NULL + ',SOMETHING' is NULL and the ISNULL function...
November 12, 2012 at 3:44 pm
michielbijnen (11/12/2012)
There is a comma! As far as I know the syntax is correct for the columns variable. Or not?
As an example
select 'Count IsPrimary', [0], [1]
from (select isprimary, blockid from...
November 12, 2012 at 3:28 pm
Hi
You may want to check you @columns variable. It could have a comma at the beginning
November 12, 2012 at 2:41 pm
Hi
The issue here is that you are using Geometry for your points rather than Geography. Geometry treats the uses a flat projection and essentially ignores the SRID information, whereas...
November 12, 2012 at 2:37 pm
If I've understood your requirements properly the following should do what you require
create table #test (
market_name varchar(6),
market_project varchar(25),
ovp_amt decimal(10,2),
dashboard_status_level int,
project_level int
)
insert into #test
values
('AUSTIN', 'AUSTIN-T6-2011-03157', 125.00, 3, null),
('AUSTIN', 'AUSTIN-T6-2011-03157', 137.00, 2,...
November 11, 2012 at 11:57 am
I got similar results to Dwain
MAXDOP 0 ( 8 cores )
CrossTab2548
CrossTab CTE2559
Pivot7095CrossTabs
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob...
November 5, 2012 at 8:01 pm
Viewing 15 posts - 436 through 450 (of 475 total)