Search Results

Search found 23568 results on 943 pages for 'select'.

Page 15/943 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • SQL Server Select

    - by Derek D.
    The SQL Server Select statement is the first statement used when returning data. It is the most used and most important statement in the T-SQL language. The Select statement has many different clauses. We will step through each clause further in the tutorial, however now, we will look at Select itself. The following [...]

    Read the article

  • SQL SERVER – Select the Most Optimal Backup Methods for Server

    - by pinaldave
    Backup and Restore are very interesting concepts and one should be very much with the concept if you are dealing with production database. One never knows when a natural disaster or user error will surface and the first thing everybody wants is to get back on point in time when things were all fine. Well, in this article I have attempted to answer a few of the common questions related to Backup methodology. How to Select a SQL Server Backup Type In order to select a proper SQL Server backup type, a SQL Server administrator needs to understand the difference between the major backup types clearly. Since a picture is worth a thousand words, let me offer it to you below. Select a Recovery Model First The very first question that you should ask yourself is: Can I afford to lose at least a little (15 min, 1 hour, 1 day) worth of data? Resist the temptation to save it all as it comes with the overhead – majority of businesses outside finances can actually afford to lose a bit of data. If your answer is YES, I can afford to lose some data – select a SIMPLE (default) recovery model in the properties of your database, otherwise you need to select a FULL recovery model. The additional advantage of the Full recovery model is that it allows you to restore the data to a specific point in time vs to only last backup time in the Simple recovery model, but it exceeds the scope of this article Backups in SIMPLE Recovery Model In SIMPLE recovery model you can select to do just Full backups or Full + Differential. Full Backup This is the simplest type of backup that contains all information needed to restore the database and should be your first choice. It is often sufficient for small databases, but note that it makes a big impact on the performance of your database Full + Differential Backup After Full, Differential backup picks up all of the changes since the last Full backup. This means if you made Full, Diff, Diff backup – the last Diff backup contains all of the changes and you don’t need the previous Differential backup. Differential backup is obviously smaller and carries less performance overhead Backups in FULL Recovery Model In FULL recovery model you can select Full + Transaction Log or Full + Differential + Transaction Log backup. You have to create Transaction Log backup, because at that time the log is being truncated. Otherwise your Transaction Log will grow uncontrollably. Full + Transaction Log Backup You would always need to perform a Full backup first. Then a series of Transaction log backup. Note that (in contrast to Differential) you need ALL transactions to log since the last Full of Diff backup to properly restore. Transaction log backups have the smallest performance overhead and can be performed often. Full + Differential + Transaction Log Backup If you want to ease the performance overhead on your server, you can replace some of the Full backup in the previous scenario with Differential. You restore scenario would start from Full, then the Last Differential, then all of the remaining transactions log backups Typical backup Scenarios You may say “Well, it is all nice – give me the examples now”. As you may already know, my favorite SQL backup software is SQLBackupAndFTP. If you go to Advanced Backup Schedule form in this program and click “Load a typical backup plan…” link, it will give you these scenarios that I think are quite common – see the image below. The Simplest Way to Schedule SQL Backups I hate to repeat myself, but backup scheduling in SQL agent leaves a lot to be desired. I do not know the simple way to schedule your SQL server backups than in SQLBackupAndFTP – see the image below. The whole backup scheduling with compression, encryption and upload to a Network Folder / HDD / NAS Drive / FTP / Dropbox / Google Drive / Amazon S3 takes just a few minutes – see my previous post for the review. Final Words This post offered an explanation for major backup types only. For more complicated scenarios or to research other options as usually go to MSDN. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Backup and Restore, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Select comma separated result from via comma separated parameter

    - by Rodney Vinyard
    Select comma separated result from via comma separated parameter PROCEDURE [dbo].[GetCommaSepStringsByCommaSepNumericIds] (@CommaSepNumericIds varchar(max))   AS   BEGIN   /* exec GetCommaSepStringsByCommaSepNumericIds '1xx1, 1xx2, 1xx3' */ DECLARE @returnCommaSepIds varchar(max); with cte as ( select distinct Left(qc.myString, 1) + '-' + substring(qc.myString, 2, 9) + '-' + substring(qc.myString, 11, 7) as myString from q_CoaRequestCompound qc               JOIN               dbo.SplitStringToNumberTable(@CommaSepNumericIds) AS s               ON               qc.q_CoaRequestId = s.ID where SUBSTRING(upper(myString), 1, 1) in('L', '?') ) SELECT @returnCommaSepIds = COALESCE(@returnCommaSepIds + ''',''', '''') + CAST(myString AS varchar(2x)) FROM cte;   set @returnCommaSepIds = @returnCommaSepIds + '''' SELECT @returnCommaSepIds   End   FUNCTION [dbo].[SplitStringToNumberTable] (        @commaSeparatedList varchar(max) ) RETURNS @outTable table (        ID int ) AS BEGIN        DECLARE @parsedItem varchar(10), @Pos int          SET @commaSeparatedList = LTRIM(RTRIM(@commaSeparatedList))+ ','        SET @commaSeparatedList = REPLACE(@commaSeparatedList, ' ', '')        SET @Pos = CHARINDEX(',', @commaSeparatedList, 1)          IF REPLACE(@commaSeparatedList, ',', '') <> ''        BEGIN               WHILE @Pos > 0               BEGIN                      SET @parsedItem = LTRIM(RTRIM(LEFT(@commaSeparatedList, @Pos - 1)))                      IF @parsedItem <> ''                            BEGIN                                   INSERT INTO @outTable(ID)                                   VALUES (CAST(@parsedItem AS int)) --Use Appropriate conversion                            END                            SET @commaSeparatedList = RIGHT(@commaSeparatedList, LEN(@commaSeparatedList) - @Pos)                            SET @Pos = CHARINDEX(',', @commaSeparatedList, 1)               END        END           RETURN END

    Read the article

  • Sub-Select to Delimited List in T-SQL

    - by Doug Lampe
    The following transact-SQL statement can be used with Microsoft SQL Server to create a delimited list from a sub-query.  In this case the delimiter is a comma. SELECT Left(item,LEN(item)-1)as delimited_list FROM (     select       CAST       (          (               select original_item + ','               from TABLE             where condition_field = 'value'             for xml path ('')           )   as varchar(max)      ) as item ) as temp

    Read the article

  • query to select topic with highest number of comment +support+oppose+views

    - by chetan
    table schema title description desid replyto support oppose views browser used a1 none 1 1 12 - bad topic b2 1 2 3 14 sql database a3 none 4 5 34 - crome b4 1 3 4 12 Topic desid starts with a and comment desid starts with b .For comment replyto is the desid of topic . Its easy to select * with highest number of support+oppose+views by query "select * from [DB_user1212].[dbo].[discussions] where desid like 'a%' order by (sup+opp+visited) desc" For highest (comment +support+oppose+views ) i tried "select * from [DB_user1212].[dbo].[discussions] where desid like 'a%' order by ((select count(*) from [DB_user1212].[dbo].[discussions] where replyto = desid )+sup+opp+visited) desc" but it didn't work . Because its not possible to send desid from outer query to innner subquery .

    Read the article

  • Using Alt-select in SSMS, Word, and elsewhere

    - by John Paul Cook
    A surprising number of database people and Windows users in general don’t know about Alt select . This is a Windows technique not unique to SSMS that allows a user to select an arbitrary rectangular region of text and delete it, cut it, or copy it. Where I find Alt select particularly useful in SSMS is when I have a bunch of inline comments that are too far to the right. I want to delete much of the whitespace in front of them to move them to the left without disturbing any of the rest of the T-SQL....(read more)

    Read the article

  • How to link jQuery UI datepicker functionality with a select list

    - by take2
    I'm trying to connect jQuery UI's datepicker with a select list. I have found one explanation on jQuery's Forum ( forum.jquery.com/topic/jquery-ui-datepicker-with-select-lists), but I can't get it working. There are input and select list both declared: <select id="selectMonth"><option value="01">Jan</option><option value="02">Feb</option> <option value="03">Mar</option><option value="04">Apr</option>...</select> <select id="selectDay"><option value="01">1</option><option value="02">2</option> <option value="03">3</option><option value="04">4</option>...</select> <select id="selectYear"><option value="2012">2012</option><option value="2013">2013</option> <option value="2014">2014</option>...</select> <p>Date: <input type="text" id="selectedDatepicker" /></p> This is the script: $(function() { $('#selectedDatepicker').datepicker({ beforeShow: readSelected, onSelect: updateSelected, minDate: new Date(2012, 1 - 1, 1), maxDate: new Date(2014, 12 - 1, 31), showOn: 'both', buttonImageOnly: true, buttonImage: 'img/calendar.gif'}); // Prepare to show a date picker linked to three select controls function readSelected() { $('#selectedDatepicker').val($('#selectMonth').val() + '/' + $('#selectDay').val() + '/' + $('#selectYear').val()); return {}; } // Update three select controls to match a date picker selection function updateSelected(date) { $('#selectMonth').val(date.substring(0, 2)); $('#selectDay').val(date.substring(3, 5)); $('#selectYear').val(date.substring(6, 10)); } }); And here is the fiddle: http://jsfiddle.net/xKXZm/ They are not connected properly, the only "connected behaviour" is that when you click on the input button, it picks up the value of the select list. On the other hand, the select list never picks up the value of the input nor will the input pick up the value of the select list until you click on it.

    Read the article

  • Merge functionality of two xsl files into a single file (continued.....)

    - by anuamb
    This is in continuation of my question: Merge functionality of two xsl files into a single file (not a xsl import or include issue) I have to merge the solution (xsl) of above question to below xsl: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/"> <Declaration> <Message> <Meduim> <xsl:value-of select="/Declaration/Message/Meduim"/> </Meduim> <MessageIdentifier> <xsl:value-of select="/Declaration/Message/MessageIdentifier"/> </MessageIdentifier> <ControlingAgencyCode> <xsl:value-of select="/Declaration/Message/ControlingAgencyCode"/> </ControlingAgencyCode> <AssociationAssignedCode> <xsl:value-of select="/Declaration/Message/AssociationAssignedCode"/> </AssociationAssignedCode> <CommonAccessReference> <xsl:value-of select="/Declaration/Message/CommonAccessReference"/> </CommonAccessReference> </Message> <BeginingOfMessage> <MessageCode> <xsl:value-of select="/Declaration/BeginingOfMessage/MessageCode"/> </MessageCode> <DeclarationCurrency> <xsl:value-of select="/Declaration/BeginingOfMessage/DeclarationCurrency"/> </DeclarationCurrency> <MessageFunction> <xsl:value-of select="/Declaration/BeginingOfMessage/MessageFunction"/> </MessageFunction> </BeginingOfMessage> <Header> <ProcessingInformation> <xsl:for-each select="/Declaration/Header/ProcessingInformation/ProcessingInstructions"> <ProcessingInstructions> <xsl:value-of select="."/> </ProcessingInstructions> </xsl:for-each> </ProcessingInformation> <xsl:for-each select="/Declaration/Header/Seal"> <Seal> <SealID> <xsl:value-of select="SealID"/> </SealID> <SealLanguage> <xsl:value-of select="SealLanguage"/> </SealLanguage> </Seal> </xsl:for-each> <xsl:choose> <xsl:when test='/Declaration/Header/DeclarantsReference = ""'> <DeclarantsReference> <xsl:text disable-output-escaping="no">A</xsl:text> </DeclarantsReference> </xsl:when> <xsl:otherwise> <DeclarantsReference> <xsl:value-of select="/Declaration/Header/DeclarantsReference"/> </DeclarantsReference> </xsl:otherwise> </xsl:choose> <xsl:for-each select="/Declaration/Header/Items"> <Items> <CustomsStatusOfGoods> <CPC> <xsl:value-of select="CustomsStatusOfGoods/CPC"/> </CPC> <CommodityCode> <xsl:value-of select="CustomsStatusOfGoods/CommodityCode"/> </CommodityCode> <ECSuplementaryMeasureCode1> <xsl:value-of select="CustomsStatusOfGoods/ECSuplementaryMeasureCode1"/> </ECSuplementaryMeasureCode1> <ECSuplementaryMeasureCode2> <xsl:value-of select="CustomsStatusOfGoods/ECSuplementaryMeasureCode2"/> </ECSuplementaryMeasureCode2> <PreferenceCode> <xsl:value-of select="CustomsStatusOfGoods/PreferenceCode"/> </PreferenceCode> </CustomsStatusOfGoods> <xsl:for-each select="ItemAI"> <ItemAI> <AICode> <xsl:value-of select="AICode"/> </AICode> <AIStatement> <xsl:value-of select="AIStatement"/> </AIStatement> <AILanguage> <xsl:value-of select="AILanguage"/> </AILanguage> </ItemAI> </xsl:for-each> <Locations> <CountryOfOriginCode> <xsl:value-of select="Locations/CountryOfOriginCode"/> </CountryOfOriginCode> <xsl:for-each select="Locations/ItemCountryonRouteCode"> <ItemCountryonRouteCode> <xsl:value-of select="."/> </ItemCountryonRouteCode> </xsl:for-each> <ItemDispatchCountry> <xsl:value-of select="Locations/ItemDispatchCountry"/> </ItemDispatchCountry> <ItemDestinationCountry> <xsl:value-of select="Locations/ItemDestinationCountry"/> </ItemDestinationCountry> </Locations> <Measurements> <GrossMass> <xsl:value-of select="Measurements/GrossMass"/> </GrossMass> <NetMass> <xsl:value-of select="Measurements/NetMass"/> </NetMass> <SupplementaryUnits> <xsl:value-of select="Measurements/SupplementaryUnits"/> </SupplementaryUnits> <ThirdQuantity> <xsl:value-of select="Measurements/ThirdQuantity"/> </ThirdQuantity> </Measurements> <xsl:for-each select="Package"> <Package> <PackageNumber> <xsl:value-of select="PackageNumber"/> </PackageNumber> <PackageKind> <xsl:value-of select="PackageKind"/> </PackageKind> <PackageMarks> <xsl:value-of select="PackageMarks"/> </PackageMarks> <PackageLanguage> <xsl:value-of select="PackageLanguage"/> </PackageLanguage> </Package> </xsl:for-each> <PriceValue> <ItemStatisticalValue> <xsl:value-of select="PriceValue/ItemStatisticalValue"/> </ItemStatisticalValue> <ItemPrice> <xsl:value-of select="PriceValue/ItemPrice"/> </ItemPrice> </PriceValue> <ItemReferences> <xsl:for-each select="ItemReferences/ContainerID"> <ContainerID> <xsl:value-of select="."/> </ContainerID> </xsl:for-each> <QuotaNo> <xsl:value-of select="ItemReferences/QuotaNo"/> </QuotaNo> <UNDangerousGoodsCode> <xsl:value-of select="ItemReferences/UNDangerousGoodsCode"/> </UNDangerousGoodsCode> </ItemReferences> <GoodsDescription> <GoodsDescription> <xsl:value-of select="GoodsDescription/GoodsDescription"/> </GoodsDescription> <GoodsDescriptionLanguage> <xsl:value-of select="GoodsDescription/GoodsDescriptionLanguage"/> </GoodsDescriptionLanguage> </GoodsDescription> <Documents> <xsl:for-each select="Documents/PreviousDocument"> <PreviousDocument> <PreviousDocumentKind> <xsl:value-of select="PreviousDocumentKind"/> </PreviousDocumentKind> <PreviousDocumentIdentifier> <xsl:value-of select="PreviousDocumentIdentifier"/> </PreviousDocumentIdentifier> <PreviousDocumentType> <xsl:value-of select="PreviousDocumentType"/> </PreviousDocumentType> <PreviousDocumentLanguage> <xsl:value-of select="PreviousDocumentLanguage"/> </PreviousDocumentLanguage> </PreviousDocument> </xsl:for-each> <xsl:for-each select="Documents/ItemDocument"> <ItemDocument> <DocumentCode> <xsl:value-of select="DocumentCode"/> </DocumentCode> <DocumentPart> <xsl:value-of select="DocumentPart"/> </DocumentPart> <DocumentQuantity> <xsl:value-of select="DocumentQuantity"/> </DocumentQuantity> <DocumentReason> <xsl:value-of select="DocumentReason"/> </DocumentReason> <DocumentReference> <xsl:value-of select="DocumentReference"/> </DocumentReference> <DocumentStatus> <xsl:value-of select="DocumentStatus"/> </DocumentStatus> <DocumentLanguage> <xsl:value-of select="DocumentLanguage"/> </DocumentLanguage> </ItemDocument> </xsl:for-each> </Documents> <Valuation> <ValuationMethodCode> <xsl:value-of select="Valuation/ValuationMethodCode"/> </ValuationMethodCode> <ItemValuationAdjustmentCode> <xsl:value-of select="Valuation/ItemValuationAdjustmentCode"/> </ItemValuationAdjustmentCode> <ItemValuationAdjustmentPercentage> <xsl:value-of select="Valuation/ItemValuationAdjustmentPercentage"/> </ItemValuationAdjustmentPercentage> </Valuation> <ItemTransportChargeMOP> <xsl:value-of select="ItemTransportChargeMOP"/> </ItemTransportChargeMOP> <xsl:for-each select="ItemProcessingInstructions"> <ItemProcessingInstructions> <xsl:value-of select="."/> </ItemProcessingInstructions> </xsl:for-each> </Items> </xsl:for-each> <NumberOfPackages> <xsl:value-of select="/Declaration/Header/NumberOfPackages"/> </NumberOfPackages> </Header> </Declaration> </xsl:template> </xsl:stylesheet> so for source xml <Declaration> <Message> <Meduim>#+#</Meduim> <MessageIdentifier>AA</MessageIdentifier> <CommonAccessReference></CommonAccessReference> </Message> <BeginingOfMessage> <MessageCode>ISD</MessageCode> <DeclarationCurrency></DeclarationCurrency> <MessageFunction>5</MessageFunction> </BeginingOfMessage> </Declaration> the final output is <Declaration> <Message> <Meduim></Meduim> <MessageIdentifier>AA</MessageIdentifier> </Message> <BeginingOfMessage> <MessageCode>ISD</MessageCode> <MessageFunction>5</MessageFunction> </BeginingOfMessage> </Declaration>

    Read the article

  • jQuery indexOf select box manipulation

    - by kenny99
    Hi, I'm trying to figure out how to remove options from a select box when that option has been selected in an adjacent select box. Basically the user has the option to add multiple records here via select boxes, but I want to remove the list of options available to them so that, for example, they can't enter the same value in two select boxes. When an Add More button is clicked, I fade in the next select box container. A number of select boxes have been generated by PHP and I use JS to hide them. Each select box has a unique number appended to the ID, so i want to access those select boxes which contain the string "other_pet_types", then I want to iterate through the currently visible ones and build an array of the values which have been selected, which I will then remove from the list of options in the newly displayed select box. This is what I have so far, but it's definitely not right - I can't get the initial test on the ID to work. Any pointers greatly appreciated as i realise i'm pretty wide of the mark at the moment! var vals = new Array(); //build array with currently selected options $('p.mult_entries select').each(function(){ vals += $(this).val(); }); $("p.mult_entries:hidden:first").fadeIn("slow", function() { $(this).find(('select').attr('id').indexOf('other_pet_types') > 0).each(function(){ console.log($(this).val()); //as expected prints nothing - need to iterate through the options of the above select //once i extract the correct values, iterate through new select box and use inArray to remove options where that value already exists in one of previous select boxes }); });

    Read the article

  • XSLT apply templates in different order of xml reading.

    - by David
    I am new to this, so please bear with me... If we have the following xml fragment: <docXML> <PARRAFO orden='1' tipo='parrafo'> <dato> <etiqueta>Título</etiqueta> <tipo>TextBox</tipo> <valor>¿Cuándo solicitar el consejo genético?</valor> <longitud>1500</longitud> <comentario></comentario> <enlace></enlace> <target_enlace>I</target_enlace> </dato> <dato> <etiqueta>Texto</etiqueta> <tipo>Resumen</tipo> <valor>Resumen text</valor> <longitud>8000</longitud> <comentario></comentario> <enlace></enlace> <target_enlace></target_enlace> </dato> <dato> <etiqueta>Imagen</etiqueta> <tipo>TextBox</tipo> <valor>http://url/Imagenes/7D2BE6480CF4486CA288A75932606181.jpg</valor> <longitud>1500</longitud> <comentario></comentario> <enlace></enlace> <target_enlace>I</target_enlace> </dato> </PARRAFO> <PARRAFO orden='1' tipo='parrafo'> <dato> <etiqueta>Título</etiqueta> <tipo>TextBox</tipo> <valor>TextBox text</valor> <longitud>1500</longitud> <comentario></comentario> <enlace></enlace> <target_enlace>I</target_enlace> </dato> <dato> <etiqueta>Texto</etiqueta> <tipo>Resumen</tipo> <valor>Resumen text</valor> <longitud>8000</longitud> <comentario></comentario> <enlace></enlace> <target_enlace></target_enlace> </dato> </PARRAFO> </docXML> .. I am going to apply templates to each section depending on the value of the label "etiqueta" per node "dato" in "PARRAFO" by using the following XSLT: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xsl" exclude-result-prefixes="msxsl"> <xsl:output method="html" encoding="iso-8859-1"/> <xsl:template match="/"> <xsl:variable name="xml-doc-parrafo" select="documentoXML/PARRAFO"/> <!-- PARRAFOS --> <xsl:choose> <xsl:when test="count($xml-doc-parrafo)>0"> <div class="seccion_1"> <xsl:for-each select="$xml-doc-parrafo"> <xsl:choose> <xsl:when test="self::node()[@tipo = 'parrafo']"> <div class="parrafo"> <xsl:for-each select="self::node()[@tipo = 'parrafo']/dato"> <xsl:variable name="dato" select="self::node()[@tipo = 'parrafo']/dato"/> <xsl:variable name="nextdato" select="following::dato[1]/@etiqueta"/> <xsl:choose> <xsl:when test="etiqueta = 'Título'"> <xsl:call-template name="imprimeTituloParrafo"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:when test="etiqueta = 'Subtitulo'"> <xsl:call-template name="imprimeSubtituloParrafo"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:when test="etiqueta = 'Imagen'"> <xsl:call-template name="imprimeImagenParrafo"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:when test="etiqueta = 'Pie Imagen'"> <xsl:call-template name="imprimePieImagenParrafo"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:when test="etiqueta = 'Texto'"> <xsl:call-template name="imprimeTextoParrafo"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:when test="etiqueta = 'Pie Parrafo'"> <xsl:call-template name="imprimePieParrafo"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:for-each> </div> </xsl:when> </xsl:choose> </xsl:for-each> </div> </xsl:when> <!-- si no hay resultados --> <xsl:otherwise> <br></br> <p style="text-align:center;">El documento no contiene datos.</p> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="imprimeTituloParrafo"> <xsl:param name="etiqueta"></xsl:param> <xsl:param name="valor"></xsl:param> <xsl:param name="longitud"></xsl:param> <xsl:param name="enlace"></xsl:param> <xsl:param name="target_enlace"></xsl:param> <h2 class="titulo"> <xsl:choose> <xsl:when test="string-length($enlace) > 0"> <xsl:call-template name="imprimeEnlace"> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valor"/> </xsl:otherwise> </xsl:choose> </h2> </xsl:template> <xsl:template name="imprimeSubtituloParrafo"> <xsl:param name="etiqueta"></xsl:param> <xsl:param name="valor"></xsl:param> <xsl:param name="longitud"></xsl:param> <xsl:param name="enlace"></xsl:param> <xsl:param name="target_enlace"></xsl:param> <h3 class="subtitulo"> <xsl:choose> <xsl:when test="string-length($enlace) > 0"> <xsl:call-template name="imprimeEnlace"> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valor"/> </xsl:otherwise> </xsl:choose> </h3> </xsl:template> <xsl:template name="imprimeTextoParrafo"> <xsl:param name="etiqueta"></xsl:param> <xsl:param name="valor"></xsl:param> <xsl:param name="longitud"></xsl:param> <xsl:param name="enlace"></xsl:param> <xsl:param name="target_enlace"></xsl:param> <div class="texto"> <p class="texto"> <xsl:copy-of select="$valor/node()"/> </p> </div> </xsl:template> <xsl:template name="imprimeImagenParrafo"> <xsl:param name="etiqueta"></xsl:param> <xsl:param name="valor"></xsl:param> <xsl:param name="longitud"></xsl:param> <xsl:param name="comentario"></xsl:param> <xsl:param name="enlace"></xsl:param> <xsl:param name="target_enlace"></xsl:param> <xsl:choose> <xsl:when test="string-length($enlace) = 0"> <xsl:call-template name="imprimeImagen"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <a> <xsl:choose> <xsl:when test="$target_enlace/node() = 'E'"> <xsl:attribute name="target"> <xsl:text>_blank</xsl:text> </xsl:attribute> </xsl:when> <xsl:when test="$target_enlace/node() = 'I'"> <xsl:attribute name="target"> <xsl:text>_self</xsl:text> </xsl:attribute> </xsl:when> </xsl:choose> <xsl:attribute name="href"> <xsl:value-of select="$enlace"/> </xsl:attribute> <xsl:call-template name="imprimeImagen"> <xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param> <xsl:with-param name="valor" select="valor"></xsl:with-param> <xsl:with-param name="longitud" select="longitud"></xsl:with-param> <xsl:with-param name="comentario" select="comentario"></xsl:with-param> <xsl:with-param name="enlace" select="enlace"></xsl:with-param> <xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param> </xsl:call-template> </a> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="imprimeImagen"> <xsl:param name="etiqueta"></xsl:param> <xsl:param name="valor"></xsl:param> <xsl:param name="longitud"></xsl:param> <xsl:param name="comentario"></xsl:param> <xsl:param name="enlace"></xsl:param> <xsl:param name="target_enlace"></xsl:param> <div class="imagen_pie"> <img> <xsl:attribute name="src"> <xsl:value-of select="$valor"/> </xsl:attribute> <xsl:attribute name="alt"> <xsl:value-of select="$comentario"/> </xsl:attribute> </img> </div> </xsl:template> <xsl:template name="imprimeEnlace"> <xsl:param name="valor"></xsl:param> <xsl:param name="longitud"></xsl:param> <xsl:param name="comentario"></xsl:param> <xsl:param name="enlace"></xsl:param> <xsl:param name="target_enlace"></xsl:param> <a> <xsl:choose> <xsl:when test="$target_enlace/node() = 'E'"> <xsl:attribute name="target"> <xsl:text>_blank</xsl:text> </xsl:attribute> </xsl:when> <xsl:when test="$target_enlace/node() = 'I'"> </xsl:when> <xsl:when test="$target_enlace/node() = 'D'"> </xsl:when> </xsl:choose> <xsl:attribute name="href"> <xsl:value-of select="enlace"/> </xsl:attribute> <xsl:value-of select="$valor"/> </a> </xsl:template> .... </xsl:stylesheet> I need to first apply the template image (if exists in this "PARRAFO") "Imagen" just before the text "Texto" Now apply the template text first and then the image because it is before the text node before the image as shown in xml Thanks a lot!

    Read the article

  • Porting a select loop application to Android with NDK. Design question.

    - by plaisthos
    Hi, I have an network application which uses a select loop like this: bool shutdown=false; while (!shutdown) { [do something] select(...,timeout); } THe main loop cannot work like this in an Android application anymore since the application needs to receive Intents, need to handle GUI, etc. I think I have basically three possibilities: Move the main loop to the java part of the application. Let the loop run in its own thread and somehow communicate from/to java. Screw Android <= 2.3 and use a native activity and use AInputQueue/ALooper instead of select. The first possibility is not easy since java has no select which works on fds. Simply using the select and return after each loop to java is not an elegant possibility either since that requires setting the timeout to something like 20ms to have a good response time in the java part of the program. The second probability sound nicer but I have do some communication between java and the c++/c part of the program. Things that cold work: Using a socket, kind of ugly. using native calls in the "java gui thread" and callback from native in the "c thread". Both threads need to have thread safe implementations but this is managable. I have not explored the third possibility but I think that it is not the way to go. I think I can hack something together which will work but I asking what is the best path to chose.

    Read the article

  • by jquery, set to option of html-select element selected atribude by text, not value. .

    - by loviji
    hello. I have a select element. <select class='cSelectType'> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> <option value="4">four</option> <option value="5">five</option> </select> i can by jquery set option value selected like this: $('.cSelectType option[value=4]').attr('selected', 'selected'); And select element will show "Four". By i wont something like this: $('.cSelectType option[xxx=Four]').attr('selected', 'selected'); i.e By text set selected attribute. some ideas please.

    Read the article

  • Erlang Mnesia Equivalent of SQL Select FROM WHERE Field IN (value1, value2, value3, ...)

    - by ErJab
    I have an mnesia table with fields say f1, f2, f3. Now if I were to select all the rows with the field value as V1, I would use mnesia:select and match specifications or a simple mnesia:match_object. Now I need to select all the rows which have V1, V2, V3 ... or Vn (a list of arbitrary length) as the value for field f1. In SQL I would do something like SELECT * FROM tablename WHERE f3 IN (V1, V2, V3, ... , Vn) How do I do this in mnesia?

    Read the article

  • jQuery onchange/onfocus select box to display an image?

    - by SoulieBaby
    Hi all, I need some help finding a jQuery plugin which will allow me to display an image preview from a select list of images - onfocus/onchange.. Example: <select name="image" id="image" class="inputbox" size="1"> <option value=""> - Select Image - </option> <option value="image1.jpg">image1.jpg</option> <option value="image2.jpg">image2.jpg</option> <option value="image3.jpg">image3.jpg</option> </select> <div id="imagePreview"> displays image here </div> Has anyone come across something like this? I've tried searching for it to no avail.. Thank you!

    Read the article

  • how understand one result set is subset of another in twomysql select result set ?

    - by Ehsan Khodarahmi
    Hi I've 2 mysql select statements, suppose these are my queries & their result : Statement 1 : select id from a which returns this result set : { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } Statement 2 : select id from b which returns this result set : { 3, 5, 10 } I want to write a query which determines whether resultset1 contains all records of resultset2 or not. I think needs a simple query, any suggestion ???

    Read the article

  • Dependent Dropdowns (Linked Selects) with single class (no other selectors)

    - by AJ
    I am trying to create multiple dependent dropdowns (selects) with a unique way. I want to restrict the use of selectors and want to achieve this by using a single class selectors on all SELECTs; by figuring out the SELECT that was changed by its index. Hence, the SELECT[i] that changed will change the SELECT[i+1] only (and not the previous ones like SELECT[i-1]). For html like this: <select class="someclass"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> <select class="someclass"> </select> <select class="someclass"> </select> where the SELECTs other than the first one will get something via AJAX. I see that the following Javascript gives me correct value of the correct SELECT and the value of i also corresponds to the correct SELECT. $(function() { $(".someclass").each(function(i) { $(this).change(function(x) { alert($(this).val() + i); }); }); }); Please note that I really want the minimum selector approach. I just cannot wrap my head around on how to approach this. Should I use Arrays? Like store all the SELECTS in an Array first and then select those? I believe that since the above code already passes the index i, there should be a way without Arrays also. Thanks a bunch. AJ

    Read the article

  • when using javascript how do you use select form to do if else statements?

    - by Nelson
    How do you take a value of an option in a select form and use it for a if else statement? for example if apple is selected as an option then write to the document how to make applesauce but orange is selected then write how to make orange? so far I have a basic form and select options and I know how to do the document.write but I dont know how to use a select form with if else thanks for the help

    Read the article

  • Dependent Dropdowns with single class element

    - by AJ
    I am trying to create multiple dependent dropdowns (selects) with a unique way. I want to restrict the use of selectors and want to achieve this by using a single class selectors on all SELECTs; by figuring out the SELECT that was changed by its index. Hence, the SELECT[i] that changed will change the SELECT[i+1] only (and not the previous ones like SELECT[i-1]). For html like this: <select class="someclass"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> <select class="someclass"> </select> <select class="someclass"> </select> where the SELECTs other than the first one will get something via AJAX. I see that the following Javascript gives me correct value of the correct SELECT and the value of i also corresponds to the correct SELECT. $(function() { $(".someclass").each(function(i) { $(this).change(function(x) { alert($(this).val() + i); }); }); }); Please note that I really want the minimum selector approach. I just cannot wrap my head around on how to approach this. Should I use Arrays? Like store all the SELECTS in an Array first and then select those? I believe that since the above code already passes the index i, there should be a way without Arrays also. Thanks a bunch. AJ

    Read the article

  • How do I conditionally select a field from one of two tables?

    - by freakwincy
    I have two tables invoices and pending_payments both of which have the following rows in common: invoice_id and balance. I want to do a select in MySQL that'll work thus: [pseudo-code] if(invoice_id exists in pending_payments table) { select balance from pending_payments where invoice_id = yadayadayada } else { select balance from invoices where invoice_id = yadayadayada } Is this even doable in MySQL? If so, how?

    Read the article

  • is NATURAL JOIN any better than SELECT FROM WHERE in terms of performance ?

    - by ashy_32bit
    Today I got into a debate with my project manager about Cartesian products. He says a 'natural join' is somehow much better than using 'select from where' because the later cause the db engine to internally perform a Cartesian product but the former uses another approach that prevents this. As far as I know, the natural join syntax is not any different in anyway than 'select from where' in terms of performance or meaning, I mean you can use either based on your taste. SELECT * FROM table1,table2 WHERE table1.id=table2.id SELECT * FROM table1 NATURAL JOIN table2 please elaborate about the first query causing a Cartesian product but the second one being somehow more smart

    Read the article

  • When using SELECT can you modify the value of a returned field based on other fields?

    - by user570759
    When using MySQL SELECT can you change the value of a returned field based on other fields? For example, if I have this select: SELECT city,state,country FROM table Now if city is empty AND state is empty, I want the value of country to returned empty as well (whether country actually has a value or not). Example table: id | city | state | country ----------------------------- 1 | Here | There | MyCountry 2 | | | YourCountry So with the above table, I want the results for id=1 to return Here,There,MyCountry but the results for id=2 should be empty,empty,empty Thanks

    Read the article

  • Same SELECT used in an INSERT has different execution plan

    - by amacias
    A customer complained that a query and its INSERT counterpart had different execution plans, and of course, the INSERT was slower. First lets look at the SELECT : SELECT ua_tr_rundatetime,        ua_ch_treatmentcode,        ua_tr_treatmentcode,        ua_ch_cellid,        ua_tr_cellid FROM   (SELECT DISTINCT CH.treatmentcode AS UA_CH_TREATMENTCODE,                         CH.cellid        AS UA_CH_CELLID         FROM    CH,                 DL         WHERE  CH.contactdatetime > SYSDATE - 5                AND CH.treatmentcode = DL.treatmentcode) CH_CELLS,        (SELECT DISTINCT T.treatmentcode AS UA_TR_TREATMENTCODE,                         T.cellid        AS UA_TR_CELLID,                         T.rundatetime   AS UA_TR_RUNDATETIME         FROM    T,                 DL         WHERE  T.treatmentcode = DL.treatmentcode) TRT_CELLS WHERE  CH_CELLS.ua_ch_treatmentcode(+) = TRT_CELLS.ua_tr_treatmentcode;  The query has 2 DISTINCT subqueries.  The execution plan shows one with DISTICT Placement transformation applied and not the other. The view in Step 5 has the prefix VW_DTP which means DISTINCT Placement. -------------------------------------------------------------------- | Id  | Operation                    | Name            | Cost (%CPU) -------------------------------------------------------------------- |   0 | SELECT STATEMENT             |                 |   272K(100) |*  1 |  HASH JOIN OUTER             |                 |   272K  (1) |   2 |   VIEW                       |                 |  4408   (1) |   3 |    HASH UNIQUE               |                 |  4408   (1) |*  4 |     HASH JOIN                |                 |  4407   (1) |   5 |      VIEW                    | VW_DTP_48BAF62C |  1660   (2) |   6 |       HASH UNIQUE            |                 |  1660   (2) |   7 |        TABLE ACCESS FULL     | DL              |  1644   (1) |   8 |      TABLE ACCESS FULL       | T               |  2744   (1) |   9 |   VIEW                       |                 |   267K  (1) |  10 |    HASH UNIQUE               |                 |   267K  (1) |* 11 |     HASH JOIN                |                 |   267K  (1) |  12 |      PARTITION RANGE ITERATOR|                 |   266K  (1) |* 13 |       TABLE ACCESS FULL      | CH              |   266K  (1) |  14 |      TABLE ACCESS FULL       | DL              |  1644   (1) -------------------------------------------------------------------- Query Block Name / Object Alias (identified by operation id): -------------------------------------------------------------    1 - SEL$1    2 - SEL$AF418D5F / TRT_CELLS@SEL$1    3 - SEL$AF418D5F    5 - SEL$F6AECEDE / VW_DTP_48BAF62C@SEL$48BAF62C    6 - SEL$F6AECEDE    7 - SEL$F6AECEDE / DL@SEL$3    8 - SEL$AF418D5F / T@SEL$3    9 - SEL$2        / CH_CELLS@SEL$1   10 - SEL$2   13 - SEL$2        / CH@SEL$2   14 - SEL$2        / DL@SEL$2 Predicate Information (identified by operation id): ---------------------------------------------------    1 - access("CH_CELLS"."UA_CH_TREATMENTCODE"="TRT_CELLS"."UA_TR_TREATMENTCODE")    4 - access("T"."TREATMENTCODE"="ITEM_1")   11 - access("CH"."TREATMENTCODE"="DL"."TREATMENTCODE")   13 - filter("CH"."CONTACTDATETIME">SYSDATE@!-5) The outline shows PLACE_DISTINCT(@"SEL$3" "DL"@"SEL$3") indicating that the QB3 is the one that got the transformation. Outline Data -------------   /*+       BEGIN_OUTLINE_DATA       IGNORE_OPTIM_EMBEDDED_HINTS       OPTIMIZER_FEATURES_ENABLE('11.2.0.3')       DB_VERSION('11.2.0.3')       ALL_ROWS       OUTLINE_LEAF(@"SEL$2")       OUTLINE_LEAF(@"SEL$F6AECEDE")       OUTLINE_LEAF(@"SEL$AF418D5F") PLACE_DISTINCT(@"SEL$3" "DL"@"SEL$3")       OUTLINE_LEAF(@"SEL$1")       OUTLINE(@"SEL$48BAF62C")       OUTLINE(@"SEL$3")       NO_ACCESS(@"SEL$1" "TRT_CELLS"@"SEL$1")       NO_ACCESS(@"SEL$1" "CH_CELLS"@"SEL$1")       LEADING(@"SEL$1" "TRT_CELLS"@"SEL$1" "CH_CELLS"@"SEL$1")       USE_HASH(@"SEL$1" "CH_CELLS"@"SEL$1")       FULL(@"SEL$2" "CH"@"SEL$2")       FULL(@"SEL$2" "DL"@"SEL$2")       LEADING(@"SEL$2" "CH"@"SEL$2" "DL"@"SEL$2")       USE_HASH(@"SEL$2" "DL"@"SEL$2")       USE_HASH_AGGREGATION(@"SEL$2")       NO_ACCESS(@"SEL$AF418D5F" "VW_DTP_48BAF62C"@"SEL$48BAF62C")       FULL(@"SEL$AF418D5F" "T"@"SEL$3")       LEADING(@"SEL$AF418D5F" "VW_DTP_48BAF62C"@"SEL$48BAF62C" "T"@"SEL$3")       USE_HASH(@"SEL$AF418D5F" "T"@"SEL$3")       USE_HASH_AGGREGATION(@"SEL$AF418D5F")       FULL(@"SEL$F6AECEDE" "DL"@"SEL$3")       USE_HASH_AGGREGATION(@"SEL$F6AECEDE")       END_OUTLINE_DATA   */ The 10053 shows there is a comparative of cost with and without the transformation. This means the transformation belongs to Cost-Based Query Transformations (CBQT). In SEL$3 the optimization of the query block without the transformation is 6659.73 and with the transformation is 4408.41 so the transformation is kept. GBP/DP: Checking validity of GBP/DP for query block SEL$3 (#3) DP: Checking validity of distinct placement for query block SEL$3 (#3) DP: Using search type: linear DP: Considering distinct placement on query block SEL$3 (#3) DP: Starting iteration 1, state space = (5) : (0) DP: Original query DP: Costing query block. DP: Updated best state, Cost = 6659.73 DP: Starting iteration 2, state space = (5) : (1) DP: Using DP transformation in this iteration. DP: Transformed query DP: Costing query block. DP: Updated best state, Cost = 4408.41 DP: Doing DP on the original QB. DP: Doing DP on the preserved QB. In SEL$2 the cost without the transformation is less than with it so it is not kept. GBP/DP: Checking validity of GBP/DP for query block SEL$2 (#2) DP: Checking validity of distinct placement for query block SEL$2 (#2) DP: Using search type: linear DP: Considering distinct placement on query block SEL$2 (#2) DP: Starting iteration 1, state space = (3) : (0) DP: Original query DP: Costing query block. DP: Updated best state, Cost = 267936.93 DP: Starting iteration 2, state space = (3) : (1) DP: Using DP transformation in this iteration. DP: Transformed query DP: Costing query block. DP: Not update best state, Cost = 267951.66 To the same query an INSERT INTO is added and the result is a very different execution plan. INSERT  INTO cc               (ua_tr_rundatetime,                ua_ch_treatmentcode,                ua_tr_treatmentcode,                ua_ch_cellid,                ua_tr_cellid)SELECT ua_tr_rundatetime,       ua_ch_treatmentcode,       ua_tr_treatmentcode,       ua_ch_cellid,       ua_tr_cellidFROM   (SELECT DISTINCT CH.treatmentcode AS UA_CH_TREATMENTCODE,                        CH.cellid        AS UA_CH_CELLID        FROM    CH,                DL        WHERE  CH.contactdatetime > SYSDATE - 5               AND CH.treatmentcode = DL.treatmentcode) CH_CELLS,       (SELECT DISTINCT T.treatmentcode AS UA_TR_TREATMENTCODE,                        T.cellid        AS UA_TR_CELLID,                        T.rundatetime   AS UA_TR_RUNDATETIME        FROM    T,                DL        WHERE  T.treatmentcode = DL.treatmentcode) TRT_CELLSWHERE  CH_CELLS.ua_ch_treatmentcode(+) = TRT_CELLS.ua_tr_treatmentcode;----------------------------------------------------------| Id  | Operation                     | Name | Cost (%CPU)----------------------------------------------------------|   0 | INSERT STATEMENT              |      |   274K(100)|   1 |  LOAD TABLE CONVENTIONAL      |      |            |*  2 |   HASH JOIN OUTER             |      |   274K  (1)|   3 |    VIEW                       |      |  6660   (1)|   4 |     SORT UNIQUE               |      |  6660   (1)|*  5 |      HASH JOIN                |      |  6659   (1)|   6 |       TABLE ACCESS FULL       | DL   |  1644   (1)|   7 |       TABLE ACCESS FULL       | T    |  2744   (1)|   8 |    VIEW                       |      |   267K  (1)|   9 |     SORT UNIQUE               |      |   267K  (1)|* 10 |      HASH JOIN                |      |   267K  (1)|  11 |       PARTITION RANGE ITERATOR|      |   266K  (1)|* 12 |        TABLE ACCESS FULL      | CH   |   266K  (1)|  13 |       TABLE ACCESS FULL       | DL   |  1644   (1)----------------------------------------------------------Query Block Name / Object Alias (identified by operation id):-------------------------------------------------------------   1 - SEL$1   3 - SEL$3 / TRT_CELLS@SEL$1   4 - SEL$3   6 - SEL$3 / DL@SEL$3   7 - SEL$3 / T@SEL$3   8 - SEL$2 / CH_CELLS@SEL$1   9 - SEL$2  12 - SEL$2 / CH@SEL$2  13 - SEL$2 / DL@SEL$2Predicate Information (identified by operation id):---------------------------------------------------   2 - access("CH_CELLS"."UA_CH_TREATMENTCODE"="TRT_CELLS"."UA_TR_TREATMENTCODE")   5 - access("T"."TREATMENTCODE"="DL"."TREATMENTCODE")  10 - access("CH"."TREATMENTCODE"="DL"."TREATMENTCODE")  12 - filter("CH"."CONTACTDATETIME">SYSDATE@!-5)Outline Data-------------  /*+      BEGIN_OUTLINE_DATA      IGNORE_OPTIM_EMBEDDED_HINTS      OPTIMIZER_FEATURES_ENABLE('11.2.0.3')      DB_VERSION('11.2.0.3')      ALL_ROWS      OUTLINE_LEAF(@"SEL$2")      OUTLINE_LEAF(@"SEL$3")      OUTLINE_LEAF(@"SEL$1")      OUTLINE_LEAF(@"INS$1")      FULL(@"INS$1" "CC"@"INS$1")      NO_ACCESS(@"SEL$1" "TRT_CELLS"@"SEL$1")      NO_ACCESS(@"SEL$1" "CH_CELLS"@"SEL$1")      LEADING(@"SEL$1" "TRT_CELLS"@"SEL$1" "CH_CELLS"@"SEL$1")      USE_HASH(@"SEL$1" "CH_CELLS"@"SEL$1")      FULL(@"SEL$2" "CH"@"SEL$2")      FULL(@"SEL$2" "DL"@"SEL$2")      LEADING(@"SEL$2" "CH"@"SEL$2" "DL"@"SEL$2")      USE_HASH(@"SEL$2" "DL"@"SEL$2")      USE_HASH_AGGREGATION(@"SEL$2")      FULL(@"SEL$3" "DL"@"SEL$3")      FULL(@"SEL$3" "T"@"SEL$3")      LEADING(@"SEL$3" "DL"@"SEL$3" "T"@"SEL$3")      USE_HASH(@"SEL$3" "T"@"SEL$3")      USE_HASH_AGGREGATION(@"SEL$3")      END_OUTLINE_DATA  */ There is no DISTINCT Placement view and no hint.The 10053 trace shows a new legend "DP: Bypassed: Not SELECT"implying that this is a transformation that it is possible only for SELECTs. GBP/DP: Checking validity of GBP/DP for query block SEL$3 (#4) DP: Checking validity of distinct placement for query block SEL$3 (#4) DP: Bypassed: Not SELECT. GBP/DP: Checking validity of GBP/DP for query block SEL$2 (#3) DP: Checking validity of distinct placement for query block SEL$2 (#3) DP: Bypassed: Not SELECT. In 12.1 (and hopefully in 11.2.0.4 when released) the restriction on applying CBQT to some DMLs and DDLs (like CTAS) is lifted.This is documented in BugTag Note:10013899.8 Allow CBQT for some DML / DDLAnd interestingly enough, it is possible to have a one-off patch in 11.2.0.3. SQL> select DESCRIPTION,OPTIMIZER_FEATURE_ENABLE,IS_DEFAULT     2  from v$system_fix_control where BUGNO='10013899'; DESCRIPTION ---------------------------------------------------------------- OPTIMIZER_FEATURE_ENABLE  IS_DEFAULT ------------------------- ---------- enable some transformations for DDL and DML statements 11.2.0.4                           1

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >