Distribute Layers with a Specific Value

I found this old post where Paul Riggot created this wonderful and very useful script, something I was looking for, but just wondering if I can request for some few updates to it.
1) Seems like this does not work properly with CC version, works with my cs4. Is it possible to support CC? The spacing distances are really off...
2) The distances between layers are not exactly the same as specified in the dialog, is it possible to make it more accurate. So for example, if I specified 23px for the horizontal gaps, when i measure it gives me 25px.
3) On first time, is it possible to make the horizontal and vertical input fields have zero? Right now it defaults to 10px for each.
Here's the original binary code, which you have to copy and paste into a text file and change the file type to be "filename.jsx" to work.
@JSXBIN@ES@[email protected]UjBj
MhAiTjQjBjDjJjOjHhAiFjOjUjFjSjFjEACzChdhdBXzEjUjFjYjUCXzKjIjPjSjJjajPjOjUjBjMDX
jMhAiTjQjBjDjJjOjHhAiFjOjUjFjSjFjEACBXCXzIjWjFjSjUjJjDjBjMHXEXFjGnneAnZhUnAFct0
zGjQjBjOjFjMhREXzGjQjBjOjFjMhQFjzDjXjJjOGnneAnOyhTZhTnAFegbiOjPhAiWjFjSjUjJjDjB DzIjWjBjMjJiEjBjUjFIAhVJJBnASzDjEjMjHJAne2meDjEjJjBjMjPjHjbjUjFjYjUhahHiTjDjSjJ
jYjUhahHhHhAhMjQjSjPjQjFjSjUjJjFjThajbjCjPjSjEjFjSiTjUjZjMjFhahHjFjUjDjIjFjEhHh
jQjUhAiJjOjUjFjSjGjBjDjFhHhMjCjPjVjOjEjThaibhRhQhQhMhRhQhQhMhVhQhQhMhThQhQidhMj QjBjOjFjMhQhaiQjBjOjFjMjbjCjPjVjOjEjThaibhRhQhMhRhQhMhThZhQhMhRhZhQidhAhMhAjUjF MjTjVhRiQjBjOjFjMiDjPjPjSjEjJjOjBjUjFjThajUjSjVjFjdhMjUjJjUjMjFhaiTjUjBjUjJjDiU
VjOjEjThaibhRhQhMhVhQhMhThXhQhMhRhUhQidhAhMhAjUjFjYjUhahHhHhAhMjQjSjPjQjFjSjUjJ
jFjYjUjbjCjPjVjOjEjThaibhVhQhMhRhQhMhThVhQhMhUhQidhAhMhA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jPhBffJjCnABXhIXhJjhKVhHAnfZj
ABXzBhSibVhdGXiaXiZViWgcnfJiNnABXzBhTicVhdGXiaXibViWgcnfJyiNnABXzBhUidVhdGXiaXi cViWgcnfJiOnAEXhUVhcFRBVhdGffJiPnAShdGAnnffAViVgbAXhWVhSDByBMJiRnAShcFEXzEjTjPj SjUieVhcFnfnffJyiSnAEXieVhcFRBNyBnAMiSbyBn0ABZiSnACzBhNifXibViVAXibVzBjCjABnnAC iV40BhAjA4B0AhAC0AgaCiSffJiTnASzLjBjSjSjBjZiOjVjNjCjFjSjBgdndBftJiUnAEXhUVheHRB XiYVhcFffaiVbyiWn0ABOiWbyiXn0ABJiXnAEXhUEjzEjFjWjBjMjCRBCzBhLjDnVjBgdeDjSjPjXnf fRBQgaVhcFVzBjGjEgeffAUzChGhGjFCVXibQgaVhcFVjEgeCifXibQgaVhcFCifVjEgenndBnndhSn nCMXibQgaVhcFVjEgeCjDXibQgaVhcFCifVjEgenndBnndhSnnnnbiZn0ACJiZnATjBgdBtJianAEXh UEjjCRBCjDnVjBgdeDjSjPjXnffRBQgaVhcFVjEgeffAVjEgeBXhWVhcFByBMaidbyien0ABJyienAE XieEjjCRBCjDnCjDVzBjEjGgfnndBeDjSjPjXnffRBNyBnAMiebyBn0ABZienACifXiZViVAXiZVjAB nnACiV40BhAjA4B0AhAC0AgaCieffAVjGgfAVjBgdByBMOjAbjBn0ADJjBnAEjLRBFehAiTjPjSjSjZ DnAnAChCCzBhKjHXhWVheHVjBgdnnXhWVhcFnnnajFbjGn0ACJjGnASzKjMjFjGjUiBjOjDjIjPjSjI
hHnnEjhERBXibQgaEjjCRBCjDnCjDViVgbnndBeDjSjPjXnffVjJhAffnnnftJjVnAEXjNXhQjhRRCF
hBEjhERBXicXiYEjjCRBCjDnCjDVzBjMjJhAnndBeDjSjPjXnffffnftajHbjIn0AFJjInABXhQjhRE XiSXiTjhRRBXiYQgaEjjCRBCjDnCjDVjJhAnndBeDjSjPjXnffViVgbffnfJjJ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iAjM40BhAjQ4B0AhAhH40BiAjG4gf0AiAhO4C0AiAhS4D0AiAhc4F0AiAhd4G 0AiAhe4H0AiAhf4I0AiAiA4J0AiAiB4K0AiAChGAhDAjaMjcbyBn0AIJjdnASzEjEjFjTjDjRAEjzQi BjDjUjJjPjOiEjFjTjDjSjJjQjUjPjSjSntnftJjenASzDjSjFjGjTBEjzPiBjDjUjJjPjOiSjFjGjF jSjFjOjDjFjUntnftJjfnAEXzIjQjVjUiDjMjBjTjTjVVjTBRBEjzQjTjUjSjJjOjHiJiEiUjPiUjZj QjFiJiEjWRBFeMjMjBjZjFjSiTjFjDjUjJjPjOffffJkAnAEXzMjQjVjUiSjFjGjFjSjFjOjDjFjXVj RARCEjhYRBFeEjOjVjMjMffVjTBffJkBnASzEjSjFjGhSjYCEjjUntnftJkCnAEXzNjQjVjUiFjOjVj NjFjSjBjUjFjEjZVjYCRDEjhYRBFeEiMjZjShAffEjhYRBFeEiPjSjEjOffEjhYRBFeEiUjSjHjUfff fJkDnAEXjXVjRARCEjhYRBFeEiGjSjPjNffVjYCffgkEbyBn0ACJkFnAEjhXRDEjhYRBFeEiNjLhAhA
ffVjRAXhajhbffZkGnAFctABnzBjFjanbyBn0ABZkHnAFcfADjY4C0AiAjR40BiAjT4B0AiAADAhNAk
Thx.

Thanks, I've read in the forums that Paul has stopped being active anymore which is a big shame. I did find his site with the source file for this distribute script. I just hope maybe someone here can help to support CC version, work properly and make it more accurate. It's a great script but its very important to make exact spacing values. Other wise, this is no better than the built in distribute tools of Photoshop.
here's the script code:
function main(){
if(!documents.length) return;
var win = new Window('dialog','Space Layers');
g = win.graphics;
var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
g.backgroundColor = myBrush;
win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
win.g1 = win.p1.add('group');
win.g1.orientation = "row";
win.title = win.g1.add('statictext',undefined,'Space Layers');
win.title.alignment="fill";
var g = win.title.graphics;
g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
win.g5 =win.p1.add('group');
win.g5.orientation = "row";
win.g5.alignment='fill';
win.g5.spacing=3;
win.g5.st1 = win.g5.add('statictext',undefined,'Horizontal');
win.g5.et1 = win.g5.add('edittext',undefined,'20');
win.g5.et1.preferredSize=[50,20];
win.g5.st1a = win.g5.add('statictext',undefined,'px');
win.g5.st10 = win.g5.add('statictext',undefined,'');
win.g5.st10.preferredSize=[55,20];
win.g5.st2 = win.g5.add('statictext',undefined,'Vertical');
win.g5.et2 = win.g5.add('edittext',undefined,'20');
win.g5.et2.preferredSize=[50,20];
win.g5.st2a = win.g5.add('statictext',undefined,'px');
win.g10 =win.p1.add('group');
win.g10.orientation = "row";
win.g10.alignment='fill';
win.g10.spacing=10;
win.g10.st1 = win.g10.add('statictext',undefined,'Plus ~ Minus Pixels ,Top of Layers');
win.g10.et1 = win.g10.add('edittext',undefined,'50');
win.g10.et1.helpTip="This is the amount of top pixels can differ\nFor a low res document use a lower number\rFor a high res document use a higher number"
win.g10.et1.preferredSize=[50,20];
win.g10.et1.onChanging = function() {
  if (this.text.match(/[^\-\.\d]/)) {
    this.text = this.text.replace(/[^\-\.\d]/g, '');
win.g15 =win.p1.add('group');
win.g15.orientation = "row";
win.g15.alignment='fill';
win.g15.spacing=10;
win.g15.bu1 = win.g15.add('button',undefined,'Space Layers');
win.g15.bu1.preferredSize=[150,30];
win.g15.bu2 = win.g15.add('button',undefined,'Cancel');
win.g15.bu2.preferredSize=[150,30];
if(version.substr(0,version.indexOf('.'))<10){
    alert("Sorry this script is only valid for Photoshop CS3 or higher");
    return;
win.g5.et1.onChanging = function() {
  if (this.text.match(/[^\-\.\d]/)) {
    this.text = this.text.replace(/[^\-\.\d]/g, '');
win.g5.et2.onChanging = function() {
  if (this.text.match(/[^\-\.\d]/)) {
    this.text = this.text.replace(/[^\-\.\d]/g, '');
win.g15.bu1.onClick=function(){
if(win.g5.et1.text== ''){
    alert("No horizontal pixels entered");
    return;
if(win.g5.et2.text== ''){
    alert("No vertical pixels entered");
    return;
var plusMinus =0;
if(Number(win.g10.et1.text) < 1) {
    plusMinus=2;
    }else{
        plusMinus=Number(win.g10.et1.text);
win.close(1);
spaceMasks(Number(win.g5.et1.text),Number(win.g5.et2.text),plusMinus)
win.center();
win.show()
function spaceMasks(spacingA,spacingD,plusMinus){
var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var selectedLayers = getSelectedLayersIdx();
if(selectedLayers.length <2){
    alert("Not enough layers selected!");
    return;
var boundsList=[];
var tempbnds=[];
showFX(false);
for(var a=0;a<selectedLayers.length;a++){
    var LB =getLayerBoundsByIndex(selectedLayers[a] );
    boundsList.push([[selectedLayers[a]],[LB[0]],[LB[1]],[LB[2]],[LB[3]]]);
    tempbnds=[];
showFX(true);
boundsList.sort(function(a,b){return a[2]-b[2];});
var row1=[]; var row2=[]; var row3=[]; var row4=[]; var row5=[];
var row6=[]; var row7=[]; var row8=[]; var row9=[]; var row10=[];
var row11=[]; var row12=[]; var row13=[]; var row14=[]; var row15=[];
var row16=[]; var row17=[]; var row18=[]; var row19=[]; var row20=[];
var row21=[]; var row22=[]; var row23=[]; var row24=[]; var row25=[];
var row26=[]; var row27=[]; var row28=[]; var row29=[]; var row30=[];
var row31=[]; var row32=[]; var row33=[]; var row34=[]; var row35=[];
var row36=[]; var row37=[]; var row38=[]; var row39=[]; var row40=[];
var row41=[]; var row42=[]; var row43=[]; var row44=[]; var row45=[];
var row46=[]; var row47=[]; var row48=[]; var row49=[]; var row50=[];
var row51=[]; var row52=[]; var row53=[]; var row54=[]; var row55=[];
var row56=[]; var row57=[]; var row58=[]; var row59=[]; var row60=[];
var row61=[]; var row62=[]; var row63=[]; var row64=[]; var row65=[];
var row66=[]; var row67=[]; var row68=[]; var row69=[]; var row70=[];
var row71=[]; var row72=[]; var row73=[]; var row74=[]; var row75=[];
var row76=[]; var row77=[]; var row78=[]; var row79=[]; var row80=[];
var row81=[]; var row82=[]; var row83=[]; var row84=[]; var row85=[];
var row86=[]; var row87=[]; var row88=[]; var row89=[]; var row90=[];
var row91=[]; var row92=[]; var row93=[]; var row94=[]; var row95=[];
var row96=[]; var row97=[]; var row98=[]; var row99=[]; var row100=[];
var row101=[]; var row102=[]; var row103=[]; var row104=[]; var row105=[];
var row106=[]; var row107=[]; var row108=[]; var row109=[]; var row110=[];
var row111=[]; var row112=[]; var row113=[]; var row114=[]; var row115=[];
var row116=[]; var row117=[]; var row118=[]; var row119=[]; var row120=[];
var arrayNumber =1;
var TOP =Number(boundsList[0][2]);
for(var f =0;f<boundsList.length;f++){
    if(TOP > (boundsList[f][2]-plusMinus) && boundsList[f][2] < (boundsList[f][2]+plusMinus)){
        eval("row" +arrayNumber).push(boundsList[f]);
        }else{
            TOP =Number(boundsList[f][2]);
            arrayNumber++;
            eval("row" +arrayNumber).push(boundsList[f]);
for(var d=0;d<arrayNumber;d++){
    eval("row" +(d+1)).sort(function(a,b){return a[1]-b[1];});
if((row1.length*arrayNumber) != boundsList.length){
    alert("Unable to distribute this selection of layers!");
    return;
for(var l=0;l<arrayNumber;l++){
var leftAnchor =Number(eval("row"+(l+1))[0][3]);
for(var a = 1;a<eval("row"+(l+1)).length;a++){
makeActiveByIndex(Number(eval("row"+(l+1))[a][0]),false);
var Width = Number(eval("row"+(l+1))[a][3]) - Number(eval("row"+(l+1))[a][1]);
var shiftPixels = (leftAnchor+spacingA) - Number(eval("row"+(l+1))[a][1]);
activeDocument.activeLayer.translate(shiftPixels,0);
leftAnchor +=(Width+spacingA);
for(var l=0;l<row1.length;l++){
var topAnchor =Number(row1[l][4]);
for(var a = 1;a<arrayNumber;a++){
makeActiveByIndex(Number(eval("row"+(a+1))[l][0]),false);
var Height = Number(eval("row"+(a+1))[l][4]) - Number(eval("row"+(a+1))[l][2]);
var shiftPixels = (topAnchor+spacingD) - Number(eval("row"+(a+1))[l][2]);
activeDocument.activeLayer.translate(0,shiftPixels);
topAnchor +=(Height+spacingD);
for(var a in selectedLayers){
    makeActiveByIndex(Number(selectedLayers[a]),false,true);
app.preferences.rulerUnits = startRulerUnits;
main();
function selectLayerByIdx(idx, add) {
    var ref = new ActionReference();
    ref.putIndex(charIDToTypeID('Lyr '), idx);
    var desc = new ActionDescriptor();
    desc.putReference(charIDToTypeID('null'), ref);
    if(add) desc.putEnumerated(stringIDToTypeID('selectionModifier'), stringIDToTypeID('selectionModifierType'), stringIDToTypeID('addToSelection'));
    desc.putBoolean(charIDToTypeID('MkVs'), false);
    executeAction(charIDToTypeID('slct'), desc, DialogModes.NO);
function makeActiveByIndex( idx, visible,add ){
    if(add == undefined) add=false;
    var desc = new ActionDescriptor();
      var ref = new ActionReference();
      ref.putIndex(charIDToTypeID( "Lyr " ), idx)
      desc.putReference( charIDToTypeID( "null" ), ref );
      if(add) desc.putEnumerated(stringIDToTypeID('selectionModifier'), stringIDToTypeID('selectionModifierType'), stringIDToTypeID('addToSelection'));
      desc.putBoolean( charIDToTypeID( "MkVs" ), visible );
   executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
function getSelectedLayersIdx(){
      var selectedLayers = new Array;
      var ref = new ActionReference();
      ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
      var desc = executeActionGet(ref);
      if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
         desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
          var c = desc.count
          var selectedLayers = new Array();
          for(var i=0;i<c;i++){
            try{
               activeDocument.backgroundLayer;
               selectedLayers.push(  desc.getReference( i ).getIndex() );
            }catch(e){
               selectedLayers.push(  desc.getReference( i ).getIndex()+1 );
       }else{
         var ref = new ActionReference();
         ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
         ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         try{
            activeDocument.backgroundLayer;
            selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ))-1);
         }catch(e){
            selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" )));
      return selectedLayers;
function getLayerBoundsByIndex( idx ) {
    var ref = new ActionReference();
    ref.putProperty( charIDToTypeID("Prpr") , stringIDToTypeID( "bounds" ));
    ref.putIndex( charIDToTypeID( "Lyr " ), idx );
    var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID( "bounds" ));
    var bounds = [];
    bounds.push(desc.getUnitDoubleValue(stringIDToTypeID('left')));
    bounds.push(desc.getUnitDoubleValue(stringIDToTypeID('top')));
    bounds.push(desc.getUnitDoubleValue(stringIDToTypeID('right')));
    bounds.push(desc.getUnitDoubleValue(stringIDToTypeID('bottom')));
    return bounds;
function showFX(FX) {
    var desc48 = new ActionDescriptor();
        var ref34 = new ActionReference();
        ref34.putProperty( charIDToTypeID('Prpr'), charIDToTypeID('lfxv') );
        ref34.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
    desc48.putReference( charIDToTypeID('null'), ref34 );
        var desc49 = new ActionDescriptor();
        desc49.putBoolean( charIDToTypeID('lfxv'), FX );
    desc48.putObject( charIDToTypeID('T   '), charIDToTypeID('lfxv'), desc49 );
    try{
    executeAction( charIDToTypeID('setd'), desc48, DialogModes.NO );
    }catch(e){}

Similar Messages

  • Override web.xml With Server Specific Values

    Not sure if here or the OC4J/J2EE forum is most appropriate place for this question:
    We're currently working on migrating from the old jserv setup to 9.0.4 app server with OC4J. We have the infrastructure installed and are managing the application through Enterprise Manager. In my web.xml file I provide initialization parameters to one of my servlets using something similar to the following:
    <servlet>
    <servlet-name>util.GlobalPropertyManager</servlet-name>
    <servlet-class>util.GlobalPropertyManager</servlet-class>
    <init-param>
    <param-name>mhris.batch.outputdir</param-name>
    <param-value>d:/dev/java/mhris/defaultroot/batch/</param-value>
    </init-param>
    </servlet>
    Now, this directory path I've provided is only good on my local workstation. When I deploy to my UNIX production servers, I need to override this with a valid path depending on the server being deployed to (no, they don't all have the same directory setup, yeah it's a pain). These servers include our production boxes, development server, test, training, etc.
    Currently under JSERV, I provide server specific values in the Global Init Parameters section of my property file (don't remember why we didn't use the Servlet Init Parameters property instead). This works very well since this file is not touched when we land updates, so the values are set once for each server.
    Under OC4J, I understand that I can override the values in web.xml by using an orion-web.xml file BUT it appears that this file resides in the WAR I deploy, so each server will get the same orion-web.xml rather than maintaining its own set of values.
    Is there another .xml file I can use to provide these initalization parameters? global-web-applications.xml looked promising but I wasn't completely sure I could put values for my application in it or where exactly they should go (ie. inside the existing <web-app> section or if I should create a second one specifically for my app).
    Any ideas or will I have to reploy a different orion-web.xml file to each of my servers?
    Appreciate the assistance,
    Michael

    Michael,
    First, I would just modify the web.xml during each deployment.
    Second, I would recommend using the same relative path with the web-app context. Then, you can use the Servlet API to retrive the real path of the web-app context.
    I don't think it is necessary to use orion-web.xml or other properties files.

  • How to count ONLY fields with a specific value

    I modified the code below from the API reference to count combobox fields with a value of "MT" so I could total the number of a specific choice the form user input.
    var count = 0;
    for (var i=0; i<this.numFields; i++)
    var fname = this.getNthFieldName(i);
    if ( this.getField(fname).type == "combobox" && this.getField(fname).value == "MT" ) count++;
    this.getField("mTurb").value = count.value;
    Here's the problem: I tried to use a similar script, modified only slightly from this form, in another total field to tally a different choice made with comboboxes and the script continues to tally the first choice. An example of one of the modified versions of the script is below.
    var gcount = 0;
    for (var i=0; i<this.numFields; i++)
    var gname = this.getNthFieldName(i);
    if ( this.getField(gname).type == "combobox" && this.getField(gname).value == "MT" ) gcount++;
    this.getField("gPack").value = gcount.value;
    I suspect I'm just missing something painfully obvious to seasoned scripters, but I can't seem to figure it out and I need this script to be able to count the number of 9 different options in the comboboxes.

    OK, you can use a script like the following as the custom calculate script for the text fields that perform the counts:
    // Custom calculate script for text field
    (function () {
        // Declare and initialize variables
        var fn, s = "MT", count = 0;
        // Loop through the combo boxes
        for (var i = 1; i < 25; i++) {
            // Determine the current field name
            fn = "M" + util.printf("%02d", i));
            // See if the field value matches
            if (getField(fn).valueAsString === s) count++
        // Set this field value to the count
        event.value = count;
    Change the value of the "s" variable to match the item that you want to count. The first and last lines prevent the unnecessary creatio of global variables, which is good. It also makes it easy to transfer to a more general document-level routine, which would be event better, something like:
    // Custom calculate script for text field
    function getCBCount(s) {
        var fn, count = 0;
        // Loop through the combo boxes
        for (var i = 1; i < 25; i++) {
            // Determine the current field name
            fn = "M" + util.printf("%02d", i));
            // See if the field value matches
            if (getField(fn).valueAsString === s) count++
        // Set this field value to the count
        event.value = count;
    You would then call this function from the individual text boxes with the following custom calculate script:
    getCBCount("MT");
    and replace "MT" with the vlaue you want to count.

  • Set party number sequence with a specific value

    Hi all,
    I have a requirement to start the customer party number sequence from a specific number, so whenever a new customer is created the party number will be above a certain value. Any suggestions on how I can do that?
    Thanks, Mike.

    Thanks for the feedback. I got it with following SQL statements to start from 700000.
    alter sequence ar.HZ_PARTY_NUMBER_S increment by 700000 ;
    select HZ_PARTY_NUMBER_S.nextval from dual ;
    alter sequence ar.HZ_PARTY_NUMBER_S increment by 1 ;

  • ORDER BY with a Specific value first

    I am creating an Employee Contact page in ASP that populates a table with a SQL query (command).  I want to sort the employees by last name (which is obviously an easy SORT BY property), but I need to show the Managers first.  How can I display
    employees that have 'Managers' in their 'Job Title' first, then the rest of the employees by last name.

    create table #t (id int, title char(1))
    insert into #t values (4,'A')
    insert into #t values (2,'M')
    insert into #t values (3,'D')
    insert into #t values (1,'M')
    insert into #t values (5,'M')
    insert into #t values (6,'e')
    insert into #t values (7,'X')
    select * from #t order by
    case when title ='m' then 1 end desc, title 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Compare column to another column with a specific value?

    What i need to do is compare a column that holds the SiteNames of holidays to another column with the DifficultyDescription of holidays.
    I want to show that sites that are not included in boldANY*bold* holiday with an “easy” or “moderate” rating.
    Some of my SiteNames have holidays with different difficulty ratings....
    e.g Yellowstone National Park(SiteName) - H2 - Moderate(DifficultyDescrip)
    Yellowstone National Park(SiteName - H3 - Strenuous(DifficultyDescrip)
    In this example i would want Yellowstone not to be in the results of my query as one of its results is 'moderate'.
    I want to show holidays that are not in boldANY*bold* holiday with 'easy' or 'moderate'
    Here is my attempt so far...
    select it220_holdet.holcode.holcode as holcode
             it220_holdet.diffdetails.diffdescrip as diffdescrip
             it220_sitedetails.sitename as sitename
    from it220_holidaydetails it220_holidaydetails,
    etc....
    where it220_sitedetails.sitename != it220_diffdetails.diffdescrip = 'Easy' <<<< where the sitename is not equal to a difficulty description of 'Easy'
    and     it220_sitedetails.sitename != it220_diffdetails.diffdescrip = 'Moderate' <<<< where the sitename is not equal to a difficulty description of 'Moderate'
    Is the logic of this correct? The error message i am getting is SQL command not properly ended.
    Is this more of a syntax problem than logic. Any help would be great.
    Thanks in advance!
    Edited by: Jay on 19-Nov-2010 02:47
    Edited by: Jay on 19-Nov-2010 02:47

    Hi,
    Ok,
    Problem is in this part of query
    where   "IT220_HOLIDAYDETAILS"."DIFFRATING"="IT220_DIFFDETAILS"."DIFFCODE"
    and      "IT220_HOLIDAYDETAILS"."HOLCODE"="IT220_LOOKUP_SITEHOLIDAY"."HOLCODE"
    and      "IT220_LOOKUP_SITEHOLIDAY"."SITECODE"="IT220_SITEDETAILS"."SITECODE"
    and "IT220_SITEDETAILS"."SITENAME" = "IT220_DIFFDETAILS"."DIFFDESCRIP"
    and "IT220_SITEDETAILS"."SITENAME" =  "IT220_DIFFDETAILS"."DIFFDESCRIP"
    Check are you joining correct columns.
    And remove possibility that tables values are in different cases
    SELECT "IT220_HOLIDAYDETAILS"."HOLCODE" AS "HOLCODE",
      "IT220_HOLIDAYDETAILS"."COUNTRYVIS"   AS "COUNTRYVIS",
      "IT220_DIFFDETAILS"."DIFFDESCRIP"     AS "DIFFDESCRIP",
      "IT220_SITEDETAILS"."SITENAME"        AS "SITENAME"
    FROM "IT220_SITEDETAILS" "IT220_SITEDETAILS",
      "IT220_LOOKUP_SITEHOLIDAY" "IT220_LOOKUP_SITEHOLIDAY",
      "IT220_DIFFDETAILS" "IT220_DIFFDETAILS",
      "IT220_HOLIDAYDETAILS" "IT220_HOLIDAYDETAILS"
    WHERE UPPER("IT220_HOLIDAYDETAILS"."DIFFRATING")  = UPPER("IT220_DIFFDETAILS"."DIFFCODE")
    AND UPPER("IT220_HOLIDAYDETAILS"."HOLCODE")       = UPPER("IT220_LOOKUP_SITEHOLIDAY"."HOLCODE")
    AND UPPER("IT220_LOOKUP_SITEHOLIDAY"."SITECODE")  = UPPER("IT220_SITEDETAILS"."SITECODE")
    AND UPPER("IT220_SITEDETAILS"."SITENAME")         = UPPER("IT220_DIFFDETAILS"."DIFFDESCRIP")
    AND UPPER("IT220_DIFFDETAILS"."DIFFDESCRIP") NOT IN('EASY','MODERATE')Regards,
    Jari

  • How can I replace column value with a particular value in SQL

    Hi All,
    Can anyone please tell me how can I format my output with replacing a column value with a specific value which actually depends on the present value of the column
    I am executing the following SQL statement
    select state,count(id) from <table_name> where composite_dn= <composite_dn_name> group by state;
    My Present output is:
    State No.Of Instance
    1 3
    3 28
    I want to replace the value in the column state as follows
    State No.OfInstances
    Completed 3
    Faulted 28
    I want "1" to be reppaced by "Completed" and "3" to be replaced by "Faulted"
    Is is possible with SQL or PL/SQL , if it is then how can I achieve this required result. Please help!!
    Thanks in Advance!!
    Edited by: Roshni Shankar on Oct 27, 2012 12:38 AM

    Hi Roshni,
    I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
    Refer -- http://www.techonthenet.com/oracle/functions/decode.php
    select decode(t1.state,t2.state_id,t2.state_name), t1.count_id
    from <table_2> t2, (select state,count(id) count_id
    from <table_name>
    where composite_dn= <composite_dn_name>
    group by state) t1
    where t1.state = t2.state_id;HTH
    Ranit B.
    Edited by: ranit B on Oct 27, 2012 2:02 PM
    -- link added
    Edited by: ranit B on Oct 27, 2012 2:19 PM
    -- sample code added

  • How to get all partner guids with a specific marketing attribute value?

    Hello,
    is there a method or function module in Standard which i could use in my own coding to get all partners (guids or number) with a specifiic marketing attribute and a specific value of this attribute?
    Thank you
    Best regards
    Manfred

    Hi,
    Use the FM: CRM_MKTBP_READ_BP_SEL_ATTR
    pass the input parameter in IS_CHARVALUE in the field SEL_ATTR as the attribute name.
    Output will be displayed in the table ET_PARTNER_VALUES as partner guid's
    Regards,
    PP

  • Delete a node containing a child node with specific value

    Hello,
    I wanted to know how to delete a node which contains specific value in one of its child node.
    Here is the xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <rows>
         <ROW>
              <part_num_ref ID="100124">1</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">2</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">3</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">4</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">5</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">6</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">7</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">8</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">9</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">10</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">11</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">12</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">13</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">14</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">15</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">16</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">17</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
    </rows>
    I would like to delete one of the node <ROW> which contains the value 1 for the child node <part_num_ref >
    Is it possible?
    Thanks in advance for your answers.
    Regards,
    Stessy Delcroix

    The following is a possibility on database version 10.2.x (what database version are you using?):
    Example from XMLDB Developers Guide 10.2
    Example 4-26 Deleting LineItem Element Number 222
    SELECT extract(OBJECT_VALUE,
                   '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      FROM purchaseorder
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    EXTRACT(OBJECT_VALUE,'/PURCHASEORDER/LINEITEMS/LINEITEM[@ITEMNUMBER="222"]')
    <LineItem ItemNumber="222">
      <Description>The Harder They Come</Description>
      <Part Id="953562951413" UnitPrice="22.95" Quantity="1"/>
    </LineItem>
    1 row selected.
    UPDATE purchaseorder
      SET OBJECT_VALUE =
          deleteXML(OBJECT_VALUE,
                    '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    SELECT extract(OBJECT_VALUE,
                   '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      FROM purchaseorder
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    EXTRACT(OBJECT_VALUE,'/PURCHASEORDER/LINEITEMS/LINEITEM[@ITEMNUMBER="222"]')
    1 row selected.

  • Merging/Flattening Layers with different blending modes and maintaining the visual appearance

    Hello,
    I see there are many others that are having the same problem as me. And alas, it doesn't seem like the problem has been solved or very understood for that matter.
    I want to be able to take a document, that has multiple layers, inside of multiple groups with various layers having various blending modes applied to them and from within that document, select simply two of those layers, one with a Divide blending mode and the other layer Normal, merge those two layers, but have the visual appearance of the merged layer maintain the visual appearance of what the layers looked like before I merged them.
    Everytime I attempt this, Ps takes my Divide layer, reverts it back to Normal and then merges the layers, thus changing the appearance of what it was before the merge. This is not the desired result.
    I understand that when you flatten an entire series of layers, it applies all the blending modes and maintains the visual appearance. Is there a way to do this with just two layers instead of all the layers? If so, that would be great information. If not, why not?
    Thank you
    Jake

    Short answer:  No. 
    A "layer" with a specific blending mode implies a sequence of math operations on a given pixel.  Think of the visible pixel R, G, and B values as the result of a potentially complex math formula that combines numbers from each layer in complex ways (those ways being defined by the blending mode you've chosen).  You can't always simplify particular factors of your choosing in a given math formula.
    The next step is to examine why you would want to do so.  Perhaps there's a more direct way to achieve your goal that would avert the need entirely.
    Another possibility, if the effect of several layers together is something you'd like to manipulate as a unit, is to Group the layers.
    -Noel

  • How to find a certain usage of a specific value inside an SSIS package

    Hi,
    In T-SQL, there are many tools to search for instances of a specific value in all the objects such as tables and SPs.
    The only way I can think of in SSIS, is to search for a value in the XML of the DTSX, but it is not that user friendly.
    Are there any existing tools or other ways for a value search that can assist ?
    Thanks,
    Dani

    Since a package is just a plain text XML file thus  you are able to perform a text search in the file.
    http://sqlblog.com/blogs/jamie_thomson/archive/2012/06/12/using-find-replace-with-regular-expressions-inside-a-ssis-package.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How can I list all folders that contain files with a specific file extension? I want a list that shows the parent folders of all files with a .nef extension.

    not the total path to the folder containing the files but rather just a parent folder one level up of the files.
    So file.nef that's in folder 1 that's in folder 2 that's in folder 3... I just want to list folder 1, not 2 or 3 (unless they contain files themselves in their level)

    find $HOME -iname '*.nef' 2>/dev/null | awk -F '/'   'seen[$(NF-1)]++ == 0 { print $(NF-1) }'
    This will print just one occurrence of directory
    The 'find' command files ALL *.nef files under your home directory (aka Folder)
    The 2>/dev/null throws away any error messages from things like "permissions denied" on a protected file or directory
    The 'awk' command extracts the parent directory and keeps track of whether it has displayed that directory before
    -F '/' tells awk to split fields using the / character
    NF is an awk variable that contains the number of fields in the current record
    NF-1 specifies the parent directory field, as in the last field is the file name and minus one if the parent directory
    $(NF-1) extracts the parent directory
    seen[] is a context addressable array variable (I choose the name 'seen'). That means I can use text strings as lookup keys.  The array is dynamic, so the first time I reference an element, if it doesn't exist, it is created with a nul value.
    seen[$(NF-1)] accesses the array element associated with the parent directory.
    seen[$(NF-1)]++ The ++ increments the element stored in the array associated with the parent directory key AFTER the value has been fetched for processing.  That is to say the original value is preserved (short term) and the value in the array is incremented by 1 for the next time it is accessed.
    the == 0 compares the fetched value (which occurred before it was incremented) against 0.  The first time a unique parent directory is used to access the array, a new element will be created and its value will be returned as 0 for the seen[$(NF-1)] == 0 comparison.
    On the first usage of a unique parent directory the comparison will be TRUE, so the { print $(NF-1) } action will be performed.
    After the first use of a unique parent directory name, the seen[$(NF-1)] access will return a value greater than 0, so the comparison will be FALSE and thus the { print $(NF-1)] } action will NOT be performed.
    Thus we get just one unique parent directory name no matter how many *.nef files are found.  Of course you get only one unique name, even if there are several same named sub-directories but in different paths
    You could put this into an Automator workflow using the "Run Shell Script" actions.

  • How can I build a table with the time values of a timer from a while loop

    Hi:
    I have a question concerning building a table:
    Every 100ms I read a value from a sensor (while loop with a timer). I would like to build a table with the actual time and the concerning value. For example:
    0msec         1V
    100msec     2V
    200msec     3V
    300msec     4V
    etc.
    If I use the Express VI for building a table, I always get the date and time, but I don't need the date and the time is in the following format: HH:MMS, which is nonsensical for me as I can't differentiate within msec. Can I change the format anywhere?
    Can I also save the table to a file or even to an Excelsheet? How can I do that?
    Thanks for your help!

    Hi Craig:
    thank you very much. To solve the mystery : ) :
    I want to drive a stepper motor with a specific frequency. To get the current degree value of the motor I would like to measure the current time (from the beginning of the move on). (With a formula I get the degree value out of the time)
    Concurrently I would like to get data from a torque sensor and from a pressure sensor. That's why I asked you about the time and the table. The measurement should start with the movement of the motor. How can I do that? Right now I have different block diagrams (different while loops) (see attachment) and I would like to put them in one.
    I haven't done the block diagram for the pressure sensor yet, so there is only the one for the torque sensor and the one for the motor.
    I also would like to set a mark in the table when the voltage value of an analog input gets under a specific threshold value. Is that possible?
    I'm sorry, I'm a novice in LabVIEW. But maybe you can help me.
    Thank you very much!
    Steffi
    Attachments:
    motor.vi ‏238 KB
    sensor.vi ‏59 KB

  • Sorting based on a specific value in Columns

    Hi All,
    Crystal 2008 version I have. And we are connecting to BW queries as source.
    In a crosstab, I want to sort my row values based on a column value.
    For example, in rows I have an element with three values . In column I have only one element(month), with couple of month values. My requirement is to sort rows based on a specific month (Mar'09 for example).
    .....................Jan'09......Feb'09.....Mar'09
    ABC...............10.............323...........33....
    XYZ...............32..............33............11....
    FGH...............5................34.............55...
    But when I try to sort based on the Month, I can not select a specific value(mar'09). And it sorts based on the total value (sum of all months).
    How can I achieve this problem?
    Thanks
    Ozan

    For {Sort Value}, if you wanted to sort on the Jan column, then substitute the field name that your example shows as 10 in row ABC.  For {row value}, substitute the field name that is used in the first column (ABC in the example).
    In other words, take the value that you want to sort on, and put it in front of the value currently displaying as the row header.  Then, sort on the results.
    The purpose of the "000000000.00" is to make the length of the number, when converted to string, a consistent size.  This is needed (a) so you know how many characters to strip off when displaying the row value, and (b) so the records don't sort as 1, 12, 2, 234, 235423, 25, 3, ...
    HTH,
    Carl

  • Filtering a Query result for a specific value of a key figure

    Hi folks,
    I want to filter a query for a specific value of a key figure. The report should display all customer who has an account balance greater than EUR 500'000.
    Can I only implement this kind of filter via a condition in Query-Designer? If I run that query on an InfoCube with non-cumulative key figures over all our customers (> 400'000) I have problems with the consumption of the memory. If I restrict the amount of the customers to 50'000 - 60'000 then it works. It seems that the query reads all customer records in an internal table before applying the condition.
    Is there another way to deal with? Any help appreciated.
    Kind regards
    Hansjörg Luzi
    Graubündner Kantonalbank
    CH-7002 Chur

    You could try to implement an alternative solution: define a new Characteristc with discrete values (in the following example I suppose to have intervals of 10)
    KF -> CHAR
    115 -> 110 (110 <= KF < 120)
      5 ->   0 (  0 <= KF <  10)
    83 ->  80 ( 80 <= KF <  90)
    Then you can use these dicrete values to filter ...
    I know that it's not so "flexible" (discetization must be predefined), but query response time is quicker and you can use Aggregates ...
    Hope it helps
    GFV

Maybe you are looking for

  • Repeated Error Message with Adobe Reader after opening up PDF files

    After experiencing this problem, not being that computer savvy I figured I'd remove the existing Adobe Reader from my computer and download a new version in the hopes of eliminating the problem. When I do so, I get message "The patch package could no

  • Pdfs open as blank pages in Safari, Preview, and Evernote

    Hi everybody! I am experiencing problems with viewing pdfs in Safari and Preview, as well as third party apps such as Evernote. Some pdfs open fine and as always, others will just open as an assortment of blank pages. Interestingly enough, I have had

  • Audio Jack Issue

    I got a new 12 core Mac Pro about a month ago. Purchased with two Cinema Displays. Last week I bought some speakers and only the left speaker is was putting out sound. I thought maybe I had a bad set with a short so I returned it and bought a new dif

  • Is iMovie good for serving as a movie library?

    I am new to iMovie. I have many small video clips from various digital cameras (and the Flip) spanning many years. I would like to organize and browse through them all. Is iMovie good for this? In other words, does it work like iPhoto? I use iPhoto t

  • [CS2 Windows] voscache

    Hi all, I recently had a problem with a document. When I tried to open it, I got an Assert saying "cache bad, should match" from "c:\development\firedrake_highprofile\components\text\textvos\voscache.cpp" InDesign then crashed and I had no way to rec