How to use AS between two columns

Hello

If we have following columns, how can we use AS link tables


COLUMN A of table X COLUMN B of table Y
============== =============

74500000ADN 74500000FKGL
78920000KDE 78900000LJKE
2345454LKKLK 54545345FDFR
96226HIYYOPP 9622622KDJJG



"SELECT...". TABLE1, TABLE2 x Y WHERE X.colA LIKE Y.colB


Will the above work correctly?
(Must extract the line 1, 2 and 4 above)


Rgds

sexy

Hello

Yes, you're right.

I just wanted to show sexy using substr with a length of 5 would not bring the second row of its sample data.
If he wants to use a dynamic length, it should now be under what conditions a specific length should be used.

Tags: Database

Similar Questions

  • How to write a query for the data exchange between two columns?

    How to write a query for the data exchange between two columns?

    I tried a request, does NOT work.
    update tmp t1 set t1.m1=t1.m2 and t1.m2=(select t2.m1 from tmp t2 where t2.student_id = t1.student_id)
    Thank you.

    Published by: user533361 on October 23, 2009 14:04

    Just plain and simple:

    update tmp t1
     set t1.m1=t1.m2,
         t1.m2=t1.m1
    /
    

    SY.

  • Thick border line between two columns

    Hello all;

    I have a requirement where the user must be able to distinguish between two columns hnce asking a thick line, rather than the usual 'by default'.

    Everything is 'Default' until then.
    I clicked on properties of the 1st column and in the section "Border", I chose "Custom" and made the right wall of the cell in black color.
    I see a thick border now, but it has eliminated the 'default' border separating lines. His party make the entire column look like a single cell.

    I don't want any change with the exception only of the border of a column of a black line.

    Any help is greately appreciated.

    Thank you!

    The column properties-> Options of Style CSS custom (HTML only)-> use custom CSS Style->
    the following CSS code
    border-right-width: 1px; border-right-color: green;

    or go with someone with the necessary changes

    Appreciate if you score as correct if it works

    Published by: Srini VIEREN on December 11, 2012 16:43

  • the list of numbers between two columns

    Hello

    I need the list of numbers between two columns.

    My source table contains the intervals with different ranges and I'm currently thinking dividing them by size.

    I was able to get a solution following the information contained in the Web page:
    http://StackOverflow.com/questions/3971981/get-list-of-numbers-in-between-two-columns

    The solution I've used is based on the following example:
    with t as (   
      select 10 startnum, 15 endnum from dual   
      union all   
      select 18, 22 from dual   
      union all   
      select 10000, 19999999999 from dual   
    )   
    select lvl   
      from (select level lvl  
               from dual  
            connect by level <= (select max(endnum) from t)) a  
      where exists (  
         select 1  
           from t  
          where lvl between t.startnum and t.endnum ) 
    But this doesn't work in my table if I have few and modest intervals (maximum 5 digits range).
    In the example, I was trying to understand why this might be failing, but I do not have a conclusion yet.
    There is something I noticed and that I try to understand, that is:
    If I change this query to:
    with t as (   
      select 10 startnum, 15 endnum from dual   
      union all   
      select 18, 22 from dual   
      union all   
      select 19999999990, 19999999999 from dual   
    )   
    select lvl   
      from (select level lvl  
               from dual  
            connect by level <= (select max(endnum) from t)) a  
      where exists (  
         select 1  
           from t  
          where lvl between t.startnum and t.endnum ) 
    It will increase from 2 to 3 seconds to return results to a few minutes at least (canceled after a few minutes!)

    Thus, using this example to understand if my problem is related to having many between start and end number or if it is linked with having small intervals between large numbers.

    Can someone explain to me why I have this speed of different treatment depending on the value of the interval? And why it takes longer with the small interval?

    I need to apply it to different beaches (from 2 ranges of numbers to 16 range) and in all ranges, I will have small intervals to check.

    For example:
    endnum startnum
    7341 7342
    7422-7423
    7439 7456

    2522200050 2522200054
    2522200146 2522200150

    4216969839880 4216969839884
    4216969839893 4216969839897

    Having this problem I can only ask the first values I have in the picture!

    Best regards
    Ricardo Tomas

    Hi, Ricardo,

    Here's one way:

    WITH       cntr     AS
    (
         SELECT     LEVEL - 1     AS n
         FROM     (
                  SELECT  MAX ( endnum - startnum)     AS max_diff
                  FROM    t
              )
         CONNECT BY     LEVEL <= max_diff + 1
    )
    SELECT  startnum + c.n
    FROM     t
    JOIN     cntr  c      ON   t.endnum  >= t.startnum + c.n
    ;
    

    In your original query, you generate all the numbers from 1 to the highest endnum. You only need enough numbers to cover the range of startnum to endnum. (This method also works if startnum is less than 1).
    Joins are usually faster than EXISTS subqueries.

  • How to use @sumrange in two dimensions?

    How to use @sumrange in two dimensions? I want to sum up all the values through the period and the time of a measure...

    It does not give the right ratio:
    "WHEELS" / @SUMRANGE ("COGS", Jan:Dec,@RELATIVE(Years,0)); ")

    This gives the right solution, but the year is coded:
    "WHEELS" / (@SUMRANGE ("GEARS"-> "FY12", Jan: Dec) + @SUMRANGE ("GEARS"-> "FY13", Jan:Dec));))

    I want to dynamically reference every year at once.

    Thanks in advance.

    Hello

    Try the @XRANGE function in the @SUMRANGE

    Then

    "WHEELS" / @SUMRANGE ("GEARS", @XRANGE ("FY09"-> "Jan", "FY15"->"Dec"));

    Coding always a little difficult, but you can substitute two variables for ease of maintenance

    Thank you

    Anthony

  • How to find directions between two locations other than my current position. I finally gave up and use Google Maps.

    In the latest version of cards, there is not apparent until you find directions between two places when or is your current position. In earlier versions, we enter in two places of departure and destination. In the new version, you enter your destination into a search window, but there is no place to enter a starting location. The application assumes that your current place of residence is always your place of departure. It is a remarkable oversight by designers. Am I missing something?

    If you go to maps, you can search for a location. Once you find the place, press the route button. It is from your current location, but if you type on my position, next: you can change the location that you want the management of.

  • Number of matches between two columns

    Column1 Column2
    5 5
    5 2
    5 5
    4 3
    4 4
    Football match
    3

    I basically you want to compare two columns and count matches in the corresponding lines. I tried using the following formula:

    SUMPRODUCT (--($column1=$column2))

    ... but it doesn't work! Any suggestion?

    Tiago,

    It seems you are trying to use array formulas (maybe since excel?) who do not work in number.

    Here's how I would solve this problem:

    Make sure that the table where data is named 'Data' (as shown, or change the table name references to match your table name)

    Add a new column (C)

    C2 = AND (A2 = B2, A2≠ "")

    It's shorthand dethrone select cell C2, then type (or copy and paste it here) the formula:

    = AND(A2=B2, A2≠"")

    Select cell C2, copy

    Select cells C2 at the end of the C column, paste

    the formula say to check to see if the cell in column A is NOT empty, and is equal to the cel in column B

    Now in the summary table (single cell table):

    A1 = COUNTIF (Data::C, TRUE)

  • How backup VPN configuration between two universities?

    Hello, I am a student of the Greece and I have a graduation project to configure Backup VPN between two universities. Principal of communication made with leased lines. I study a lot, but now that it's time for implementation I have some thoughts:

    -What hardware and software IOS do I need? Cisco 1841 it is ok for A & D routers?

    -Use GRE IPSec transport mode or IPsec Tunnel mode?

    -What will be the failover mechanism for switching traffic lines leased to IP VPN Backup and opposite? A teacher told me something about the Interface Prioritys. I read somewhere that this is done with the such as EIGRP routing protocol. who was right the Professor or the book?  :-D

    -In the same place, they have Firewall and NAT, I need to do any action for this?

    The attached file contains topology I want to implement

    'My' talk site 1

    2 a Central Site

    E communicates with A, but no traffic is to A of E with normal circumstances. Subnet on E access Internet through F, then press D.    VPN will be implemented on the LAN but the specific source E traffic will pass through the Backdoor VPN (I think that the solution to this is ACL on the router). They have no routing protocol in 'my' site A directly connected routers and the default routes.

    How imlement this?

    I think the first thing to do is A to D connectivity

    I will try to do this to tracers package first, but how can ' I imitate the SP network?

    I need help I can get!

    Hi John,.

    In our scenario, given that our main connection is a direct leased line between E and F, so I guess there is no other network between the two routers. In this case we do not need to configure SLA monitoring or any interface a priority. We can simply enter two default routes:

    IP route

    IP route 254

    In this scenario, if the leased line interface goes down, the second default route is used and the traffic should be routed by A router.

    SLA monitoring monitors connection (using the ping tests) by one of the interfaces of the router, and when we are not able to ping from one server (specified in the configuration of the SLA) through the interface, then we change the default track to track traffic through some other interface.

    So, in your scenario, we can monitor the connection between E and F, and when the link goes down, we can change the default route to point a.

    This is useful in the scenario where we have another ISP connection as our primary connection.

    Here is a link on how to configure SLA monitoring on the router:

    http://www.Cisco.com/en/us/docs/iOS/12_4/ip_sla/configuration/guide/hsicmp.html

    After you have configured the SLA followed by using the link above, you can bind it to the default route by using the following command line:

    track road IP / / default main route

    IP route 255 / / default route with a metric of higer that comes into play when the main default route goes down

    In addition, the sample configuration that you give in the doc is almost correct, defined transformation is missing just a hashing algorithm. Here is a link with an example for a tunnel from lan-to-lan between two routers:

    http://www.Cisco.com/en/us/partner/products/HW/routers/ps221/products_configuration_example09186a008073e078.shtml

  • How to remove spaces between two separators

    Hi all

    How to remove the spaces between two separators, but space is required between the characters.

    I have an input as string below

    "# ABC DEF GHI # JKLMN.

    Expected string as below. Here the space between DEF GHI is required, but other spaces must remove.

    "ABC #DEF #JKLMN GHI".

    I tried with REPLACE it but it removes all spaces and this is a mistake.

    REPLACE ('ABC # DEF GHI # JKLMN', ' ')

    Please guide me. Thank you.

    For example, if the hash/pound symbol may not have a space before and after, then you need to change the regular expression to use ' * ' instead of ' + '...

    SQL > ed
    A written file afiedt.buf

    1 Select trim (regexp_replace ('ABC # DEF GHI #JKLMN',' (* # *) ',' #'))
    2 * of the double
    SQL > /.

    (REGEXP_REPLA TRIM
    -----------------
    ABC #DEF #JKLMN GHI

    Always be clear in your requirements.

    Re: 2. How can I ask a question in the forums?

  • How to view - (hyphen) between two dates

    My requirement is if I select the 'count' and 'to date' in the dashboard to the release of the report to display as "date-to date" could any body please help grow me in this...

    Hello

    If you want to use the strategy of Mahesh, you cannot use the BETWEEN operator. You will need for different layout columns, with a DATE data type and two presentation variables. Then, in your report, instead of saying: YOUR_DATE IS INVITED, you will need something like YOUR_DATE between @PRES_START_DATE AND @PRES_END_DATE.

    If you absolutely must use the BETWEEN condition, then you will need to define two new logical columns in your file of RPD. These two logical columns will be MIN and MAX of the column in question. When you pull these in your report, they will return the MIN and MAX date values that lie in BETWEEN your condition. You can then use the @ - @ syntax to display two dates with a hyphen.

    Hope this helps and if you need more information, do not hesitate to ask.

    Best regards

    -Joe

  • How do I telnet between two computers in a network?

    Original title: 'telnet '.

    I want to make a connection telnet between two computers in a network, please guide me.

    I want to make a connection telnet between two computers in a network, please guide me.

    See this to start by...

    http://Windows.Microsoft.com/en-us/Windows7/Telnet-frequently-asked-questions

    If you want to use telnet via the public internet, I highly recommend to use Secure Shell [SSH]. Free (for personal use) client SSH for Windows include the mastic and the TBM. Of course this assumes that you have a server SSH running on the remote network.

    http://www.Bitvise.com/tunnelier.html

    http://www.chiark.greenend.org.uk/~sgtatham/PuTTY

    MS - MVP Windows Expert - consumer
    "When all else fails try what the captain suggested before you started...". »

  • Numbers between two columns

    Hello

    I would like to create sequential numbers between these two columns of the specified table.

    Existing data in the table

    Column1 Column2
    57
    1314
    1819
    2427
    2929

    power required:

    5

    6

    7

    13

    14

    18

    19

    24

    25

    26

    27

    29

    Could someone help me with this please.

    Thank you.

    XQUERY solution:

    with

    data in the form of

    (select 5 Column1, Column2 7 Union double all the)

    Select 13,14 in union double all the

    Select 18,19 Union double all the

    Select 24,27 Union double all the

    Select double 29,29

    )

    Select n

    data,.

    XMLTable)

    "xs:integer ($s) at xs:integer ($e).

    passing of Column1 as "s",.

    Column2 like 'e '.

    columns

    path number n '. »

    )

    /

    N
    ----------
    5
    6
    7
    13
    14
    18
    19
    24
    25
    26
    27

    N
    ----------
    29

    12 selected lines.

    SQL >

    SY.

  • How to find days between two dates in days

    Hi, I want to get the days between two dates, expressed in days, how can I do this?  For example, I date i.e. 1 October 10, 2013 (Thursday) and 2 as October 13, 2013 (Sunday).  How can I get a production of:

    Thursday, Friday, Saturday and Sunday, which are the days between Oct. 10-13, 2013.  I hope you understand my point.  Thank you

    You can try something like this

    CURSOR LOAD_PROF is

    SELECT load_prof1, v_time_profile_day

    OF load_profile_test

    WHERE profile_day IN (select TO_CHAR(:day1+level-1,'Day')

    of the double

    connect by level<>

    );

    Kind regards

    S Pax

  • How to use a formula in column in the main query?

    Hi all
    I tried to use a formula columns defined in a query in the State of the query like this:
    where (: cf_ex -: cf_ex2) > = 5
    but when I run the report returned data! Why? and how to use the status of the query?

    Note: I'm using Forms 6i

    I gave you the reason:

    Formula columns are not part of the select statement (which runs in the database), but are dealt with in the report.
    So you actually reference the user settings in the query, not formulas columns.

    (Well, I should have said "you are referencing empty connection parameters", but with your experience you could have understood that)
    and the solution:

    Create database for cf_ex and cf_ex2 functions and use them in your application.

  • How to add images between two elements

    I'm having a great time to find it.  I was asked to add an image between two elements.  Here's a mockup of what the layout with the image will look like:

    home-page-mockup.jpg

    But I tried everything and I keep breaking the code and can't make it work.  I did a stripped down version of this page so you can see what the code looks like:

    Homepage

    Any help is appreciated.  Thank you.

    This will get probably get a bit of a hole - (MAKE A BACK-UP OF YOUR PAGE FIRST)

    Find the code below:

    http://www.amazon.com/Reclaiming-Parkland-Bugliosi-Assassination-Hollywood/dp/1626365334/r ef = sr_1_1? s = books & ie = UTF8 & qid = 1378592566 & sr = 1-1 & keywords = recovery + Parkland"> Amazon.com»

    Get rid of all the code that follows - down up to this code:

    The decline and fall of Jim Fetzer

    Copy and paste the code below instead:

    Image goes here

    Then style upward a little h2 tags with some css:

    I'll let you get back links/anchors on the h2 tags.

Maybe you are looking for