Re: [(forte-users) Need help w/SQL to Informix using anarray in WHERE c

Bob.
That syntax isn't know Forte, used Dynamic SQL and coding
it dynamically. And the SQL statement exceed 255 bytes, divide in 2 or more
sentences (NameListCity1, NameListCity2, NalmeListCountry1, ...)
Try with:
NameListCity = 'city1','city2','city3'...
NalmeListCountry = 'country1','country2','country3',...
WHERE
city in (:NameListCity) and
country_code in (:NameListCountry)
Bye.
"Briggs, Bob" <Bob.Briggsmarriott.com> wrote:
I'm trying to invoke a query to Informix to select rows that match any of
the city / country pairs that exist in an array that is passed into the
method. The SQL itself seems to be OK however it appears that Forte is
having a problem in parsing the Select statement when it gets to the WHERE
clause. The resulting exception shows the SQL string formatted properly up
to the WHERE clause which ends like "WHERE city". Does anyone know of a way
to make this type of query work in a single invocation? I'm trying not to
issue multiple queries as would be the case if I used Dynamic SQL and coding
it dynamically with multiple OR statements is not really an option since the
overall length of the SQL statement cannot exceed 256 bytes. I have included
an example of the code below, any insight would be greatly appreciated.
SQL SELECT address1 tnAddress, city tnCity, state tnState, zipcode
tnZipcode,
hotel_code tnHotel_Code, name tnHotelName, product_code
tnProduct_code, loc_type tnLoc_Type,
phone tnPhone, country_code tnCountry
INTO
:po_aboLocator
FROM
Hotel
WHERE
city in :pi_aboNickNameList[*].sCityName and
country_code in :pi_aboNickNameList[*].sCountryCode
ON SESSION getDBSession();
Thank you very much,
Bob
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

Bob.
That syntax isn't know Forte, used Dynamic SQL and coding
it dynamically. And the SQL statement exceed 255 bytes, divide in 2 or more
sentences (NameListCity1, NameListCity2, NalmeListCountry1, ...)
Try with:
NameListCity = 'city1','city2','city3'...
NalmeListCountry = 'country1','country2','country3',...
WHERE
city in (:NameListCity) and
country_code in (:NameListCountry)
Bye.
"Briggs, Bob" <Bob.Briggsmarriott.com> wrote:
I'm trying to invoke a query to Informix to select rows that match any of
the city / country pairs that exist in an array that is passed into the
method. The SQL itself seems to be OK however it appears that Forte is
having a problem in parsing the Select statement when it gets to the WHERE
clause. The resulting exception shows the SQL string formatted properly up
to the WHERE clause which ends like "WHERE city". Does anyone know of a way
to make this type of query work in a single invocation? I'm trying not to
issue multiple queries as would be the case if I used Dynamic SQL and coding
it dynamically with multiple OR statements is not really an option since the
overall length of the SQL statement cannot exceed 256 bytes. I have included
an example of the code below, any insight would be greatly appreciated.
SQL SELECT address1 tnAddress, city tnCity, state tnState, zipcode
tnZipcode,
hotel_code tnHotel_Code, name tnHotelName, product_code
tnProduct_code, loc_type tnLoc_Type,
phone tnPhone, country_code tnCountry
INTO
:po_aboLocator
FROM
Hotel
WHERE
city in :pi_aboNickNameList[*].sCityName and
country_code in :pi_aboNickNameList[*].sCountryCode
ON SESSION getDBSession();
Thank you very much,
Bob
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

Similar Messages

  • Need Help in Splitting a String Using SQL QUERY

    Hi,
    I need help in splitting a string using a SQL Query:
    String IS:
    AFTER PAINT.ACOUSTICAL.1..9'' MEMBRAIN'I would like to seperate this string into multiple lines using the delimeter .(dot)
    Sample Output should look like:
    SNO       STRING
    1            AFTER PAINT
    2            ACOUSTICAL
    3            1
    4            
    5            9" MEMBRAIN
    {code}
    FYI i am using Oracle 9.2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    There's this as well:
    with x as ( --generating sample data:
               select 'AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN' str from dual union all
               select 'BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN' str from dual)
    select str,
           row_number() over (partition by str order by rownum) s_no,
           cast(dbms_xmlgen.convert(t.column_value.extract('//text()').getstringval(),1) as varchar2(100)) res
    from x,
         table(xmlsequence(xmltype('<x><x>' || replace(str,'.','</x><x>') || '</x></x>').extract('//x/*'))) t;
    STR                                                S_NO RES                                                                                                
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 1 AFTER PAINT                                                                                        
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 2 ACOUSTICAL                                                                                         
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 3 1                                                                                                  
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 4                                                                                                    
    AFTER PAINT.ACOUSTICAL.1..9" MEMBRAIN                 5 9" MEMBRAIN                                                                                        
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          1 BEFORE PAINT                                                                                       
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          2 ELECTRIC                                                                                           
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          3 2                                                                                                  
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          4                                                                                                    
    BEFORE PAINT.ELECTRIC.2..45 caliber MEMBRAIN          5 45 caliber MEMBRAIN      
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help with SQL Query with Inline View + Group by

    Hello Gurus,
    I would really appreciate your time and effort regarding this query. I have the following data set.
    Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
    1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*20.00*-------------19
    1234567----------11223--------------7/5/2008-----------Adjustment for bad quality---------44345563------------------A-----------------10.00------------19
    7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
    4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765--------------------I---------------------30.00-------------19
    Please Ignore '----', added it for clarity
    I am trying to write a query to aggregate paid_amount based on Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number and display description with Invoice_type 'I' when there are multiple records with the same Reference_No, Check_Number, Payment_Date, Invoice_Number, Invoice_Type, Vendor_Number. When there are no multiple records I want to display the respective Description.
    The query should return the following data set
    Reference_No---Check_Number---Check_Date--------Description-------------------------------Invoice_Number----------Invoice_Type---Paid_Amount-----Vendor_Number
    1234567----------11223-------------- 7/5/2008----------paid for cleaning----------------------44345563------------------I-----------------*10.00*------------19
    7654321----------11223--------------7/5/2008-----------Adjustment from last billing cycle-----23543556-------------------A--------------------50.00--------------19
    4653456----------11223--------------7/5/2008-----------paid for cleaning------------------------35654765-------------------I---------------------30.00--------------19
    The following is my query. I am kind of lost.
    select B.Description, A.sequence_id,A.check_date, A.check_number, A.invoice_number, A.amount, A.vendor_number
    from (
    select sequence_id,check_date, check_number, invoice_number, sum(paid_amount) amount, vendor_number
    from INVOICE
    group by sequence_id,check_date, check_number, invoice_number, vendor_number
    ) A, INVOICE B
    where A.sequence_id = B.sequence_id
    Thanks,
    Nick

    It looks like it is a duplicate thread - correct me if i'm wrong in this case ->
    Need help with SQL Query with Inline View + Group by
    Regards.
    Satyaki De.

  • New MAC user, old Picasa user - need help!

    recently purchased my IMAC - and while I have loved it - I haven't loved used iphoto.  I'm an old picasa user and when I copied all of my picasa fotos in iphoto - while the pictures transfers all the names and dates of the folders that the pictures were in did not - so they are all randomly scattered through out.
    What I would really like to do is use Picasa for Mac and have it recognize my external drive, storing and altering all of the pictures there.  Is this possible?  I need help!

    Sure - you can use any software you choose - you can not use both iPhoto and Picasa - they do not work together
    For iPhoto support this is a good pace
    For Picasa support yu need to go to the Picasa forums
    And note that while Picasa is a very good package iPhoto is a dabase program and is much more powerful - but it does have a learning curve
    LN

  • Frustrated: Novice Illustrator User Needs HELP

    Frustrated: Novice Illustrator User Needs HELP
    Hello All
    I am a novice user of Illustrator [after you read my question it will probably be obvious] running Illustrator 14.0.0 (CS4) - on a MAC iMac running 10.4.11.  I am a small business owner and have to wear many hats and so I am forced to be my graphic designer by default - ha ha
    PROBLEM - If I make a box using the RECTANGLE TOOL... The box should have a point at each Corner and the Middle of the box, as well as, in the Middle of each Side, and middle of Top and Bottom for a total of 9 anchor points...  but it only has 5... missing the 4 anchor points in the Middle of each Side, and middle of Top and Bottom. It is the same on Text Boxes too..  I can NOT find a setting to change this.... More, when running Illustrator on my MAC Laptop, It has all 9 anchors on the box...   I looked at Preferences etc... and matched everything to be the same but the problem is not fixed?
    Any help would be greatly appreciated
    Thanks-
    13CrazyTrain

    Aw, c'mon James. Chill it a bit.
    Yeah. You continually throw around your little personal jibes, and then if someone calls your bluff, you think you can back out of it with the old "can't you take a joke?" comeback.
    In my previous work environment where everyone used Illie, Freehand was a word to be used cautiously – a bit like Macbeth in the theatre.
    Well, I didn't work in your previous environment. And FreeHand specifically had nothing to do with this thread until you brought it up. Seems to me it's you who has a FreeHand chip on his shoulder.
    I thought you knew my way of expressing myself better...
    What, you think I keep a personality registry of regulars here or something? I'll tell you what I don't do: I don't engage in personal insults here. Yet your personal jibes are frequent enough for me to have grown weary of them.
    I think I was not dismissing bounding boxes as useless...
    Excuse me? "There's absolutely no need to use bounding boxes"?
    You are probably right that bounding boxes came with Illie 9.
    Probably before that. But I can personally recall that the current-selection bounding box was present in AI9. Unlike some, I try to avoid making claims that I can't immediately substantiate.
    I hopped straight from 6 to 9 and that was the first time I had seen them outside of Freewotever.
    I'm not familiar with "Freewotever." But if you're again trying to be funny, you are also again revealing your near complete unfamiliarity with it. FreeHand is not the program that continually cluttered the interface with bounding boxes. In fact, for many years that is exactly one of the distractions FreeHand users complained about re Illustrator.
    First off, FreeHand's interface doesn't display bounding boxes. It displays only bounding box handles (four dots) on non-basic constructs like clipping paths. (Somewehere around FH 9, it implemented the optional Transform Handles, but that's another thing.) In the cases of rectangles and ellipses, FreeHand doesn't display Bounding Boxes per se. Working in FreeHand has always provided more functionality with much less visual clutter (and tool glut) than Illustrator's defaults.
    The difference is that FreeHand has always provided proper live geometric shape primitives--something which Illustrator still doesn't provide, even though it's one of the most basic of all vector drawing interface expectations, being present in just about any vector drawing program on the planet--except Illustrator. That point of confusion is common among those who are experienced only with Illustrator's chronically outdated and archaic interface.
    Quite to the contrary, a rectangle drawn in a program that does provide basic live primitives doesn't need a bounding box to perform the bare-bones basic manipulation exemplified, because you can change the aspect ratio of it (and corner radius) anytime you want, regardless of its rotation. You can do this not only in FreeHand, but Canvas, Inkscape, Xara Designer, and even in just about any basic drawing module of just about any "works" or "office" bundle. It's just Illustrator that still fails to provide live shape primitives, and therefore needs a rotated bounding box to provide a very limited subset of such common functionality. You draw a rectangle (or any other geometric primitive) in Illustrator, and all you get is a dumb path. So Illustrator actually needs bounding boxes more than other programs, because of its anemic core funciton set and its hideous user interface.
    But of course, someone who is familiar only with Illustrator wouldn't know that. Which is fine...so long as they don't spew derision at programs they know next to nothing about (and users of such programs).
    ...bearing in mind that I have been at this job since the days of Rotring pens with nosebleeds.
    So? I was using Rapidographs and constructing compound rotation in isometric on the board for about a decade before I came to prefer Staedtler pens because I found them less prone to clog. What does that have to do with anything?
    Obviously newcomers should be encouraged to use new features, but preferably not before they have grasped the basics thoroughly. How basic bounding boxes are is perhaps a moot point.
    Nonsense. Other self-proclaimed "experts" in Illustrator would no doubt argue that bounding boxes were added for the benefit of "beginners." Again, this is not a "new feature." And yes, it is bare-bones basic; just implemented in a half-baked manner in Illustrator.
    As for step 3 you are right, but if you turn off the preview you can use the pixels on the paths for alignment,
    Egads. That's really grasping at straws, Steve.
    ...Or use bounding boxes.
    Or use bounding boxes.
    JET

  • I need help please , i try to use itunes but my iPhone don't appear on itunes, i try everyting ,dowwload itunes again restart computer and iPhone,restart running device support,etc.

    i need help please , i try to use itunes but my iPhone don't appear on itunes, i try everyting ,dowwload itunes again restart computer and iPhone,restart running device support,etc.

    Windows doesn't detect iPhone: http://support.apple.com/kb/ts1538
    Mac: http://support.apple.com/kb/ts1591

  • I need help trying to activate my new phone online where do i go??

    i need help trying to activate my new phone online where do i go??

    Log in to your MyVerizon (verizonwireless.com) and on the Overview page scroll down to I WANT TO... in the third column of boxes, under DEVICE, the 3rd one down is "Activate or Switch Device".  Click on that and follow the instructions.  If there is an issue, it will instruct you to call customer service or you will be connected to customer service automatically.  Let us know if this works...

  • I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    Encryption wouldn't matter except for Wifi.
    While 10.2 might help, there's not much you can do on the Internet these days with less than 10.4.11
    Tiger Requirements...
    To use Mac OS X 10.4 Tiger, your Macintosh needs:
        * A PowerPC G3, G4, or G5 processor
        * Built-in FireWire
        * At least 256 MB of RAM (I recommend 1GB minimum)
        * DVD drive (DVD-ROM), Combo (CD-RW/DVD-ROM) or SuperDrive (DVD-R) for installation
        * At least 3 GB of free disk space; 4 GB if you install the XCode 2 Developer Tools  (I recommend 20GB minimum)
    http://support.apple.com/kb/HT1514
    http://www.ebay.com/sch/i.html?_nkw=mac+os+x+tiger+retail+10.4
    See Tom's, (Texas Mac Man), great info on where/how to find/get Tiger...
    https://discussions.apple.com/message/15305521#15305521
    Or Ali Brown's great info on where/how to find/get Tiger...
    http://discussions.apple.com/thread.jspa?messageID=10381710#10381710
    As far as Memory, that's sort of easy, find your eMac here...
    http://eshop.macsales.com/MyOWC/Models.cfm?Family=emac&sType=Memory
    As far as Hard Drive, it's not easy to replace the Internal drive, I'd maybe suggest an external Firewire drive to boot from...
    http://eshop.macsales.com/item/Other%20World%20Computing/MAU4S7500G16/

  • Allan Eckert, need help on G5 Coolscan 5000 use

    Allan , need help on G5 Coolscan 5000 use. Please email me from my profile.
    Thank you,
    Frank

    Just to chime in with my 2 cents and experience ...
    A few years ago I used a coolscan 4000 to scan my personal slides as a project. I had about 2000 of them from over the last 20 years and it took me about 6 weeks of personal time to do this. It was done on a Windows P4 2.5GHz Dell, but the slowest part was the actual scanning itself. I used 1 pass, Digital ICE, and saved them as 16bit TIFFs .... a whopping 65MB per scan.... To speed things up I bought the Nikon Slide adapter ($600 CDN) that would batch scan 50 slides at a time, however it would jam ( especially with the older cardboard mounted Kodachrome slides) periodically ... oh maybe 20-30 times with 2000 slides, and that really wasted time as I had to determine what need to be rescanned, and restart at the offending slide. This also would happen in the middle of the night when I was sleeping after setting the batch scan to run all night. Jamming often occurred as two slides tried to be scanned at the same time, as well as a slightly 'bent or creased' mount I found that the newer plastic mounts were better, but not entirely jam free, Nikon has some info on how well the various mounts work in their adapter on their website. Anyway I wish you well with 300+K slides to scan and recommend the batch slide adapter, and I think your speed will be determined more by the HW scan time than the CPU/GPU, so I would try to get as many scanners going as you can with that number of slides.
    -Robert
    PS I now have all originals in Aperture, and gave up the Dell 3 years ago.

  • Need help pl/sql function body returning SQL query - Reports

    I need help with Grouping by on a report that I developed in my application.
    I have posted my Code in
    Apex.oracle.com
    workspace : c a s e _ m a n a g e m e n t
    User Id : public
    Password : public
    I need help on Page 38 Reports.
    I get blank lines when I do break by first , second and third columns on the reports attribute.
    So I think I have to write "group by " or Distinct in side the SQL query. But not sure how to do it there.
    Thank you

    Is this an APEX question, then try here:
    Oracle Application Express (APEX)
    Is this an Oracle Reports question, then try here:
    Reports
    Is this an SQL question:
    Please provide sample data and expected output. Also please show what you have tried already.

  • Need help on SQL Statement for UDF

    Hi,
    as I am not so familiar with SQL statements on currently selected values, I urgently need help.
    The scenario looks as follows:
    I have defined two UDFs named Subgroup1 and Subgroup2 which represent the subgroups dependent on my article groups. So for example: When the user selects article group "pianos", he only sees the specific subgroups like "new pianos" and "used pianos" in field "Subgroup1". After he has selected one of these specific values, he sees only the specific sub-subgroups in field "Subgroup2", like "used grand pianos".
    I have defined UDTs for both UDFs. The UDT for field "Subgroup1" has a UDF called "ArticleGroup" which represents the relation to the article group codes. The UDT for field "Subgroup2" has a UDF called "Subgroup1" which represents the relation to the subgroups one level higher.
    The SQL statement for the formatted search in field "Subgroup1" looks as follows:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP1]  T0 WHERE T0.[U_ArticleGroup]  = (SELECT $[OITM.ItmsGrpCod])
    It works fine.
    However, I cannot find the right statement for the formatted search in field "Subgroup2".
    Unfortunately this does NOT WORK:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2]  T0 WHERE T0.[U_Subgroup1]  = (SELECT $[OITM.U_Subgroup1])
    I tried a lot of others that didn't work either.
    Then I tried the following one:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2]  T0 WHERE T0.[U_Subgroup1] = (SELECT T1.[Code] FROM [dbo].[@B_SUBGROUP1] T1 WHERE T1.[U_ArticleGroup] = (SELECT $[OITM.ItmsGrpCod]))
    Unfortunately that only works as long as there is only one specific subgroup1 for the selected article group.
    I would be sooooo happy if there is anyone who can tell me the correct statement for my second UDF!
    Thanks so much in advance!!!!
    Edited by: Corinna Hochheim on Jan 18, 2010 10:16 PM
    Please ignore the "http://" in the above statements - it is certainly not part of my SQL.
    Please also ignore the strikes.

    Hello Dear,
    Use the below queries to get the values:
    Item Sub Group on the basis of Item Group
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP]  T0 WHERE T0.[U_GroupCod] =$[OITM.ItmsGrpCod]
    Item Sub Group 1 on the basis of item sub group
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP1]  T0 WHERE T0.[U_SubGrpCod]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP]  T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp])
    Sub group 2 on the basis of sub group 1
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP2]  T0 WHERE T0.[U_SubGrpCod1]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP1]  T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp1])
    this will help you.
    regards,
    Neetu

  • Need help in SQL (DENSE_RANK) function

    Hello All,
    I need the help in SQL.
    We have a table called status and the column are
    status_id number
    account_id number
    status_cd varchar2(10)
    created_id varchar2(10)
    created_by date
    and data is as follows
    insert into status values (1,101,'ENTER','ABC',to_date('21-JAN-2007 11:15:14','DD-MON-YYYY HH:MI:SS'));
    insert into status values (2,101,'REVIEW','DEF',to_date('21-JAN-2007 11:30:25','DD-MON-YYYY HH:MI:SS'));
    insert into status values (3,101,'APPROVE','GHI',to_date('21-JAN-2007 11:30:25','DD-MON-YYYY HH:MI:SS'));
    insert into status values (4,102,'ENTER','ABC',to_date('21-JAN-2007 11:18:14','DD-MON-YYYY HH:MI:SS'));
    insert into status values (5,102,'REVIEW','DEF',to_date('21-JAN-2007 11:33:25','DD-MON-YYYY HH:MI:SS'));
    insert into status values (6,102,'CANCEL','GHI',to_date('21-JAN-2007 11:33:25','DD-MON-YYYY HH:MI:SS'));
    insert into status values (7,103,'ENTER','ABC',to_date('21-JAN-2007 11:21:14','DD-MON-YYYY HH:MI:SS'));We have different status as follows
    1. ENTER
    2. REVIEW
    3. APPROVE
    4. CANCEL
    5. REJECT
    My requirement ..
    I need the max of created_id column for the status in ('APPROVE','CANCEL') and if there is no status in ('APPROVE','REVIEW') than it should be NULL.
    I wrote an SQL as
    select account_id,max(created_id) keep (dense_rank first order by decode(status_cd,'APPROVE',created_dt,'REVIEW',created_dt,NULL) DESC NULLS LAST,
          decode(status_cd,'APPROVE',status_id,'REVIEW',status_id,NULL) DESC NULLS LAST) last_app_rev_user
    from status
    group by account_id and gives me the output like
    ACCOUNT_ID LAST_APP_R
           101 GHI
           102 DEF
           103 ABCBut I want the Output like
    ACCOUNT_ID LAST_APP_R
           101 GHI
           102 DEF
           103 NULLAs the account 103 has no status called 'REVIEW' and 'APPROVE'
    My DB Version in 10.2.0.3.0.
    Hope I explain it properly. And if you have any other option without dense_rank still i will be happy.
    Thanks in advance for your help.
    AB
    null
    Message was edited by:
    AB

    instead of max(created_id) keep... use
    smth like max(case when status_cd in ('APPROVE','REVIEW') then created_id end) keep...

  • Need Help in SQL command LIKE !

    Hi all,
    plz go through the following sql statement :
    select last_name
    from employees
    where last_name like '%a%e%' or last_name like '%e%a%';
    This gives an output where the last_name contains a or e in it.
    Now what would be the best solution to find the records in a table where last_name contains a,e,i,o,u (in anyorder). Do I need to write all the combinations ? Or is there any solution.
    Thanks,
    Sandeep

    Thnaks all for your help. However, the issue is not yet resolved.
    Ok let me more clear.
    Now consider a table called Employees which has a column called LAST_NAME.
    All the last_names in that column are of 10-20 letters. I want to findout the names
    which has the letters q,o,p,r,s (in anyorder).
    What would be the SQL statment ? From my point of view, I have to use LIKE keyword and use different combinations like '%q%0%p%r%s' or '%o%p%q%r%s' .,.....etc.
    Or do we have any other better solution ?
    Thnaks a lot for your solutions

  • NEED HELP IN SQL HOMEWORK PROBLEMS

    I NEED HELP IN MY SQL HOMEWORK PROBLEMS....
    I CAN SEND IT VIA EMAIL ATTACHMENT IN MSWORD....

    Try this:
    SELECT SUBSTR( TN,
                   DECODE(LEVEL, 1, 1, INSTR(TN, '#', 1, LEVEL-1) + 1),
                   DECODE( INSTR(TN, '#', 1, LEVEL) , 0 ,
                           LENGTH(TN) + 1, INSTR(TN, '#', 1, LEVEL) )
                   - DECODE(LEVEL, 1, 1, INSTR(TN, '#', 1, LEVEL-1 ) + 1)
           ) xxx
    FROM (
        SELECT '234123#1254343#909823#908232#12345' TN FROM DUAL
    CONNECT BY LEVEL <= LENGTH(TN) - LENGTH(REPLACE(TN,'#')) + 1
    XXX                               
    234123                            
    1254343                           
    909823                            
    908232                            
    12345
    SELECT regexp_substr(tn, '[^#]+', 1, level) xx
    FROM (
        SELECT '234123#1254343#909823#908232#12345' TN FROM DUAL
    CONNECT BY LEVEL <= LENGTH(TN) - LENGTH(REPLACE(TN,'#')) + 1
    XX                                
    234123                            
    1254343                           
    909823                            
    908232                            
    12345 

  • Need Help On SQL Statement

    I am using Sybase as my back end database. I need help on my SQL statement regarding datetime. The datetime is store as a 9 digit integer in the database (...I believe it is a Decimal(30,6) format, let me know if I am wrong).
    If I do this, "select * from mytable;" It works out fine (except I don't know what the date means e.g. 998919534)
    If I do this, "select * from mytable where datetime_col < '9/5/2002' ; I got an error. I even tried '9/5/02 11:00 000 am' but it didn't help.
    How do I specify a date or datetime in my query?
    Thanks in advance.

    I execute the sql statement
    select * from mytable where datetim_col < convert(datetime, '3/4/2002', 101) ;
    I got mix result. I got an error message "cannot convert 10375584 to a date.
    Yet, he statistics window of the I-sql says
    "estimated 493 rows in query (I/O estimate 87)
    PLan> mytable (seq)"
    It looks like I my the SQL statement is correct and then the system can't display it in the Data window.
    Any thought ?

Maybe you are looking for

  • List View Web Part Search problem

    We have a problem with the search in the List View Web Part (SearchBox). If you enter anything in SearchBox and the beginning of the search, nothing happens. This problem only occurs in non-admins. In this case, the browser generates an error: "inplv

  • Problems viewing in High Def

    I have a DV7 1245dx and everytime I try to watch anything in high definition it does not play properly.  The sound is ok but the picture is not.  The way to describe it is the viewing moves in frames, as if I'm just looking at still photos.  It doesn

  • SET_AUTHORITY - Replacement for ECC 6.0

    Hi, I am in Upgrade Project ...where I m upgrading from 4.6C to ECC 6.0... I need to replace the SET_AUTHORITY function module as it is flagged obsolete in 4.6 C... Can any one help me with their code...Points will rewarded for immidiate reply... Tha

  • Raw files (.nef) appear as generic icons - unable to view content

    I have followed the instructions from the Adobe article "Raw files appear as generic icons?" posted at the Bridge forum start page, but my raw fils (.nef) are still appearing as generic icons. I am using Bridge CS4 that came with PSE 8, Snow Leopard

  • Problem exporting HUGE ship drawings to any graphics format.

    I work at a law firm which deals with very large drawings (some of which are 4 feet wide, by about 16 to 20 feet long).  Sometimes we receive PDF's of these drawings, but their sheer size makes them unmanageable to print.  One option is to export the