Binary comparison and linguistic comparisons

I was doing some performance testing to see if I have linguistic comparisons turned on at a session level and NLS_Sort set to Japanese_M, can I still perform binary comparisons on some of my columns and make them use the binary index.
I was pleasently surprised to see that this worked.
alter session set nls_sort=Japanese_M nls_comp=linguistic
select * from test where nlssort(id, 'NLS_Sort=Binary') = nlssort('00000000-0000-0000-0000-000000000001', 'NLS_Sort=Binary');
As per the explain plan this was using the Binary index. I would have thought that since I am using a function nlssort, I would probably have to create a function base binary index for this to work.

The parser is clever enough, in some contexts, to recognize NLSSORT(...,'NLS_SORT=BINARY') and remove it from the query. This is the opposite operation to adding NLSSORT implicitly when NLS_COMP=ANSI/LINGUISTIC.
-- Sergiusz

Similar Messages

  • Linguistic comparison - When is it required

    I have a question if linguistic comparison is required with operators like =
    Also lets assume that I am not interested in performing a case insensitive or accent insensitive search.
    My query may be something like
    Select * from test where name = '{Japanese_Name}'
    It looks like for cases where you are not interested in case or accent insensitivity there may not be a need to use linguistic comparison with = operator. Is this assumption correct.

    I think all the document tells us is that NLS_Sort applies to = operator when NLS_Comp is set to Linguistic.
    It still leaves us with the same open question of whether there is a need to make a query linguistic if it does not need to be case or accent insensitive. ( Once again this question is only for operators that perform exact string matches like the = operator)
    The reason why this question is so important to me is, like I have posted in a different forum, I need to minimize the amount of changes we need to make to our sql queries. We have a lot of queries that are using the = operator on a column that stores multilingual data. I do realize that we can alter our session to set NLS_Sort and NLS_Comp and do not really have to change our queries. But making queries linguistic comes at a performance cost. We need to make sure that all the linguistic indexes exist and plus do additional performance testing.
    I would not want us to go through all this effort only to find out there was no need to make these queries linguistic in the first place.

  • Time "and" Date Comparison

    Hi,
    I am trying to get the difference between two sets of time.
    This also involves a Date comparison because sometimes the times span more than one day.
    Here is an example of what I'm trying to accomplish. I have searched the forum archives but have not yet found time and date comparisons together.
    startRun = "10/26/01 4:30 PM";
    endRun = "10/27/01 7:45PM";
    I want to process these two times and get the difference.
    The result would be:
    totalRunTime = "27 hours 15 minutes";
    I am stumped. Is this type of process even possible? Any help would be grealty appreciated.
    Best,
    Christian Velez
    Senior Software Engineer
    Research Institute of America, Inc.
    [email protected]

    try this ...
            String startRun = "10/26/01 4:30PM";
            String endRun = "10/27/01 7:45PM";
            SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mma");
            try {
                Date startDate = sdf.parse(startRun);
                Date endDate = sdf.parse(endRun);
                System.out.println("Start date/time = " + startDate);
                System.out.println("End   date/time = " + endDate);
                long differenceInMillis = endDate.getTime() - startDate.getTime();
                long differenceInSecs = differenceInMillis / (1000);
                long differenceInMins = differenceInMillis / (1000 * 60);
                long differenceInHours = differenceInMillis / (1000 * 60 * 60);
                System.out.println("Millis = " + differenceInMillis);
                System.out.println("Seconds = " + differenceInSecs);
                System.out.println("Minutes = " + differenceInMins);
                System.out.println("Hours   = " + differenceInHours);
                //What you want
                System.out.println("Total run time = "
                    + differenceInHours + " hours "
                    + (differenceInMins % 60) + " minutes");
            } catch (ParseException pe) {
            }

  • Cisco products and services comparisons

    Wasnt sure where to post this...was hoping somebody could point me in the right direction...
    anybody have any site, whitepaper, document of any kind that gives an outline of products and services comparison between cisco products and other network equipment (ie...vs Juniper, vs Brocade, vs Nortel, etc...)
    thanks in advance.
    Bruce

    Hi Bruce,
    If youre a partner you can access the partner portal which has a small bit of competitive info.
    http://www.cisco.com/web/partners/sell/competitive/routing.html
    http://www.cisco.com/web/partners/sell/competitive/index.html
    Cheers,
    Conor

  • Data comparisons and movements

    I have a Heap Sort using the following code, and I cannot seem to figure out how many data comparisons and data movements there are as the heap is sorted. Does anybody know how to count the number of comparisons and movements?? Please let me know....much appreciated...Thanks :)
    import java.io.IOException;
    import java.util.*; // Calender Class for timing
    public class Heap {
    private MyNode[] heapArray;
    private int maxSize;
    private int currentSize; // number of items in array
    public Heap(int mx) {
    maxSize = mx;
    currentSize = 0;
    heapArray = new MyNode[maxSize];
    public MyNode remove()
    MyNode root = heapArray[0];
    heapArray[0] = heapArray[--currentSize];
    trickleDown(0);
    return root;
    public void trickleDown(int index) {
    int largerChild;
    MyNode top = heapArray[index];
    while (index < currentSize / 2)
    int leftChild = 2 * index + 1;
    int rightChild = leftChild + 1;
    // find larger child
    if (rightChild < currentSize
    heapArray[leftChild].getKey() < heapArray[rightChild]
    .getKey())
    largerChild = rightChild;
    else
    largerChild = leftChild;
    if (top.getKey() >= heapArray[largerChild].getKey())
    break;
    heapArray[index] = heapArray[largerChild];
    index = largerChild;
    heapArray[index] = top;
    public void displayHeap() {
    int nBlanks = 32;
    int itemsPerRow = 1;
    int column = 0;
    int currentIndex = 0;
    while (currentSize > 0)
    if (column == 0)
    for (int k = 0; k < nBlanks; k++)
    System.out.print(' ');
    System.out.print(heapArray[currentIndex].getKey());
    if (++currentIndex == currentSize) // done?
    break;
    if (++column == itemsPerRow) // end of row?
    nBlanks /= 2;
    itemsPerRow *= 2;
    column = 0;
    System.out.println();
    else
    for (int k = 0; k < nBlanks * 2 - 2; k++)
    System.out.print(' '); // interim blanks
    public void displayArray() {
    for (int j = 0; j < maxSize; j++)
    System.out.print(heapArray[j].getKey() + " ");
    System.out.println("");
    public void insertAt(int index, MyNode newNode) {
    heapArray[index] = newNode;
    public void incrementSize() {
    currentSize++;
    public static void main(String[] args) throws IOException {
    int size, i;
    size = 500;
    Heap theHeap = new Heap(size);
    for (i = 0; i < size; i++) {
    int random = (int) (java.lang.Math.random() * 5000);
    MyNode newNode = new MyNode(random);
    theHeap.insertAt(i, newNode);
    theHeap.incrementSize();
    System.out.println(size+" random numbers are currently being generated...");
    for (i = size / 2 - 1; i >= 0; i--)
    theHeap.trickleDown(i); // creates the heap
    System.out.print("\nRandom Numbers in a Heap: ");
    theHeap.displayArray(); // prints the heap
    long time1000start = new Date().getTime() ; // this makes a new Date object and then sets the long integer value of the Date object
    // ******************* START - sorting numbers *******************
    for (i = size - 1; i >= 0; i--)
    MyNode biggestNode = theHeap.remove();
    theHeap.insertAt(i, biggestNode);
    // ******************* END - sorting numbers *******************
    long time1000end = new Date().getTime() ; // this makes a new Date object and then sets the long integer value of the Date object
    double timediff1000m = (time1000end - time1000start); // difference of time in milliseconds
    double timediff1000s = ((time1000end - time1000start) / 1000); // difference of time in seconds
    System.out.print("\nRandom Numbers in a Sort: ");
    theHeap.displayArray(); // prints the numbers in increasing order
    System.out.print("\nStart Time of Sort: "+time1000start);
    System.out.print("\nEnd Time of Sort: "+time1000end);
    System.out.print("\nTime to Complete Sort: "+timediff1000m+" milliseconds or "+timediff1000s+" seconds.");
    } // end main method
    } // END project :)

    I never miss class....my instructor gave us the assignment of making a heap sort and he told us to use code off the internet as a resource because the only sorting we have done so far is bubble.....this was a research project, for my instructor to see if we can use the internet as an effective resource to put together a program and learn about a differnet type of sorting.....everyone in the class got a different type of sort (merge, quick, insertion, etc...). i have put the program together and customized it to my needs based on my knowledge.....the last thing i am having trouble with is my counting of comparisons and data movements. Can you please help me finish up my program.

  • What exactly we do as part of Generate Comparison Terms and Evaluate Comparison terms

    Dear Experts,
    As part of SAP GTS area menuin SPL Screening process,
    I could see below 3 options, I tried to understand by reading SAP HELP and other available documents, but not able to understand completely .
    Can you please help me in by explaining these 3 terms.
    ●  Generate comparison terms
    ●  Evaluate comparison terms
    ●  Aggregate comparison terms
    Thank you
    Rama

    Hi Rama,
    It is quite simple and below is the required explanation.
    Generate Comparison Terms:- This is used to generate comparison terms up for comparison with Business Partners after the exclusion of various exception terms like aliases etc . to get a proper term for comparison.
    Evaluate Comparison Terms:- This feature is used to define how much percentage a particular search term  should fulfill to qualify for comparison.
    Aggregate Comparison Terms:- This is used to keep the aggregate and keep the comparison terms handy for ready reference against Business Partners during SPL check. This drastically increases the system performance.
    The real meaning of the above terms will be more clear when you will go inside each of these areas and check what it is doing.
    Regards,
    Aman

  • Oracle DB schema and data comparison tools that compare BLOBs

    I'm looking for schema and data comparison tool like DBDiff or DbTools, but it has to be able to compare BLOB and CLOB fields. I went thru few products available on the market but could not find any that does that.
    Can you please recommend tool that will help me with it.
    Thanks,
    E

    Hi.
    I use Comparenicus for Oracle from Orbium Software. It compares data and schema, CLOBs, BLOBs..
    It can also handle large tables which is very useful for some of my environments.
    Last (but not least) it has a unique feature for copying selective data from one DB to another. You can read about it this post:
    Efficient way to copy business data from Production DB to Test DB
    Enjoy..

  • SSIS and timestamp comparison for selection

    Hi all.
    I have a situation I do not understand how to fix.
    I have two tables - one to store settings and another one the store some data.
    My SQL Server is of 2008 R2 version.
    My Visual Studio is of 2008 version (I tried to work in VS 2013 with SSDT of the latest version installed - all the same).
    The data table has a column of timestamp data type. 
    I'm using the timestamp column as determinator and I put max value of the timestamp column in the settings table after my process completes.
    Then I need to get that stored value and select from the data table only records which timestamp value is bigger than one stored in the settings table.
    What do I do to reproduce the situation.
    I created SSIS package.
    I added new variable of string data type, called it "LastTS".
    Then added new "Execute SQL Task", entered "SELECT CONVERT(VARCHAR(18), LastTimestamp) FROM Parameters", mapped result set to User::LastTS variable.
    Then I added new "Data Flow Task".
    In that task I added "OLE DB Source" and entered "SELECT c.ProtocolType, c.[Timestamp] AS StatusChangeTime FROM Command AS c WHERE c.[RowVersion] > cast(? as binary(8))" and mapped its resultset for next processing.
    Everything is ok.
    Now I start my package.
    My LastTS variable gets its right value.
    But my "OLE DB Source" fails with message as follows:
    [OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E21  Description: "Invalid character value for cast specification".
    What is the problem?
    I found a lot of answers like "you can use string variable to work with timestamp data" but nothing helped.
    What should I do to resolve my problem?

    IT worked fine for me.  Here's a complete package:
    <?xml version="1.0"?>
    <DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts"
    DTS:refId="Package"
    DTS:CreationDate="6/26/2014 8:50:47 AM"
    DTS:CreationName="SSIS.Package.3"
    DTS:CreatorComputerName="DBROWNE0"
    DTS:CreatorName="NORTHAMERICA\dbrowne"
    DTS:DTSID="{15A9F4FA-ACAD-499C-B899-D11762E85A0C}"
    DTS:ExecutableType="SSIS.Package.3"
    DTS:LastModifiedProductVersion="11.0.3369.0"
    DTS:LocaleID="1033"
    DTS:ObjectName="Package"
    DTS:PackageType="5"
    DTS:VersionBuild="2"
    DTS:VersionGUID="{0E4D9F45-5FAD-4706-89C0-0FF7260402E5}">
    <DTS:Property
    DTS:Name="PackageFormatVersion">6</DTS:Property>
    <DTS:ConnectionManagers>
    <DTS:ConnectionManager
    DTS:refId="Package.ConnectionManagers[LocalHost.tempdb]"
    DTS:CreationName="OLEDB"
    DTS:DTSID="{8B7A6B78-D657-43A7-9265-2DD88902E4EF}"
    DTS:ObjectName="LocalHost.tempdb">
    <DTS:ObjectData>
    <DTS:ConnectionManager
    DTS:ConnectionString="Data Source=.;Initial Catalog=tempdb;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" />
    </DTS:ObjectData>
    </DTS:ConnectionManager>
    </DTS:ConnectionManagers>
    <DTS:Variables>
    <DTS:Variable
    DTS:CreationName=""
    DTS:DTSID="{6DDBC988-CB18-4A8B-94EA-7A30FC3D7FFB}"
    DTS:IncludeInDebugDump="6789"
    DTS:Namespace="User"
    DTS:ObjectName="data">
    <DTS:VariableValue
    DTS:DataSubType="ManagedSerializable"
    DTS:DataType="13">
    <SOAP-ENV:Envelope xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <xsd:anyType
    id="ref-1"></xsd:anyType>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    </DTS:VariableValue>
    </DTS:Variable>
    <DTS:Variable
    DTS:CreationName=""
    DTS:DTSID="{89546C68-259E-4263-8CAB-56A56DDBB3CB}"
    DTS:IncludeInDebugDump="2345"
    DTS:Namespace="User"
    DTS:ObjectName="LastTS">
    <DTS:VariableValue
    DTS:DataType="8">0x0000000000004FAA</DTS:VariableValue>
    </DTS:Variable>
    </DTS:Variables>
    <DTS:Executables>
    <DTS:Executable
    DTS:refId="Package\Data Flow Task"
    DTS:CreationName="{5918251B-2970-45A4-AB5F-01C3C588FE5A}"
    DTS:Description="Data Flow Task"
    DTS:DTSID="{6FCEFECD-F9CD-4383-A05B-D3AA5F6A1EBF}"
    DTS:ExecutableType="{5918251B-2970-45A4-AB5F-01C3C588FE5A}"
    DTS:LocaleID="-1"
    DTS:ObjectName="Data Flow Task">
    <DTS:Variables />
    <DTS:ObjectData>
    <pipeline
    version="1">
    <components>
    <component
    refId="Package\Data Flow Task\OLE DB Source"
    componentClassID="{165A526D-D5DE-47FF-96A6-F8274C19826B}"
    contactInfo="OLE DB Source;Microsoft Corporation; Microsoft SQL Server; (C) Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;7"
    description="OLE DB Source"
    name="OLE DB Source"
    usesDispositions="true"
    version="7">
    <properties>
    <property
    dataType="System.Int32"
    description="The number of seconds before a command times out. A value of 0 indicates an infinite time-out."
    name="CommandTimeout">0</property>
    <property
    dataType="System.String"
    description="Specifies the name of the database object used to open a rowset."
    name="OpenRowset"></property>
    <property
    dataType="System.String"
    description="Specifies the variable that contains the name of the database object used to open a rowset."
    name="OpenRowsetVariable"></property>
    <property
    dataType="System.String"
    description="The SQL command to be executed."
    name="SqlCommand"
    UITypeEditor="Microsoft.DataTransformationServices.Controls.ModalMultilineStringEditor, Microsoft.DataTransformationServices.Controls, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91">SELECT c.ProtocolType, c.[Timestamp] AS StatusChangeTime
    FROM dbo.Command c
    WHERE c.[RowVersion] &gt; convert( binary(8), cast(? as varchar(18)), 1 )</property>
    <property
    dataType="System.String"
    description="The variable that contains the SQL command to be executed."
    name="SqlCommandVariable"></property>
    <property
    dataType="System.Int32"
    description="Specifies the column code page to use when code page information is unavailable from the data source."
    name="DefaultCodePage">1252</property>
    <property
    dataType="System.Boolean"
    description="Forces the use of the DefaultCodePage property value when describing character data."
    name="AlwaysUseDefaultCodePage">false</property>
    <property
    dataType="System.Int32"
    description="Specifies the mode used to access the database."
    name="AccessMode"
    typeConverter="AccessMode">2</property>
    <property
    dataType="System.String"
    description="The mappings between the parameters in the SQL command and variables."
    name="ParameterMapping">"Parameter0:Input",{89546C68-259E-4263-8CAB-56A56DDBB3CB};</property>
    </properties>
    <connections>
    <connection
    refId="Package\Data Flow Task\OLE DB Source.Connections[OleDbConnection]"
    connectionManagerID="Package.ConnectionManagers[LocalHost.tempdb]"
    connectionManagerRefId="Package.ConnectionManagers[LocalHost.tempdb]"
    description="The OLE DB runtime connection used to access the database."
    name="OleDbConnection" />
    </connections>
    <outputs>
    <output
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output]"
    name="OLE DB Source Output">
    <outputColumns>
    <outputColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[ProtocolType]"
    codePage="1252"
    dataType="str"
    errorOrTruncationOperation="Conversion"
    errorRowDisposition="FailComponent"
    externalMetadataColumnId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[ProtocolType]"
    length="20"
    lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[ProtocolType]"
    name="ProtocolType"
    truncationRowDisposition="FailComponent" />
    <outputColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[StatusChangeTime]"
    dataType="dbTimeStamp2"
    errorOrTruncationOperation="Conversion"
    errorRowDisposition="FailComponent"
    externalMetadataColumnId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[StatusChangeTime]"
    lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[StatusChangeTime]"
    name="StatusChangeTime"
    scale="7"
    truncationRowDisposition="FailComponent" />
    </outputColumns>
    <externalMetadataColumns
    isUsed="True">
    <externalMetadataColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[ProtocolType]"
    codePage="1252"
    dataType="str"
    length="20"
    name="ProtocolType" />
    <externalMetadataColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].ExternalColumns[StatusChangeTime]"
    dataType="dbTimeStamp2"
    name="StatusChangeTime"
    scale="7" />
    </externalMetadataColumns>
    </output>
    <output
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output]"
    isErrorOut="true"
    name="OLE DB Source Error Output">
    <outputColumns>
    <outputColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ProtocolType]"
    codePage="1252"
    dataType="str"
    length="20"
    lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ProtocolType]"
    name="ProtocolType" />
    <outputColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[StatusChangeTime]"
    dataType="dbTimeStamp2"
    lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[StatusChangeTime]"
    name="StatusChangeTime"
    scale="7" />
    <outputColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorCode]"
    dataType="i4"
    lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorCode]"
    name="ErrorCode"
    specialFlags="1" />
    <outputColumn
    refId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorColumn]"
    dataType="i4"
    lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Error Output].Columns[ErrorColumn]"
    name="ErrorColumn"
    specialFlags="2" />
    </outputColumns>
    <externalMetadataColumns />
    </output>
    </outputs>
    </component>
    <component
    refId="Package\Data Flow Task\Recordset Destination"
    componentClassID="{C457FD7E-CE98-4C4B-AEFE-F3AE0044F181}"
    contactInfo="Recordset Destination;Microsoft Corporation; Microsoft SQL Server; (C) Microsoft Corporation; All Rights Reserved; http://www.microsoft.com/sql/support;0"
    description="Creates and populates an in-memory ADO recordset that is available outside of the data flow. Scripts and other package elements can use the recordset. For example, use a recordset to store the names of files that will be loaded into the data warehouse."
    name="Recordset Destination">
    <properties>
    <property
    dataType="System.String"
    description="Specifies the variable that contains the recordset."
    name="VariableName">User::data</property>
    </properties>
    <inputs>
    <input
    refId="Package\Data Flow Task\Recordset Destination.Inputs[Recordset Destination Input]"
    hasSideEffects="true"
    name="Recordset Destination Input">
    <inputColumns>
    <inputColumn
    refId="Package\Data Flow Task\Recordset Destination.Inputs[Recordset Destination Input].Columns[ProtocolType]"
    cachedCodepage="1252"
    cachedDataType="str"
    cachedLength="20"
    cachedName="ProtocolType"
    lineageId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output].Columns[ProtocolType]" />
    </inputColumns>
    <externalMetadataColumns />
    </input>
    </inputs>
    </component>
    </components>
    <paths>
    <path
    refId="Package\Data Flow Task.Paths[OLE DB Source Output]"
    endId="Package\Data Flow Task\Recordset Destination.Inputs[Recordset Destination Input]"
    name="OLE DB Source Output"
    startId="Package\Data Flow Task\OLE DB Source.Outputs[OLE DB Source Output]" />
    </paths>
    </pipeline>
    </DTS:ObjectData>
    </DTS:Executable>
    <DTS:Executable
    DTS:refId="Package\Execute SQL Task"
    DTS:CreationName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    DTS:Description="Execute SQL Task"
    DTS:DTSID="{3F075D2C-CCCE-429E-A412-DF0777563EF7}"
    DTS:ExecutableType="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    DTS:LocaleID="-1"
    DTS:ObjectName="Execute SQL Task"
    DTS:TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2012; © 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1"
    DTS:ThreadHint="0">
    <DTS:Variables />
    <DTS:ObjectData>
    <SQLTask:SqlTaskData
    SQLTask:Connection="{8B7A6B78-D657-43A7-9265-2DD88902E4EF}"
    SQLTask:SqlStatementSource="if object_id('Command') is not null&#xA;begin&#xA; exec ('drop table Command')&#xA;end;&#xA;&#xA;create table Command(id int primary key , ProtocolType varchar(20), TimeStamp datetime2, RowVersion timestamp)&#xA;&#xA;insert into Command(id,ProtocolType,TimeStamp)&#xA;values (1,'a',GetDate());" xmlns:SQLTask="www.microsoft.com/sqlserver/dts/tasks/sqltask" />
    </DTS:ObjectData>
    </DTS:Executable>
    </DTS:Executables>
    <DTS:PrecedenceConstraints>
    <DTS:PrecedenceConstraint
    DTS:refId="Package.PrecedenceConstraints[Constraint]"
    DTS:CreationName=""
    DTS:DTSID="{F6FC0677-010B-411A-9E75-40A48490570D}"
    DTS:From="Package\Execute SQL Task"
    DTS:LogicalAnd="True"
    DTS:ObjectName="Constraint"
    DTS:To="Package\Data Flow Task" />
    </DTS:PrecedenceConstraints>
    <DTS:DesignTimeProperties><![CDATA[<?xml version="1.0"?>
    <!--This CDATA section contains the layout information of the package. The section includes information such as (x,y) coordinates, width, and height.-->
    <!--If you manually edit this section and make a mistake, you can delete it. -->
    <!--The package will still be able to load normally but the previous layout information will be lost and the designer will automatically re-arrange the elements on the design surface.-->
    <Objects
    Version="sql11">
    <!--Each node below will contain properties that do not affect runtime behavior.-->
    <Package
    design-time-name="Package">
    <LayoutInfo>
    <GraphLayout
    Capacity="4" xmlns="clr-namespace:Microsoft.SqlServer.IntegrationServices.Designer.Model.Serialization;assembly=Microsoft.SqlServer.IntegrationServices.Graph" xmlns:mssgle="clr-namespace:Microsoft.SqlServer.Graph.LayoutEngine;assembly=Microsoft.SqlServer.Graph" xmlns:assembly="http://schemas.microsoft.com/winfx/2006/xaml">
    <NodeLayout
    Size="150.4,41.6"
    Id="Package\Data Flow Task"
    TopLeft="67.514286169374,110.529398667551" />
    <NodeLayout
    Size="163.2,41.6"
    Id="Package\Execute SQL Task"
    TopLeft="96.5714302160302,21.4117650061743" />
    <EdgeLayout
    Id="Package.PrecedenceConstraints[Constraint]"
    TopLeft="178.17143021603,63.0117650061743">
    <EdgeLayout.Curve>
    <mssgle:Curve
    StartConnector="{assembly:Null}"
    EndConnector="-35.4571440466562,47.5176336613764"
    Start="0,0"
    End="-35.4571440466562,40.0176336613764">
    <mssgle:Curve.Segments>
    <mssgle:SegmentCollection
    Capacity="5">
    <mssgle:LineSegment
    End="0,19.7588168306882" />
    <mssgle:CubicBezierSegment
    Point1="0,19.7588168306882"
    Point2="0,23.7588168306882"
    Point3="-4,23.7588168306882" />
    <mssgle:LineSegment
    End="-31.4571440466562,23.7588168306882" />
    <mssgle:CubicBezierSegment
    Point1="-31.4571440466562,23.7588168306882"
    Point2="-35.4571440466562,23.7588168306882"
    Point3="-35.4571440466562,27.7588168306882" />
    <mssgle:LineSegment
    End="-35.4571440466562,40.0176336613764" />
    </mssgle:SegmentCollection>
    </mssgle:Curve.Segments>
    </mssgle:Curve>
    </EdgeLayout.Curve>
    <EdgeLayout.Labels>
    <EdgeLabelCollection />
    </EdgeLayout.Labels>
    </EdgeLayout>
    </GraphLayout>
    </LayoutInfo>
    </Package>
    <TaskHost
    design-time-name="Package\Data Flow Task">
    <LayoutInfo>
    <GraphLayout
    Capacity="4" xmlns="clr-namespace:Microsoft.SqlServer.IntegrationServices.Designer.Model.Serialization;assembly=Microsoft.SqlServer.IntegrationServices.Graph" xmlns:mssgle="clr-namespace:Microsoft.SqlServer.Graph.LayoutEngine;assembly=Microsoft.SqlServer.Graph" xmlns:assembly="http://schemas.microsoft.com/winfx/2006/xaml">
    <NodeLayout
    Size="150.4,41.6"
    Id="Package\Data Flow Task\OLE DB Source"
    TopLeft="6.26582146462022,8.71822610737986" />
    <NodeLayout
    Size="182.4,41.6"
    Id="Package\Data Flow Task\Recordset Destination"
    TopLeft="60.8,144.8" />
    <EdgeLayout
    Id="Package\Data Flow Task.Paths[OLE DB Source Output]"
    TopLeft="81.4658214646202,50.3182261073799">
    <EdgeLayout.Curve>
    <mssgle:Curve
    StartConnector="{assembly:Null}"
    EndConnector="70.5341785353798,94.4817738926202"
    Start="0,0"
    End="70.5341785353798,86.9817738926202">
    <mssgle:Curve.Segments>
    <mssgle:SegmentCollection
    Capacity="5">
    <mssgle:LineSegment
    End="0,43.2408869463101" />
    <mssgle:CubicBezierSegment
    Point1="0,43.2408869463101"
    Point2="0,47.2408869463101"
    Point3="4,47.2408869463101" />
    <mssgle:LineSegment
    End="66.5341785353798,47.2408869463101" />
    <mssgle:CubicBezierSegment
    Point1="66.5341785353798,47.2408869463101"
    Point2="70.5341785353798,47.2408869463101"
    Point3="70.5341785353798,51.2408869463101" />
    <mssgle:LineSegment
    End="70.5341785353798,86.9817738926202" />
    </mssgle:SegmentCollection>
    </mssgle:Curve.Segments>
    </mssgle:Curve>
    </EdgeLayout.Curve>
    <EdgeLayout.Labels>
    <EdgeLabelCollection />
    </EdgeLayout.Labels>
    </EdgeLayout>
    </GraphLayout>
    </LayoutInfo>
    </TaskHost>
    <PipelineComponentMetadata
    design-time-name="Package\Data Flow Task\OLE DB Source">
    <Properties>
    <Property>
    <Name>DataSourceViewID</Name>
    </Property>
    </Properties>
    </PipelineComponentMetadata>
    </Objects>]]></DTS:DesignTimeProperties>
    </DTS:Executable>
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How do you open multiple binary files and plot them all on the same graph?

    I have three different binary files and I want to plot all 3 of them onto a graph.
    I am familiar with opening and reading a single binary file. (Thanks to the help examples!) 
    But to do multiple numbers at the same time?  I was thinking of putting 3 different 'reading from binary file' blocks with the rest of the 'prompts', 'data type', etc.. and then connecting them on the same wire.
    However, I got into a mess already when I tried to read one .bin file to dynamic data type --> spectral measurements --> graph waveform.  The error was Not enough memory to complete this operation...  Why is that?  That didnt happen in the help example "Read Binary File.vi"...  Has it got something to do with the dynamic data type?
    Thank you for your time.
    Jud~

    Have a look at the image below and attached VI.  Simply enter the different paths into the PathArray control.
    R
    Message Edited by JoeLabView on 07-30-2008 09:59 PM
    Attachments:
    multipleBinary2Graph.vi ‏18 KB
    multipleBinary.PNG ‏5 KB

  • SQL Server 2000 - Valid Binary datatype and valid character datatype:

    SQL Server 2000 - Valid Binary datatype and valid character datatype:
    Which is not a valid binary datatype :
    BIT , IMAGE, TMESTAMP
    Which is not a valid Character datatype :
    VARTEXT , BLOB , TEXT

    BOL 2014: "
    Data Types (Transact-SQL)
    SQL Server 2014 
    Data Type Categories
    Exact Numerics
     bigint
     numeric
     bit
     smallint
     decimal
     smallmoney
     int
     tinyint
     money 
    Approximate Numerics
     float
     real
    Date and Time
     date
     datetimeoffset
     datetime2
     smalldatetime
     datetime
     time
    Character Strings
     char
     varchar
     text
    Unicode Character Strings
     nchar
     nvarchar
     ntext 
    Binary Strings
     binary
     varbinary
     image
    Other Data Types
     cursor
     timestamp
     hierarchyid
     uniqueidentifier
     sql_variant
     xml
     table
     Spatial Types "
    LINK: http://msdn.microsoft.com/en-us/library/ms187752.aspx
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Write string (7 chars), int16, sgl into binary file and read it in C

    How to write write string (7 chars), int16, sgl, string (5 chars) into binary file and then read it in C ?
    Total 18 Bytes file (binary) should be created.

    Hi,
    this could be done that way:
    You have to make sure the strings have their correct length!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Java binary search and insert

    I'm currently writing a program which is an appointment book. I currently have 4 classes and at the minute it can sort the array and print it out. I'm stuck at binary search and inserting a new appointment record. I will include the classes which i have got.
    Appointment
       import java.util.*;
       import java.io.*;
       import java.util.Scanner;
        class Appointment implements Comparable
          private String description;
          private int day;
          private int month;
          private int year;
          private String startTime;
          private String endTime;
          protected static Scanner keyboard = new Scanner(System.in);     
           public Appointment()
             description = "";
             day = 0;
             month = 0;;
             year = 0;;
             startTime = "";
             endTime = "";
           public Appointment(String appDesc, int appDay, int appMonth, int appYear, String appStartTime, String appEndTime)
             description = appDesc;
             day = appDay;
             month = appMonth;
             year = appYear;
             startTime = appStartTime;
             endTime = appEndTime;
           public void display()      
             System.out.print("  Description: " + description);
             System.out.print(", Date: " + day + "/" +month+ "/" +year);
             System.out.println(", Start Time: " + startTime);
             System.out.println(", End Time: " + endTime);
           public void setDay(int day)
          { this.day = day; }
           public int getDay()     
             return day; }
           public void setMonth(int month)
          { this.month = month; }
           public int getMonth()     
             return month; }
           public void setYear(int year)
          { this.year = year; }
           public int getYear()
             return year; }
           public int compareTo(Object obj)
             if (obj instanceof Appointment)
                Appointment appt = (Appointment) obj;
                if (this.day > appt.getDay())
                   return 1;
                else if (this.day < appt.getDay());
                return -1;
             return 0;
           public String toString() {
             StringBuffer buffer = new StringBuffer();
             buffer.append("Description: " + description);
             buffer.append(", Date: " + day + "/" +month+ "/" +year);
             buffer.append(", Start Time: " + startTime);
             buffer.append(", End Time: " + endTime);
             return buffer.toString();
           public void read(){
             System.out.print("Description : ");String descIn=keyboard.next();
             System.out.print("Day : ");int dayIn=keyboard.nextInt();
             System.out.print("Month : ");int monthIn=keyboard.nextInt();
             System.out.print("Year : ");int yearIn=keyboard.nextInt();
             System.out.print("Start Time : ");String startIn=keyboard.next();
             System.out.print("End Time : ");String endIn=keyboard.next();
             boolean goodInput = false;
             do{          
                try{
                   setDay(dayIn);
                   setMonth(monthIn);
                   setYear(yearIn);
                   goodInput = true;
                    catch(IllegalArgumentException e){
                      System.out.println("INVALID ARGUMENT PASSED FOR day or month or year");
                      System.out.println(e);
                      System.out.print("RE-ENTER VALID ARGUMENT FOR DAY : ");dayIn=keyboard.nextInt();
                      System.out.print("RE-ENTER VALID ARGUMENT FOR MONTH : ");monthIn=keyboard.nextInt();
                      System.out.print("RE-ENTER VALID ARGUMENT FOR YEAR : ");yearIn=keyboard.nextInt();                                        
             }while(!goodInput);
       }

    Array
    import java.util.*;
    class Array
         private Appointment[] app;
         private int nElems;
         Appointment tempApp;
         public Array(int max)
              app = new Appointment[max];
              nElems = 0;
         public Array(String desc, int day, int month, int year, String sTime, String eTime)
              app = new Appointment[100];
              nElems = 0;
       public int size()
          { return nElems; }
         void add(){
              Appointment appointmentToAdd = new Appointment();
              // Read its details
              appointmentToAdd.read();
              // And add it to the studentList
              //app[nElems].add(appointmentToAdd);
         public void add(String desc, int day, int month, int year, String sTime, String eTime)
            app[nElems] = new Appointment(desc, day, month, year, sTime, eTime);
            nElems++;             // increment size
              Appointment appointmentToAdd = new Appointment(desc, day, month, year, sTime, eTime);
              // And add it to the studentList
              //app[nElems].add(appointmentToAdd);
          public void insert(Appointment tempApp) {
        int j;
        for (j = 0; j < nElems; j++)
          // find where it goes
          if (app[j] > tempApp) // (linear search)
            break;
        for (int k = nElems; k > j; k--)
          // move bigger ones up
          app[k] = app[k - 1];
        app[j] = tempApp; // insert it
        nElems++; // increment size
       public void display()       // displays array contents
            for(int j=0; j<nElems; j++)    // for each element,
              app[j].display();     // display it
            System.out.println("");
         public void insertionSort()
       int in, out;
       for(out=1; out<nElems; out++) // out is dividing line
         Appointment temp = app[out];    // remove marked person
         in = out;          // start shifting at out
         while(in>0 &&        // until smaller one found,
            app[in-1].getMonth().compareTo(temp.getMonth())>0)
          app[in] = app[in-1];     // shift item to the right
          --in;          // go left one position
         app[in] = temp;        // insert marked item
         } // end for
       } // end insertionSort()
    }Menu
    import java.util.*;
    class Menu{
       private static Scanner keyboard = new Scanner(System.in);
       int option;
         Menu(){
            option=0;
         void display(){
              // Clear the screen
            System.out.println("\n1 Display");
              System.out.println("\n2 Insert");          
              System.out.println("3 Quit");          
         int readOption(){
            System.out.print("Enter Option [1|2|3] : ");
              option=keyboard.nextInt();
              return option;
    }Tester
       import java.util.*;
       import java.util.Arrays;
        class ObjectSortApp
           public static void main(String[] args)
                   int maxSize = 100;
                   Array arr;
                   arr = new Array(maxSize)
                   Appointment app1 = new Appointment("College Closed", 30, 4, 2009, "09:30", "05:30");;
                   Appointment app2 = new Appointment("Assignment Due", 25, 4, 2009, "09:30", "05:30");
             Appointment app3 = new Appointment("College Closed", 17, 4, 2009, "09:30", "05:30");
             Appointment app4 = new Appointment("Easter Break", 9, 4, 2009, "01:30", "05:30");
             Appointment app5 = new Appointment("College Opens", 15, 4, 2009, "09:30", "05:30");
             Appointment app6 = new Appointment("Assignment Due", 12, 4, 2009, "09:30", "05:30");
             Appointment app7 = new Appointment("Exams Begin", 11, 4, 2009, "09:30", "05:30");
                //To sort them we create an array which is passed to the Arrays.sort()
            //method.
            Appointment[] appArray = new Appointment[] {app1, app2, app3, app4, app5, app6, app7};
             System.out.println("Before sorting:");
            //Print out the unsorted array
            for (Appointment app : appArray)
                System.out.println(app.toString()); 
                Arrays.sort(appArray);
             //arr.insertionSort();      // insertion-sort them
             System.out.println("\n\nAfter sorting:");               
            //Print out the sorted array
            for (Appointment app : appArray)
                System.out.println(app.toString());
              Menu appMenu = new Menu();
              int chosenOption;
              do{
                 appMenu.display();
                   chosenOption=appMenu.readOption();
                   for (Appointment app : appArray)
                   switch(chosenOption){
                      case 1 : app.display(); break;
                        case 2 : arr.add(); break;
                        default:;
              }while(chosenOption != 3);    
          } // end main()
       } // end class ObjectSortApp

  • How to make custom binary module and add to powershell?

    How to make custom binary module and add to powershell?
    I wish to add 'Microsoft.SharePoint.Client.dll' in powershell as binary module so I can use its intellisense.

    Hi Biraj,
    I replied to this in other thread
    https://social.technet.microsoft.com/Forums/en-US/a13c9cc8-7d53-46b5-b5bb-65404db2d347/how-to-make-intellisense-enable-in-powershell-in-csom-for-sharepoint-online?forum=sharepointdevelopment
    Kind Regards,
    John Naguib
    Senior Consultant
    John Naguib Blog
    John Naguib Twitter
    Please remember to mark this as answered if it helped you

  • Binary tree  and avl tree

    hi iam not able to get the binary tree and avl tree in swings please any one help me
    thanks in advance

    Hi Rastabot.
    If you look closely, it's not that different after all.
    In each step of your recursion you need to do two things: decide whether to keep recursing, and decide what to return to the previous recursive call.
    If you are trying to traverse your entire tree, then your logic to determine when to recurse and when not to is exactly the same as your example.
    What you want to return each time is the number of operators in and below the node in the tree. One useful property of such an expression tree is that all the operands become leaves of the tree, and all other tree nodes are operators. Therefore, if the current node is a leaf node (your subTree == null case in your example), then that node is not an operator and has no operators below it in the tree, therefore you can return zero as the number of operators in or below that node. On the other hand, if the node is not a leaf node (your else case) then it must be an operator, and therefore you would return 1 (for that operator) plus the number of operators in each subtree below that node.
    This is very similar to what you have already posted - mostly, where you have strings you need to replace with integer equivalents.
    I can help with this if you need.
    Mac.
    Edited by: Mac.Coombe on Apr 30, 2009 11:00 PM - made explanation a little clearer

  • Read binary file and convert to readable text

    I have a binary file which i want to read in and then convert it into readable text. How can i do this?

    I have a binary file which i want to read in and then
    convert it into readable text. How can i do this?Your question is a bit too vague to be answered. Here's an example -- suppose a file contains the bitstream 11011110101011011011111011101111. (just four bytes full of bits). If one 'converts' this bit stream using four byte big-endian integral values into a hexadecimal representation, the outcome would be 'deadbeef'. Using a little endian conversion, the outcome would be 'efbeadde'. All three text strings you're reading right now (the binary one, and both hexadecimal versions) are readable representations of the actual bitstream ... which one do you want?
    OTOH, if you want to know what's stored in a .class file (this is a Java forum isn't it?), have a look at 'pjava'; it comes with your SDK.
    kind regards,
    Jos

Maybe you are looking for