Click here to Skip to main content
15,905,071 members
Home / Discussions / Database
   

Database

 
Questionplsql Pin
Member 1118871528-Oct-14 21:28
Member 1118871528-Oct-14 21:28 
AnswerRe: plsql Pin
Mycroft Holmes28-Oct-14 22:03
professionalMycroft Holmes28-Oct-14 22:03 
GeneralRe: plsql Pin
PhilLenoir29-Oct-14 3:04
professionalPhilLenoir29-Oct-14 3:04 
RantRetrieve Data Using Comma Separated List Pin
ASPnoob28-Oct-14 20:10
ASPnoob28-Oct-14 20:10 
GeneralRe: Retrieve Data Using Comma Separated List Pin
Mycroft Holmes28-Oct-14 22:01
professionalMycroft Holmes28-Oct-14 22:01 
GeneralRe: Retrieve Data Using Comma Separated List Pin
Shweta N Mishra29-Oct-14 1:23
professionalShweta N Mishra29-Oct-14 1:23 
GeneralRe: Retrieve Data Using Comma Separated List Pin
Mycroft Holmes29-Oct-14 3:13
professionalMycroft Holmes29-Oct-14 3:13 
QuestionAdvice on Perfomance Turning of the Query Pin
Vimalsoft(Pty) Ltd28-Oct-14 7:27
professionalVimalsoft(Pty) Ltd28-Oct-14 7:27 
hi guys

I need some advice , i have a Query that runs very long because of the following lines of Code , i know you dont understand my data or table structure , you can just advice on a High Level


   ( CASE WHEN ( SELECT TOP 1
                      ATTRIB_CODE
            FROM      SDE.[NOTIFICATION] WITH ( NOLOCK )
            WHERE     ( LIS_KEY COLLATE SQL_Latin1_General_CP1_CI_AS = LP.LIS_KEY COLLATE SQL_Latin1_General_CP1_CI_AS
                        AND FUNCTION_KEY COLLATE SQL_Latin1_General_CP1_CI_AS = V.FUNCTION_KEY COLLATE SQL_Latin1_General_CP1_CI_AS
                      )
                      AND ARCHIVE_DATE IS NULL
          ) LIKE '00090009%'
     THEN ( SELECT TOP 1
                      ATTRIB_CODE COLLATE SQL_Latin1_General_CP1_CI_AS
            FROM      SDE.[NOTIFICATION] N WITH ( NOLOCK )
            WHERE     N.ARCHIVE_DATE IS NULL
                      AND N.FUNCTION_KEY COLLATE SQL_Latin1_General_CP1_CI_AS = V.FUNCTION_KEY COLLATE SQL_Latin1_General_CP1_CI_AS
                      AND N.LIS_KEY  COLLATE SQL_Latin1_General_CP1_CI_AS = V.LIS_KEY COLLATE SQL_Latin1_General_CP1_CI_AS
                      AND N.ATTRIB_CODE LIKE '00090009%'
                      AND N.ARCHIVE_DATE IS NULL
                      AND V.ARCHIVE_DATE IS NULL
          )
     ELSE ISNULL(( SELECT TOP 1
                          ATTRIBUTE_CODE
                   FROM   SDE.VALUATION WITH ( NOLOCK )
                   WHERE  ( LIS_KEY COLLATE SQL_Latin1_General_CP1_CI_AS = V.LIS_KEY COLLATE SQL_Latin1_General_CP1_CI_AS
                            AND FUNCTION_KEY COLLATE SQL_Latin1_General_CP1_CI_AS = V.FUNCTION_KEY COLLATE SQL_Latin1_General_CP1_CI_AS
                          )
                          AND VAL_STATUS_ID = 2
                          AND ARCHIVE_DATE IS NULL
                 ), '')
END ) AS ATTRIBUTE_CODE ,

thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com

GeneralRe: Advice on Perfomance Turning of the Query Pin
PIEBALDconsult28-Oct-14 8:04
mvePIEBALDconsult28-Oct-14 8:04 
AnswerRe: Advice on Perfomance Turning of the Query Pin
Eddy Vluggen28-Oct-14 8:59
professionalEddy Vluggen28-Oct-14 8:59 
AnswerRe: Advice on Perfomance Turning of the Query Pin
Mycroft Holmes28-Oct-14 12:59
professionalMycroft Holmes28-Oct-14 12:59 
GeneralRe: Advice on Perfomance Turning of the Query Pin
Vimalsoft(Pty) Ltd4-Nov-14 21:56
professionalVimalsoft(Pty) Ltd4-Nov-14 21:56 
QuestionCombine results from 2 foxpro DBF files using union Pin
jkirkerx27-Oct-14 12:30
professionaljkirkerx27-Oct-14 12:30 
AnswerMakes no sense how it works Pin
jkirkerx27-Oct-14 13:01
professionaljkirkerx27-Oct-14 13:01 
QuestionSelect count on 2 DBF files Pin
jkirkerx27-Oct-14 11:11
professionaljkirkerx27-Oct-14 11:11 
GeneralRe: Select count on 2 DBF files Pin
PIEBALDconsult27-Oct-14 11:25
mvePIEBALDconsult27-Oct-14 11:25 
GeneralRe: Select count on 2 DBF files Pin
jkirkerx27-Oct-14 12:23
professionaljkirkerx27-Oct-14 12:23 
QuestionRewrit a Scalar function to a table valued function Pin
Ambertje21-Oct-14 0:00
Ambertje21-Oct-14 0:00 
AnswerRe: Rewrit a Scalar function to a table valued function Pin
Mycroft Holmes21-Oct-14 0:25
professionalMycroft Holmes21-Oct-14 0:25 
GeneralRe: Rewrit a Scalar function to a table valued function Pin
Ambertje21-Oct-14 1:40
Ambertje21-Oct-14 1:40 
GeneralRe: Rewrit a Scalar function to a table valued function Pin
Richard Deeming21-Oct-14 2:00
mveRichard Deeming21-Oct-14 2:00 
GeneralRe: Rewrit a Scalar function to a table valued function Pin
Ambertje21-Oct-14 2:25
Ambertje21-Oct-14 2:25 
GeneralRe: Rewrit a Scalar function to a table valued function Pin
Mycroft Holmes21-Oct-14 12:52
professionalMycroft Holmes21-Oct-14 12:52 
SuggestionRe: Rewrit a Scalar function to a table valued function Pin
Richard Deeming21-Oct-14 1:55
mveRichard Deeming21-Oct-14 1:55 
AnswerRe: Rewrit a Scalar function to a table valued function Pin
Eddy Vluggen21-Oct-14 2:33
professionalEddy Vluggen21-Oct-14 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.