How to get certain applied styles using script?

Hi All,
I need to know how to get certain applied styles using ID Scripting. I don't have much experience in InDesign so need some help.
Here is a screenshot with a sample text with the said styles applied and highlighted.
I need to know what texts in my document have these styles applied like All Caps, Strikethrough, Underline, Subscript and Superscript etc.
Please help.
Thanks!

Hi Poortip87
The first thing you have to understand is how to refer to "where" you want to apply the style.
If you want the script to apply the style to the selected text then you would use for example app.selection[0].strikeThru = true;
If you for example want to underline the last word of the first paragraph of the first story you would use app.activeDocument.stories[0].paragraphs[0].words[-1].underline = true;
If you just wanted the first letter of that word underlined then you would add .characters[0] after the words[-1]
To for example apply All Caps to all the text in all the stories you would use
app.activeDocument.stories.everyItem().texts[0].capitalization = Capitalization.ALL_CAPS;
The easiest way to find how to set properties to a selections is to set them manually and make the selection and then run the script below.
You should be able to find all the properties you want very easily after running the script.
Or you can use Jongwares excellent reference guide. Indesign JavaScript Help
HTH
Trevor
// script to show most of the selection properties by Trevor
// Creative-Scripts.Com (Still not ready!) available (sometimes) for custom scripts $$$
// scripts {at} Creative-Scripts [dot] Com
$.level = 0; // set debug mode to allow try catch (not read only as stated in manual);
if (!app.selection.length) exit();
var c = 0, s = app.selection[0], p,
      a = [], n, er;
for (n in s) {
    try {
        p = s[n];
        if (p && p.constructor.name === "Enumerator") p = getEnum(p ,n);
        a[c++] = n + ": " + p;
    } catch (er) {a[c++] = n + ": ???"}
var f = new File (Folder.temp + +(new Date) + ".txt");
f.open('r');
f.encoding = "UTF-8";
f.lineFeed = ($.os[0]=="M") ? "Macintosh" :" Windows";
f.open('w');
f.write("\uFEFF" + a.join("\r"));
f.close();
$.sleep(300);
f.execute(true);
function getEnum (q, n) {
    var enums = ["AcrobatCompatibility",
    "AddPageOptions",
    "AdornmentOverprint",
    "AlignDistributeBounds",
    "AlignOptions",
    "AlignmentStyleOptions",
    "AlternateGlyphForms",
    "AlternatingFillsTypes",
    "AnchorPoint",
    "AnchorPosition",
    "AnchoredRelativeTo",
    "AnimationEaseOptions",
    "AnimationPlayOperations",
    "AntiAliasType",
    "ArrangeBy",
    "ArrowHead",
    "AssetType",
    "AssignmentExportOptions",
    "AssignmentStatus",
    "AutoEnum",
    "AutoSizingReferenceEnum",
    "AutoSizingTypeEnum",
    "BalanceLinesStyle",
    "BaselineFrameGridRelativeOption",
    "BaselineGridRelativeOption",
    "BehaviorEvents",
    "BevelAndEmbossDirection",
    "BevelAndEmbossStyle",
    "BevelAndEmbossTechnique",
    "BindingOptions",
    "BitmapCompression",
    "BlendMode",
    "BlendingSpace",
    "BookContentStatus",
    "BookletTypeOptions",
    "BoundingBoxLimits",
    "BuildingBlockTypes",
    "BulletCharacterType",
    "BulletListExportOption",
    "Capitalization",
    "ChangeBackgroundColorChoices",
    "ChangeCaseOptions",
    "ChangeConditionsModes",
    "ChangeMarkings",
    "ChangeTextColorChoices",
    "ChangeTypes",
    "ChangebarLocations",
    "ChangecaseMode",
    "ChapterNumberSources",
    "CharacterAlignment",
    "CharacterCountLocation",
    "CharacterDirectionOptions",
    "ClippingPathType",
    "ColorModel",
    "ColorOutputModes",
    "ColorRenderingDictionary",
    "ColorSettingsPolicy",
    "ColorSpace",
    "ComposeUsing",
    "CompressionQuality",
    "ConditionIndicatorMethod",
    "ConditionIndicatorMode",
    "ConditionUnderlineIndicatorAppearance",
    "ContainerType",
    "ContentType",
    "ContourOptionsTypes",
    "ConvertPageBreaks",
    "ConvertShapeOptions",
    "ConvertTablesOptions",
    "CoordinateSpaces",
    "CopyrightStatus",
    "CornerOptions",
    "CreateProxy",
    "CrossReferenceType",
    "CursorTypes",
    "CustomLayoutTypeEnum",
    "DataFormat",
    "DefaultRenderingIntent",
    "DesignOptions",
    "DiacriticPositionOptions",
    "DigitsTypeOptions",
    "DimensionsConstraints",
    "DisplayOrderOptions",
    "DisplaySettingOptions",
    "DistributeOptions",
    "DocumentIntentOptions",
    "DocumentPrintUiOptions",
    "DynamicDocumentsJPEGQualityOptions",
    "DynamicDocumentsTextExportPolicy",
    "DynamicMediaHandlingOptions",
    "DynamicTriggerEvents",
    "EPSColorSpace",
    "EPSImageData",
    "EditingState",
    "EmptyFrameFittingOptions",
    "EndCap",
    "EndJoin",
    "EpubCover",
    "EpubVersion",
    "EventPhases",
    "ExportFormat",
    "ExportLayerOptions",
    "ExportOrder",
    "ExportPresetFormat",
    "ExportRangeOrAllPages",
    "FeatherCornerType",
    "FeatherMode",
    "FeatureSetOptions",
    "FindChangeTransliterateCharacterTypes",
    "FirstBaseline",
    "FitDimension",
    "FitMethodSettings",
    "FitOptions",
    "Fitting",
    "FlattenerLevel",
    "Flip",
    "FlipValues",
    "FloatingWindowPosition",
    "FloatingWindowSize",
    "FollowShapeModeOptions",
    "FontDownloading",
    "FontEmbedding",
    "FontStatus",
    "FontTypes",
    "FootnoteFirstBaseline",
    "FootnoteMarkerPositioning",
    "FootnoteNumberingStyle",
    "FootnotePrefixSuffix",
    "FootnoteRestarting",
    "GIFOptionsPalette",
    "GlobalClashResolutionStrategy",
    "GlobalClashResolutionStrategyForMasterPage",
    "GlowTechnique",
    "GoToZoomOptions",
    "GradientType",
    "GridAlignment",
    "GridViewSettings",
    "GuideTypeOptions",
    "HeaderFooterBreakTypes",
    "HeaderTypes",
    "HorizontalAlignment",
    "HorizontalOrVertical",
    "HyperlinkAppearanceHighlight",
    "HyperlinkAppearanceStyle",
    "HyperlinkAppearanceWidth",
    "HyperlinkDestinationPageSetting",
    "ICCProfiles",
    "IconSizes",
    "ImageAlignmentType",
    "ImageConversion",
    "ImageDataTypes",
    "ImageExportOption",
    "ImageFormat",
    "ImagePageBreakType",
    "ImageResolution",
    "ImageSizeOption",
    "ImportFormat",
    "ImportPlatform",
    "ImportedPageCropOptions",
    "InCopyUIColors",
    "IndexCapitalizationOptions",
    "IndexFormat",
    "InkTypes",
    "InnerGlowSource",
    "InteractiveElementsOptions",
    "InteractivePDFInteractiveElementsOptions",
    "JPEGOptionsFormat",
    "JPEGOptionsQuality",
    "JoinOptions",
    "JpegColorSpaceEnum",
    "Justification",
    "KashidasOptions",
    "KentenAlignment",
    "KentenCharacter",
    "KentenCharacterSet",
    "KinsokuHangTypes",
    "KinsokuSet",
    "KinsokuType",
    "LanguageAndRegion",
    "LayoutRuleOptions",
    "Leading",
    "LeadingModel",
    "LibraryPanelViews",
    "LineAlignment",
    "LineSpacingType",
    "LinkStatus",
    "ListAlignment",
    "ListType",
    "LiveDrawingOptions",
    "Locale",
    "LocationOptions",
    "LockStateValues",
    "MapType",
    "MarkLineWeight",
    "MarkTypes",
    "MatrixContent",
    "MeasurementUnits",
    "MojikumiTableDefaults",
    "MonoBitmapCompression",
    "MoviePlayOperations",
    "MoviePosterTypes",
    "NestedStyleDelimiters",
    "NoteBackgrounds",
    "NoteColorChoices",
    "NothingEnum",
    "NumberedListExportOption",
    "NumberedParagraphsOptions",
    "NumberingStyle",
    "OTFFigureStyle",
    "ObjectTypes",
    "OpenOptions",
    "OpenTypeFeature",
    "OutlineJoin",
    "OverrideType",
    "PDFColorSpace",
    "PDFCompressionType",
    "PDFCrop",
    "PDFJPEGQualityOptions",
    "PDFMarkWeight",
    "PDFProfileSelector",
    "PDFRasterCompressionOptions",
    "PDFXStandards",
    "PNGColorSpaceEnum",
    "PNGExportRangeEnum",
    "PNGQualityEnum",
    "PPDValues",
    "PageBindingOptions",
    "PageColorOptions",
    "PageLayoutOptions",
    "PageNumberPosition",
    "PageNumberStyle",
    "PageNumberingOptions",
    "PageOrientation",
    "PagePositions",
    "PageRange",
    "PageReferenceType",
    "PageSideOptions",
    "PageTransitionDirectionOptions",
    "PageTransitionDurationOptions",
    "PageTransitionOverrideOptions",
    "PageTransitionTypeOptions",
    "PageViewOptions",
    "PaginationOption",
    "PanelLayoutResize",
    "PanningTypes",
    "PaperSize",
    "PaperSizes",
    "ParagraphDirectionOptions",
    "ParagraphJustificationOptions",
    "PathType",
    "PathTypeAlignments",
    "PdfMagnificationOptions",
    "PerformanceMetricOptions",
    "PlacedVectorProfilePolicy",
    "PlayOperations",
    "PointType",
    "Position",
    "PositionalForms",
    "PostScriptLevels",
    "PreflightLayerOptions",
    "PreflightProfileOptions",
    "PreflightRuleFlag",
    "PreflightScopeOptions",
    "PreviewPagesOptions",
    "PreviewSizeOptions",
    "PreviewTypes",
    "PrintLayerOptions",
    "PrintPageOrientation",
    "Printer",
    "PrinterPresetTypes",
    "Profile",
    "ProofingType",
    "RangeSortOrder",
    "RasterCompressionOptions",
    "RasterResolutionOptions",
    "RecordSelection",
    "RecordsPerPage",
    "RenderingIntent",
    "RepaginateOption",
    "ResizeConstraints",
    "ResizeMethods",
    "ResolveStyleClash",
    "RestartPolicy",
    "RotationDirection",
    "RowTypes",
    "RubyAlignments",
    "RubyKentenPosition",
    "RubyOverhang",
    "RubyParentSpacing",
    "RubyTypes",
    "RuleDataType",
    "RuleWidth",
    "RulerOrigin",
    "SWFBackgroundOptions",
    "SWFCurveQualityValue",
    "Sampling",
    "SaveOptions",
    "ScaleModes",
    "Screeening",
    "ScreenModeOptions",
    "ScriptLanguage",
    "SearchModes",
    "SearchStrategies",
    "SelectAll",
    "SelectionOptions",
    "Sequences",
    "ShadowMode",
    "SignatureSizeOptions",
    "SingleWordJustification",
    "SmartMatchOptions",
    "SnapshotBlendingModes",
    "SortAssets",
    "SoundPosterTypes",
    "SourceFieldType",
    "SourceSpaces",
    "SourceType",
    "SpanColumnCountOptions",
    "SpanColumnTypeOptions",
    "SpecialCharacters",
    "SpreadFlattenerLevel",
    "StartParagraph",
    "StateTypes",
    "StaticAlignmentOptions",
    "StoryDirectionOptions",
    "StoryHorizontalOrVertical",
    "StoryTypes",
    "StrokeAlignment",
    "StrokeCornerAdjustment",
    "StrokeFillProxyOptions",
    "StrokeFillTargetOptions",
    "StrokeOrderTypes",
    "StyleConflict",
    "StyleSheetExportOption",
    "SyncConflictResolution",
    "TabStopAlignment",
    "TableDirectionOptions",
    "TableFormattingOptions",
    "TagRaster",
    "TagTextExportCharacterSet",
    "TagTextForm",
    "TagTransparency",
    "TagType",
    "TagVector",
    "TaggedPDFStructureOrderOptions",
    "TaskAlertType",
    "TaskState",
    "TextExportCharacterSet",
    "TextFrameContents",
    "TextImportCharacterSet",
    "TextPathEffects",
    "TextStrokeAlign",
    "TextTypeAlignments",
    "TextWrapModes",
    "TextWrapSideOptions",
    "ThumbsPerPage",
    "TilingTypes",
    "ToolTipOptions",
    "ToolsPanelOptions",
    "TrapEndTypes",
    "TrapImagePlacementTypes",
    "Trapping",
    "UIColors",
    "UITools",
    "UndoModes",
    "UpdateLinkOptions",
    "UserInteractionLevels",
    "VariableNumberingStyles",
    "VariableScopes",
    "VariableTypes",
    "VersionCueSyncStatus",
    "VersionState",
    "VerticalAlignment",
    "VerticalJustification",
    "VerticallyRelativeTo",
    "ViewDisplaySettings",
    "ViewZoomStyle",
    "WarichuAlignment",
    "WatermarkHorizontalPositionEnum",
    "WatermarkVerticalPositionEnum",
    "WhenScalingOptions",
    "XFLRasterizeFormatOptions",
    "XMLElementLocation",
    "XMLElementPosition",
    "XMLExportUntaggedTablesFormat",
    "XMLFileEncoding",
    "XMLImportStyles",
    "XMLTransformFile",
    "ZoomOptions"];
    var l = enums.length,
        s = q.toString(), e, er, a;
    while (l--) {
        try {
            e = $.global [enums[l]];
            if (e.hasOwnProperty (s) && q === e[s]) {
                a = e.reflect.properties;
                a.pop();
                a = (a.length < 2) ? "" : "\r[Possible " + enums[l]+ " Enumerations for " + n + "]:\r" + enums[l] + "." + a.join ("\r" + enums[l] + ".");
                return enums[l] + "." + q.toString () + a;
        catch (er) {};
    return "???." + q.toString ();

Similar Messages

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scripting

    how to get all how to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a  indesign file and write all info with para info into txt file with scripting

    I write the script this one works
              var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
      for(var i=par.length-1;i>=0;i--)
           var font=par[i].appliedParagraphStyle.name;
            var font1=par[i].appliedFont.name;
             var size=par[i].pointSize;
            WriteToFile (par[i].contents  +   "\r" +  "Style  : " + font  + "\r" +  "FONT1  : " + font1  + "\r" +  "Size  : " + size  + "\r", reportFilePath);
                            function WriteToFile(text, reportFilePath) { 
        file = new File(reportFilePath); 
        file.encoding = "UTF-8"; 
        if (file.exists) { 
            file.open("e"); 
            file.seek(0, 2); 
        else { 
            file.open("w"); 
          file.writeln(text);  
        file.close(); 
    Thanks for all your support

  • How to get the last page  SAP Script form

    How to get the last page  SAP Script form.
    I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
    Regards

    Hi
    You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
    From SAP Help:
    This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
    Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
    /: IF &NEXTPAGE& = '0'
       Last page
    /: ENDIF
    Max

  • How to get web application to use Tuscany without conflicting with SAP SDO

    Hi,
    We are attempting to run a web application on SAP NetWeaver CE 7.1 SP1 which uses Tuscany SDO.  As it now stands We must use Tuscany because the web application will not run with the SAP SDO implementation provided by Netweaver. To ensure that Tuscany is loaded with priority, we have packaged the Tuscany JAR files and their dependencies as a heavy resource, as described here:
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60642a88-95fe-2b10-d387-a245d48fc257?overridelayout=true
    The final check showed that Tuscany was correctly deployed as a heavy resource and included the following JAR files:
    common-2.2.3.jar
    ecore-2.2.3.jar
    ecore-change-2.2.3.jar
    ecore-xmi-2.2.3.jar
    tuscany-sdo-impl-1.1.1.jar
    tuscany-sdo-lib-1.1.1.jar
    tuscany-sdo-tools-1.1.1.jar
    xsd-2.2.3.jar
    We also verified that the web application using Tuscany has a hard reference to the Tuscany heavy resource.
    However, when we try to run the web application, the following error is logged:  java.lang.LinkageError: Class commonj/sdo/DataGraph violates loader constraints
    The issue is definitely due to some kind of classloading conflict with the SAP SDO library, as the application runs normally when SAP SDO is manually removed from the classpath. Doing this on a production system is unfortunately not an option, though.
    So the question is: how to get web application to use Tuscany without conflicting with SAP SDO?

    I took a look at the "printerReady" example.  Looks like I may be able to use the InetPing (...) function to ping through a range of IP addresses looking for a response.
    Any ideas on how to find the MAC address associated with the IP addresses that respond?
    We may have multiple units responding and the MAC address will allow the operator to determing which unit to connect to.
    I'll try the InetPing to see how it works,
    Kirk

  • Since I upgraded to os 5.1 for my iPhone I can no longer type in reminders. Any suggestions how to get around having to use siri for reminders?

    since I upgraded to os 5.1 for my iPhone I can no longer type in reminders. Any suggestions how to get around having to use siri for reminders?

    Unfortunately, I have a very similar problem. Since I upgraded to os 5.1 on my new iPhone 4S the reminders screen will not add new reminders or scroll up and down. What's more strange is the screen will still scroll side to side allowing access to the Completed list, and both the Completed list and Date functions work normally so this must be an upgrades glitch.

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • How to get a field that using variable in order to create a query

    Hi,
    I found a difficulty when creating a query. so, I would like to ask you some question.
    1. How to get a field that using variable which that field I want to put it in my query?
    For example, I would like to take quantity field in inventory audit report. And when I put my cursor in
    quantity field, there was only variable, item, etc. How to get this and put it in query?
    2. How to combined the invoice quantity with inventory audit report quantity?
    3. I have a query like this:
    SELECT distinct T0.[DocDate] as 'Tanggal', T0.[DocNum] as 'No.Faktur', T1.[ItemCode] as 'Kode Barang',
    T1.[Dscription] as 'Deskripsi', T1.[Quantity] as 'Quantity', ((T1.[LineTotal])/(T1.[Quantity])) as 'Harga
    Satuan', T1.[LineTotal] as 'Harga Total', T3.[CalcPrice] as 'HPP Satuan', ((T3.[CalcPrice]) * (T1.
    [Quantity])) as 'HPP Total', T4.[ItmsGrpNam] as 'Jenis Barang', T5.[SlpName] as 'Nama Sales', T1.
    [WhsCode] as 'Kode Gudang' FROM [dbo].[OINV] T0 INNER JOIN [dbo].[INV1] T1 ON T0.DocEntry =
    T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OINM T3 ON T2.ItemCode
    = T3.ItemCode INNER JOIN OITB T4 ON T2.ItmsGrpCod = T4.ItmsGrpCod INNER JOIN OSLP T5 ON
    T0.SlpCode = T5.SlpCode WHERE T3.[TransType] = '13' and T3.[CreatedBy] = T1.[DocEntry] and T0.
    [DocDate] >=[%0] and T0.[DocDate] <=[%1] and T4.[ItmsGrpNam] =[%2] and T1.[WhsCode] =[%3]
    Is it possible if I just take one invoice with invoice quantity and only show up at once although I have a
    lot item cost for that item? (because I'm using FIFOmethod).
    Please help me.. cause I'm stuck with this thing :l.
    Thank you very much, and I'm waiting your respon soon.
    Regards,
    Sisca

    Try this one:
    SELECT distinct T0.DocDate as 'Tanggal', T0.DocNum as 'No.Faktur', T1.ItemCode as 'Kode Barang',
    T1.Dscription as 'Deskripsi', T1.Quantity as 'Quantity', ((T1.LineTotal)/(T1.Quantity)) as 'Harga
    Satuan', T1.LineTotal as 'Harga Total', T3.CalcPrice as 'HPP Satuan', ((T3.CalcPrice) * (T1.
    Quantity)) as 'HPP Total', T4.ItmsGrpNam as 'Jenis Barang', T5.SlpName as 'Nama Sales', T1.
    WhsCode as 'Kode Gudang'
    FROM dbo.OINV T0 INNER JOIN dbo.INV1 T1 ON T0.DocEntry =T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OINM T3 ON T2.ItemCode = T3.ItemCode AND T3.TransType = '13' and T3.CreatedBy = T1.DocEntry AND T3.Warehouse = T1.WhsCode
    INNER JOIN OITB T4 ON T2.ItmsGrpCod = T4.ItmsGrpCod
    INNER JOIN OSLP T5 ON T0.SlpCode = T5.SlpCode
    WHERE T0.DocDate >=[%0\] and T0.DocDate <=[%1\] and T4.ItmsGrpNam =[%2\] and T1.WhsCode =[%3\]
    Thanks,
    Gordon

  • How to get the list of Used Quotations & Non Used Quotations

    Hi MM Gurus,
    How to get the list of Used Quotations & Non Used Quotations.
    i am not talking about Open quotation ,closed quotation..
    if once i created PO through quotation it should be used quotation. i not created PO through quotation
    it s should be Non used quotation. how to get this list through when we create PO  through ME21N
    document over view. is there any opetion in Dynamic selection or somthing ..???
    Thanks in Advance..
    Anthyodaya.

    ok.

  • How to get list of tables used in packages

    Dear All
    Can you pls tell me how to get list of tables used in packages
    Regards

    select referenced_name
      from user_dependencies
    where name = 'your_package'
       and referenced_type = 'TABLE'Regards,
    Rob.

  • I have a JVC video camera and it records the video to a .mod format (which Apple devices don't support). I figured out how to get them to iPhoto using iMovie but I want to be able to get the videos on my iPad 2 but it won't let it sync. Any help?

    I have a JVC video camera and it records the video to a .mod format (which Apple devices don't support). I figured out how to get them to iPhoto using iMovie but I want to be able to get the videos on my iPad 2 but it won't let it sync. Any help?

    Thanks for that. Much more constructive than the last comment. It's only the restriction code I can't recall, not the access passcode. So I can currently access the device, just not age restricted content. Does that's make a difference? I also wondered if anyone knew how many attempts you get to try to get it right. Now tried 21 times and so far nothing bad has happened but I am concerned I'll eventually be completely locked out of the device. That doesn't seem in the spirit of things though. Surely it's foreseeable that a child could repeatedly try to guess the code so I can't see that it would be right to lock the device down completely in that circumstance, particularly if the access code is being typed in correctly every time.
    Thanks

  • How to get pivot table by using dates

    Hi,
    How to get pivot table by using dates in column.
    Below is the sample table and its value is given.
    create table sample1
    Order_DATE       DATE,
    order_CODE       NUMBER,
    Order_COUNT   NUMBER
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,232);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,935);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,43);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,5713);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,11346);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,368);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,1380);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,133);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,7109);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,14336);
    select * from sample1;So how to get the data like below.
              order_date
    order_code 30-sep-12 29-sep-12
    1 232 368
    2 935 1380
    3 43 133
    4 5713 7109
    5 11345 14336

    Using the extra data I inserted in my previous reply:select ORDER_CODE,
    SUM(DECODE(extract (month from ORDER_DATE),1,ORDER_COUNT,0)) JAN,
    SUM(DECODE(extract (month from ORDER_DATE),2,ORDER_COUNT,0)) FEB,
    SUM(DECODE(extract (month from ORDER_DATE),3,ORDER_COUNT,0)) MAR,
    SUM(DECODE(extract (month from ORDER_DATE),4,ORDER_COUNT,0)) APR,
    SUM(DECODE(extract (month from ORDER_DATE),5,ORDER_COUNT,0)) MAY,
    SUM(DECODE(extract (month from ORDER_DATE),6,ORDER_COUNT,0)) JUN,
    SUM(DECODE(extract (month from ORDER_DATE),7,ORDER_COUNT,0)) JUL,
    SUM(DECODE(extract (month from ORDER_DATE),8,ORDER_COUNT,0)) AUG,
    SUM(DECODE(extract (month from ORDER_DATE),9,ORDER_COUNT,0)) SEP,
    SUM(DECODE(extract (month from ORDER_DATE),10,ORDER_COUNT,0)) OCT,
    SUM(DECODE(extract (month from ORDER_DATE),11,ORDER_COUNT,0)) NOV,
    SUM(DECODE(extract (month from ORDER_DATE),12,ORDER_COUNT,0)) DEC
    from SAMPLE1
    where trunc(order_date, 'YY') = trunc(sysdate, 'YY')
    group by order_code
    order by order_code;
    ORDER_CODE JAN FEB MAR APR MAY JUN JUL AUG   SEP   OCT NOV DEC
             1   0   0   0   0   0   0   0   0   600   600   0   0
             2   0   0   0   0   0   0   0   0  2315  2315   0   0
             3   0   0   0   0   0   0   0   0   176   176   0   0
             4   0   0   0   0   0   0   0   0 12822 12822   0   0
             5   0   0   0   0   0   0   0   0 25682 25682   0   0Now a bit of explanation.
    1) Whenever you pivot rows to columns, no matter what version of Oracle and no matter what method you use, you have to decide in advance how many columns you are going to have and what the names of the columns are. This is a requirement of the SQL standard.
    2) I use the WHERE clause to get just the data for this year
    3) With EXTRACT, I get just the month without the year.
    4) Using DECODE, I put every month's data into the correct column
    5) Once I do all that, I can just GROUP BY order_code while SUMming all the data for each month.

  • Help , How to get data from database using recordset with UI API

    I want to get a data from database
    when I want to create recordset i notice that UI API didn't has record set
    so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
    ======================================================
    Dim oCompanyUI As SAPbouiCOM.Company <<UI API
    Dim oRecSet As New SAPbobsCOM.Recordset << DI API
    Dim oCompanyDI As New SAPbobsCOM.Company << DI API
    '=====================================================
    oCompanyDI.Connect
    Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
    oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
    SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
    ======================================================
    but I got an error it said "you are not connected to company"
    I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
    can someone help me please, I really need it
    Thanks

    you need a single sign on
            Dim oDICompany As SAPbobsCOM.Company
            Dim sCookie As String
            Dim sConnStr As String
            Dim ret As Integer
            oDICompany = New SAPbobsCOM.Company
            sCookie = oDICompany.GetContextCookie
            sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
            If oDICompany.Connected Then
                oDICompany.Disconnect()
            End If
            ret = oDICompany.SetSboLoginContext(sConnStr)
            If Not ret = 0 Then
                SBO_Application.MessageBox("set Login Context failed!")
                Exit Sub
            End If
            ret = oDICompany.Connect()
            If Not ret = 0 Then
                SBO_Application.MessageBox("Company Connect failed!")
            End If

  • How to get accurate photo printouts using calibrated FlexScan S1932 , Photoshop CS3 and Canon MX925 ? ALL ARE calibrated with i1Pro . WHO SHOULD GOVERN THE PRINTOUT , THE CS3 OR THE PRINTER ?

    How to get accurate photo printouts using  FlexScan S1932 screen, Photoshop CS3 and Canon MX925 ? ALL ARE calibrated with i1Pro . WHO SHOULD GOVERN THE PRINTOUT , THE CS3 OR THE PRINTER ?

    You need to work with the calibration parameters to get a good match from screen to print. There are no fixed values - basically whatever settings produce a match are the right ones.
    First, set the white point - luminance and color - so that screen white is a visual equivalent to paper white. You can be very specific about this, with a viewing booth right next to the display and a particular paper as target. Or you can take a more generalistic approach. That too will usually work well, as long as you keep the aim in sight: screen white = paper white.
    Don't trust the white point presets. You will usually have to adjust to compensate for your working environment. Make sure you can adjust both along the blue/yellow Kelvin scale and the green/magenta axis. Any given Kelvin value may well be wrong on the green/magenta axis.
    Next set a realistic black point. This is important. Monitor manufacturers throw about completely unrealistic contrast ranges that you will never see on paper. A good glossy inkjet paper will be in the vicinity of 250-300:1, or a black point around 0.4 - 0.5 cd/m² if your white point is at 120. If you have a monitor that goes down to, say, 0.2, which most monitors today will, you're in for an unpleasant surprise.
    Leave gamma at 2.2. Gamma is remapped from profile to profile and is "invisible" - the net result is always linear. You just want to stay close to native so that the monitor behaves at its best.
    If you have a wide gamut monitor soft proofing in Photoshop can be useful. With a standard gamut monitor it's mostly a waste of time since monitor gamut is the limiting one.
    Oh, and let Photoshop manage color. Make sure you have the right paper/ink profile and also make sure you have the right paper selected in the printer driver. This controls the total amount of ink.

  • I had a "pdf export" plan and upgraded it to "pdf pack" plan and it was charged the full price of the new plan in my credit card. How to get back the non used part of the old plan?

    I had a "pdf export" plan and upgraded it to "pdf pack" plan and it was charged the full price of the new plan in my credit card. How to get back the non used part of the old plan?

    Hi edilsoncf,
    I've seen your question on several forums, and responded there. Did you get your subscription sorted out?
    See: How do I get a refund if I have multiple Acrobat service subscriptions?
    Best,
    Sara

Maybe you are looking for

  • How to get the latest version of FCPX? new iOS make it doesn't work :(

    i really need help about this

  • HP S2031 MONITOR

    THE MONITOR REFLECTS THAT THE CURRENT RESOLUTION IS 1440 X 900, HOWEVER, I HAVE REPEATEDLY SET THE RESOLUTION AT 1600 X 900 ON MY DESKTOP. HP SLIMLINE S7600E XP SP3. THE RESOLUTION AT 1440 X 900 IS BLURRED AND SEEMS TO BE THE BEST I CAN SECURE ... WO

  • E65 and Pocket PC

    I'm trying to link my Pocket PC with my E65, have done the bluetooth bit for file transfers but looking to get a web connection through the phone (for TomTom traffic updates)but with no joy.. The E65 has a modem but Ihave no idea how to connect or wh

  • Safari 4.0 issues

    Hi, i installed the new safari, but now its crashes my net connection for all browsers!, opera, and firefox does not connect at all once, safari drops the connection, but i'm still connected, i'm on wireless but my room is the closest to the router,

  • Generate password protected zip file

    Hi, I have a requirement of creating password protected zip file. Any guidance would much appreciate. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production Thanks in advance Prashant