Viewing 15 posts - 11,476 through 11,490 (of 15,381 total)
3935 (6/27/2012)
Still getting error in SSSS (Invoice format)
This is like taking your car to the shop and telling the mechanic, "My car doesn't work" and expecting them to know what...
June 27, 2012 at 10:41 am
I figured it was a stripped down version but yes you have to use if type logic for this. CASE is not used as a control block like a switch...
June 27, 2012 at 10:39 am
No that is not how case works in sql. You need to use an IF - ELSE construct.
And You should read up on sql injection. Your procedure is wide open.
June 27, 2012 at 9:25 am
I had someone tell me that the WITH (NOLOCK) was their company standard.:w00t:
Did you start launching pork chops at them immediately? Somebody really needs to educate that company on what...
June 27, 2012 at 9:22 am
You need to provide a few more details before anybody can be much help here. You will need to concatenate some strings but I couldn't begin to provide the syntax....
June 27, 2012 at 7:29 am
Here is an example based off the OP's criteria.
declare @GuidToFind uniqueidentifier = newid()
;with Derived (Line_GUID, Diameter, begin_measure, end_measure)
as
(
select @GuidToFind, 5, 108394, 24819570 union all
select @GuidToFind, 10, 45839290, 509589373
),
Guids(SomeValue, MyGuid)
as
(
select 1,...
June 26, 2012 at 10:24 am
--note about apply above--
If you wanted it to function more like a left join to either the function or the inline you could change the cross apply to an outer...
June 26, 2012 at 10:22 am
Here is another way that does your function logic inline.
SELECT PS.LineGUID AS LINE_GUID
,PS.PODSID
,PS.SystemName
,PS.LineNumber
,PS.LineName
,PS.RegulatoryTypes
,PS.OperatingStatus
,PS.Jurisdiction
,PS.Mileage
,PS.Operator
,PS.ProductTypes
,
--DerivedAsset.dbo.Get_PredominantDiameter(PS.LineGUID) as PredominantDiameter
d.Diameter
FROM DerivedAsset.dbo.PipelineSummaryMaster PS
CROSS APPLY (
SELECT TOP 1 Diameter
FROM DERIVEDASSET.DBO.EU_DIAMETER EU
WHERE EU.line_GUid = PS.LineGuid
GROUP BY Diameter
ORDER BY...
June 26, 2012 at 10:16 am
Robert.Sterbal (6/26/2012)
June 26, 2012 at 9:27 am
anush_tar (6/26/2012)
P.S. IDENT_CURRENT() , Scope_Identity() , @@Identity work wrong when several people work parallel.
What do you mean they work wrong??? The don't work wrong but each of them does...
June 26, 2012 at 9:13 am
Robert.Sterbal (6/26/2012)
I guess I'm trying to figure out where to spend my time going forward. Please add to the list as needed
I guess that depends on what you want to...
June 26, 2012 at 9:06 am
WOW that really stinks!!! Wish there was a way to recoup the poor influence. Maybe Amazon will be able to...
June 26, 2012 at 9:00 am
You will have to use dynamic sql for this and add the database to each object you are querying.
June 26, 2012 at 7:55 am
http://poorsql.com is a free online one that seems to work fairly well.
June 26, 2012 at 7:46 am
hiteshchouhan91 (6/26/2012)
column import and issue values showing me 2200 and 600
but actual total of these column is 1100 and 300 respectively
i want that it should be...
June 26, 2012 at 7:42 am
Viewing 15 posts - 11,476 through 11,490 (of 15,381 total)