Introduction to programming in SQL, einreihig functions, please help

Hello

I'm taking my first class of SQL programming, and I have no experience with SQL. Some of the exercise questions give me wrong, so I was hoping that someone would be kind enough to help.

I'm supposed to write a query that displays the name of the family (with the first letter capitalized and all other letters lowercase) and the length of the name of everyone whose name begins with the letters J, or M.


The second part, where I include employees whose name begins with J, A, or M, gives me fits. I can query an initial one at a time, but I was not able to interview several initials.

That's what I have so far:

SELECT INITCAP (last_name), 'Name', LENGTH (last_name) "length".

Employees

WHERE last_name LIKE'm %';

But, when I try to ask for M, and J I get errors.

For example:

SELECT...

Of...

WHERE last_name LIKE am %A %%J ';

I have tried so many combinations, it's driving me crazy.

Help, please?

Thank you very much!

Please be kind, this is my first post.

Hello

Welcome to the forum!

In the WHERE clause, you can have a State composed, i.e. 2 or more simple conditions combined by using GOLD or et.  In this case:

WHERE last_name LIKE'm %'

OR last_name LIKE 'a % '.

OR last_name LIKE 'J % '.

The WHERE clause as a whole is regarded as TRUE 1 if all the pieces of GOLD-bounded is TRUE,

It's just one of the many ways to get the desired results.  The that I would probably use for this task is

WHERE SUBSTR (last_name, 1, 1) IN (', 'A', 'J')

Tags: Database

Similar Questions

  • I have Win7/64. But I don't know, how I have my USB webcam to work. The cameras settle the program will not work. Please help me!

    I have Win7/64. But I don't know, how I have my USB webcam to work. The cameras settle the program will not work. Please help me!

    Thank you more:
    Steve Vidacs /Hungary

    On Monday, November 5, 2012 20:14:15 + 0000, istvanvidacs wrote:

    I have Win7/64. But I don't know, how I have my USB webcam to work. The cameras settle the program will not work. Please help me!

    You must have installed a Windows 7 64-bit driver (if it exists)
    for this. Do you have? Otherwise, navigate to the web site of the camera
    manufacturer, search, download and install it.

    Ken Blake, Microsoft MVP

  • PIA_INSTALL_FAIL (weblogic 12.1.2) for PT8.54 on 2012/MS SQL Win 2012 - please help

    I try to install peoplesoft Campus solution 9.2 on windows server 2012 VM. I installed

    MS SQL Server 2012 (64-bit),

    tuxedo12.1.1.0_VS2012 (64-bit)

    JDK 1.7.0.79 (Java Hotspot 64 bit)

    WebLogic 12.1.2 (64-bit)

    Installed PeopleTool 8.54, Solution Campus 9.2. Created in the demo database. Able to create the server application domain. However after trying several times I'm not able to install the PIA area either by running setup.bat of PsMpPIAInstall by running psadmin.

    I use administrator user id (which is the administrator of the local domain). For running setup.bat, I opened the administrator command prompt and issued this command: setup.bat javahome - e;\java\jdk1_7_0_79\bin\java.exe.

    Just before you run this command, I checked the java - version correctly pointing to 1.7.0.79.

    I get the newspaper in the form

    Fri Jan 29 03:35:36 PST 2016: installation of PIA from...

    PS_HOME: E:\PT8.54

    Install the Action: CREATE_NEW_DOMAIN

    Creating domain...

    Deployment of Web Applications...

    Deploying the Extension of WebLogic files...

    Deployment of PeopleSoft Site files...

    Deployment of PeopleSoft Site Doc files...

    Completed.

    PS_CFG_HOME: E:\PS_CFG_HOME

    PIA_INSTALL_FAIL

    There is no additional information in the log file. I tried to generate a debug log for more information but could not find a way. I have these environment variable defined:

    PS_HOME = E:\PT8.54

    PS_APP_HOME = E:\CS9.2

    PS_CFG_HOME = E:\PS_CFG_HOME

    PS_PIA_HOME = E:\PS_PIA_HOME

    WL_HOME = E:\WLS1212\wlserver

    BEA_HOME = E:\WLS1212\wlserver

    MW_HOME = E:\WLS1212

    When I train with psadmin, I get the same log file. In both cases, the wlspiainstall.properties file is generated as follows:

    Properties of installation #PIA

    #Fri 29 Jan 03:37:16 PST 2016

    wl_home = E\: / WLS1212/wlserver

    wl_domain_jython_script=C\:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\Administrator_wlsdomain.py

    sp_version = 2

    system_password = 5061737377307264

    bea_home = E\: / WLS1212

    ps_home = E\: / PS_CFG_HOME

    http_port 80 =

    wl_config_type = singleserver

    system_id = system

    User.dir=C\:/users/administrator/APPDATA/local/Temp/2/I1454067324/Windows

    ps_tools_home=E\:/PT8.54

    scripts_home=E\:/PT8.54/Setup/PsMpPIAInstall/scripts

    domain_name = peoplesoft

    Java.IO.TMPDIR=C\:/Users/ADMINI~1/AppData/Local/Temp/2

    WL. Create.domain.file=E\:\\PT8.54\\setup\\PsMpPIAInstall\\archives\\WLPeopleSoft.jar

    https_port = 443

    I've seen for previous versions Nicolas.Gasparotto advice was to install jrockit - however I could not find a jrockit supporting jdk 1.7 and the installation guide doesn't say not it is mandatory to install jrockit. so, I install java hotspot jdk.

    Where I'm going wrong? What should I do to get this corrected? Also how can I generate a detailed log file for more information on the causes of the failure?

    I'm fighting with this for the last 7 days - please help as soon as POSSIBLE.

    PS: Here's my psadmin variables env (after reset as advised BEA_HOME):

    ALLUSERSPROFILE = C:\programdata

    APPDATA = C:\Users\Administrator\AppData\Roaming

    BEA_HOME = E:\WLS1212

    CUSTOMERNAME = SWATIRWIN7A

    CommonProgramFiles = c: files

    CommonProgramFiles (x 86) = c: Program Files (x 86) \Common Files

    CommonProgramW6432 = c: files

    COMPUTERNAME = WIN-EK9NHV8J7T0

    COMSPEC=C:\Windows\system32\cmd.exe

    FP_NO_HOST_CHECK = NO

    HOMEDRIVE = C:

    HOMEPATH = \Users\Administrator

    JAVA_HOME = E:\Java\jdk1_7_0_79\bin

    JAVA_OPTS = "" - Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID = 1.0 - Xms32m-Xmx64m ' "

    LAX_DEBUG = true

    LOCALAPPDATA = C:\Users\Administrator\AppData\Local

    LOGONSERVER = \\WIN-EK9NHV8J7T0

    MW_HOME = E:\WLS1212

    NUMBER_OF_PROCESSORS = 4

    OS = Windows_NT

    Path=e:\cs9.2\bin\server\winx86;e:\cs9.2\bin\server\winx86\interfacedrivers;e:\pt8.54\bin\server\winx86;e:\pt8.54\bin\server\winx86\interfacedrivers; E:\PT8.54\jre\bin; C:\Windows\System32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\system32\WindowsPowerShell\v1.0\;e:\java\jdk1_7_0_79\bin; E:\Program files (x 86) \Microsoft SQL Server\110\Tools\Binn\; E:\Program Files\Microsoft SQL Server\110\Tools\Binn\; E:\Program Files\Microsoft SQL Server\110\DTS\Binn\; E:\Program files (x 86) \Microsoft SQL Server\110\Tools\Binn\ManagementStudio\; E:\Program files (x 86) \Microsoft SQL Server\110\DTS\Binn\; E:\Oracle\Middleware\Oracle_Home\tuxedo12.1.1.0_VS2012\bin; E:\Oracle\Middleware\Oracle_Home\tuxedo12.1.1.0_VS2012\jre\bin\server; E:\Oracle\Middleware\Oracle_Home\tuxedo12.1.1.0_VS2012\jre\bin;

    PATHEXT = .COM; EXE;. BEATS;. CMD;. VBS;. VBE;. JS;. JSE;. WSF;. WSH;. MSC

    PIA_HOME = E:\PS_PIA_HOME

    PROCESSOR_ARCHITECTURE = AMD64

    PROCESSOR_IDENTIFIER = Intel64 family 6 model 45 Stepping 7 GenuineIntel

    PROCESSOR_LEVEL = 6

    PROCESSOR_REVISION = 2d 07

    ProgramData = ProgramData

    ProgramFiles = c: Program Files

    ProgramFiles (x 86) = c: Program Files (x 86)

    ProgramW6432 = C:\Program Files

    PROMPT = $P$ G

    PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\; E:\Program files (x 86) \Microsoft SQL Server\110\Tools\PowerShell\Modules\

    PS_APP_HOME = e:\cs9.2

    PS_CFG_HOME = E:\PS_CFG_HOME

    PS_CUST_APP_HOME = e:\cs9.2

    PS_CUST_HOME = e:\cs9.2

    PS_HOME = e:\pt8.54

    PS_MACH = WIN-EK9NHV8J7T0

    PUBLIC = C:\Users\Public

    SESSION = RDP - Tcp #1

    SystemDrive = C:

    SystemRoot = C:\Windows

    TEMP = C:\Users\ADMINI~1\AppData\Local\Temp\2

    TMP = E:\PS_CFG_HOME/Temp

    TM_CPAU = Yes

    TOOLSREL = 8.54

    TUXDIR=E:\Oracle\Middleware\Oracle_Home\tuxedo12.1.1.0_VS2012

    USERDOMAIN = WIN-EK9NHV8J7T0

    USERDOMAIN_ROAMINGPROFILE = WIN-EK9NHV8J7T0

    USERNAME = administrator

    USERPROFILE = C:\Users\Administrator

    windir = C:\Windows

    WL_HOME = E:\WLS1212\wlserver

    _NT_SYMBOL_PATH=e:\cs9.2\bin\server\winx86;e:\pt8.54\bin\server\winx86;

    Where is JAVA_HOME = E:\Java\jdk1_7_0_79 (instead of JAVA_HOME = E:\Java\jdk1_7_0_79\bin)?

    Nicolas.

  • Lost the program Office 2003 Windows Vista - please help

    I lost Office 2003 from my laptop Windows Vista Home Premium - I know not how--I still files of Word, Outlook etc, but nothing in them - I really need to get to word files I have, but they opened used - please help - I can not afford to buy it. I'm sure it's still in the material somewhere, but how can I reinstall it?

    Help please

    Office:

    http://www.Microsoft.com/Office/Community/en-us/flyoutoverview.mspx

    Office newsgroups

    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Office.misc&lang=en&CR=us

    Discussions of general issues of the Office.

    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Word.docmanagement&lang=en&CR=us

    Discussions of general issues of Word.

    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Outlook.General&lang=en&CR=us

    Discussions of general issues of Outlook.

    They will help you with your office questions when repost you in the Office discussion groups above.

    See you soon.

    Mick Murphy - Microsoft partner

  • I have instauled elements 12 from one drive to the launch of the program, I got error 16 Please help

    I just instauled items 12 disc, when I open the program it told me there is an error 16 and should I uninstal and re - install and try agan.  I followed these instructions, and I still get error 16 after the second time of the instalation.  Could advise please what should I do to get the program to work

    If you mean code 16 output, you will need to check your installation log files, http://helpx.adobe.com/x-productkb/global/installation-launch-log-errors-creative.html

    http://helpx.Adobe.com/Creative-Suite/KB/troubleshoot-install-logs-CS5-CS5.html

  • How to achieve this using an analytic function - please help

    version 10g.
    This code works very well with my requirement. I'm tyring learn analytical functions and implement than in the query below. I tried to use row_number,
    but I could nt achieve the desired results. Please give me some ideas.

    SELECT c.tax_idntfctn_nmbr irs_number, c.legal_name irs_name,
           f.prvdr_lctn_iid
      FROM tax_entity_detail c,
           provider_detail e,
           provider_location f,
           provider_location_detail pld
     WHERE c.tax_entity_sid = e.tax_entity_sid
       AND e.prvdr_sid = f.prvdr_sid
       AND pld.prvdr_lctn_iid = f.prvdr_lctn_iid
       AND c.oprtnl_flag = 'A'
       AND c.status_cid = 2
       AND e.oprtnl_flag = 'A'
       AND e.status_cid = 2
       AND (c.from_date) =
              (SELECT MAX (c1.from_date)
                 FROM tax_entity_detail c1
                WHERE c1.tax_entity_sid = c.tax_entity_sid
                  AND c1.oprtnl_flag = 'A'
                  AND c1.status_cid = 2)
       AND (e.from_date) =
              (SELECT MAX (c1.from_date)
                 FROM provider_detail c1
                WHERE c1.prvdr_sid = e.prvdr_sid
                  AND c1.oprtnl_flag = 'A'
                  AND c1.status_cid = 2)
       AND pld.oprtnl_flag = 'A'
       AND pld.status_cid = 2
       AND (pld.from_date) =
              (SELECT MAX (a1.from_date)
                 FROM provider_location_detail a1
                WHERE a1.prvdr_lctn_iid = pld.prvdr_lctn_iid
                  AND a1.oprtnl_flag = 'A'
                  AND a1.status_cid = 2)
    Thank you

    Published by: new learner on May 24, 2010 07:53

    Published by: new learner on May 24, 2010 10:50

    Can be like that not tested...

    Select *.
    Of
    (

    SELECT c.tax_idntfctn_nmbr irs_number, c.legal_name irs_name,
    f.prvdr_lctn_iid, c.from_date as c_from_date, max (c.from_date) more (partition c.tax_entity_sid) as max_c_from_date,
    e.from_date as e_from_date, max (e.from_date) more (partition e.prvdr_sid) as max_e_from_date,
    PLD.from_date as pld_from_date, max (pld.from_date) more (pld.prvdr_lctn_iid partition) as max_pld_from_date

    OF tax_entity_detail c,.
    e provider_detail
    provider_location f,
    LDP provider_location_detail
    WHERE c.tax_entity_sid = e.tax_entity_sid
    AND e.prvdr_sid = f.prvdr_sid
    AND pld.prvdr_lctn_iid = f.prvdr_lctn_iid
    AND c.oprtnl_flag = 'A '.
    AND c.status_cid = 2
    AND e.oprtnl_flag = 'A '.
    AND e.status_cid = 2
    AND pld.oprtnl_flag = 'A '.
    AND pld.status_cid = 2

    ) X
    where c_from_date = max_c_from_date AND e_from_date = max_e_from_date AND
    pld_from_date = max_pld_from_date

  • Program of Complications [missing DLL] Please help

    When I opened my adobe applications, I would get this error "the program can't start because MSVCP100.dll is missing on your computer. Try reinstalling the program to fix this problem. "so I googled all the help I can find and nothing that I tried was able to solve the problem. I would try to reinstall applications, but it would give me a different error and wouldn't reinstall. So what I then do uninstall applications using the adobe cleaning tool. now when I try to reinstall the applications I am simply unable to do it because it gives me an error that I can't install it. so now I don't have one of the adobe apps on my desktop. How can I solve this problem?

    Missing DLL https://helpx.adobe.com/creative-cloud/kb/missing-msvcp110dll.html can help

    - or 2015 runtime version https://www.microsoft.com/en-in/download/details.aspx?id=48145

  • query SQL max function need help

    Hi all

    Its simple, but I'm not able to identify the problem.

    In our HRMS EBS R12, 11g database we seeded table per_all_people_f and the column employee_number (varchar2).

    case 1: normal employees whose employee_number starts with the numerical value. (for example: 9213,9214,9999,10000,10001)

    case 2: employee_number starts with tank like 'P' - (for example: "P-1245', ' P-1246'" ")

    I am writing as a small query to get the Max (employee_number) for case 1.

    Select max (employee_number) in per_all_people_f

    where employee_number not like 'P-% '.

    Output: 9999 (didn't come out desired)

    where I employee_number 10000 and 10001.

    Select * from per_all_people_f where employee_number = "10000"

    Returns the values of the table...

    Please let me know why (employee_number) max is coming "9999"...

    Thank you and best regards,

    Afzal.

    then try to do this:

    Select employee_number

    of per_all_people_f

    where employee_number not like 'P-% '.

    and translate(employee_number,'x0123456789','x') is not null;

    to find out what other non-digital employee_numbers you next to the P - prefix ones.

    HTH

  • How to achieve using the analytical functions - please help

    Oracle version: 10g
    -999 means that all THE values for this key
    with input_parameters as (select 10 filter_key , '10ACCC' filter_value from dual union all
    select 50 filter_key ,'10ACCC0001' filter_value from dual union all
    select 60 filter_key , 'PIP' filter_value from dual union all
    select 70 filter_key , 'A' filter_value from dual) select * from input_parameters;
    
    
    with profile_search as(
    select 100 profile_id , 10 filter_key , '10ACCC' filter_value from dual union all 
    select 100 profile_id , 50 filter_key , '10ACCC0001' filter_value from dual union all
    select 100 profile_id , 50 filter_key , '10ACCC0002' filter_value from dual union all
    select 100 profile_id , 60 filter_key , '999' filter_value from dual union all
    select 100 profile_id , 70 filter_key , '999' filter_value from dual union all
    select 101 profile_id , 10 filter_key , '10ACCC' filter_value from dual union all
    select 101 profile_id , 50 filter_key , '10ACCC001' filter_value from dual union all
    select 101 profile_id , 60 filter_key , 'PIP' filter_value from dual union all
    select 101 profile_id , 70 filter_key , '999' filter_value from dual union all
    select 102 profile_id , 10 filter_key , '10ACCC' filter_value from dual union all
    select 102 profile_id , 50 filter_key , '10ACCC0001' filter_value from dual union all
    select 102 profile_id , 60 filter_key , 'PIP' filter_value from dual union all
    select 102 profile_id , 70 filter_key , 'A' filter_value from dual)
    select filter_key , wm_concat(filter_value) from profile_search group by profile_id, filter_key ;
    need to identify profile that matches input parameters
    ---------------------------------------------------------------------------
    
    102 is first match because it matches exactly
    101 is second match because 999 can match any value
    100 is third match 
    70 KEY HAS THE HIGHEST WEIGHT,
    A next highest weight KEY 60 and 50 next highest weight BUTTON


    required results:
    profile_id: 102

    Published by: devarade on January 19, 2010 20:01

    Published by: devarade on January 19, 2010 20:01

    I guess that there is a typing error in your sample:

    Select 101 profile_id, 50 filter_key, '10ACCC001' filter_value from all the double union

    must be:

    Select 101 profile_id, 50 filter_key, '01' filter_value from all 10ACCC00 the double union

    Then:

    with input_parameters as (
                              select 10 filter_key , '10ACCC' filter_value from dual union all
                              select 50 filter_key ,'10ACCC0001' filter_value from dual union all
                              select 60 filter_key , 'PIP' filter_value from dual union all
                              select 70 filter_key , 'A' filter_value from dual
                             ),
            profile_search as(
                              select 100 profile_id , 10 filter_key , '10ACCC' filter_value from dual union all
                              select 100 profile_id , 50 filter_key , '10ACCC0001' filter_value from dual union all
                              select 100 profile_id , 50 filter_key , '10ACCC0002' filter_value from dual union all
                              select 100 profile_id , 60 filter_key , '999' filter_value from dual union all
                              select 100 profile_id , 70 filter_key , '999' filter_value from dual union all
                              select 101 profile_id , 10 filter_key , '10ACCC' filter_value from dual union all
                              select 101 profile_id , 50 filter_key , '10ACCC0001' filter_value from dual union all
                              select 101 profile_id , 60 filter_key , 'PIP' filter_value from dual union all
                              select 101 profile_id , 70 filter_key , '999' filter_value from dual union all
                              select 102 profile_id , 10 filter_key , '10ACCC' filter_value from dual union all
                              select 102 profile_id , 50 filter_key , '10ACCC0001' filter_value from dual union all
                              select 102 profile_id , 60 filter_key , 'PIP' filter_value from dual union all
                              select 102 profile_id , 70 filter_key , 'A' filter_value from dual
                             )
    select  profile_id,
            sum(direct_match_cnt) || ' direct matches out of ' || (select count(*) from input_parameters) match
      from  (
             select  b.profile_id,
                     b.filter_key,
                     b.filter_value,
                     sum(case when b.filter_value = a.filter_value then 1 else 0 end) direct_match_cnt
               from  input_parameters a,
                     profile_search b
               where b.filter_key = a.filter_key
                 and (b.filter_value = a.filter_value or b.filter_value = '999')
               group by b.profile_id,
                        b.filter_key,
                        b.filter_value
            ) x
      group by profile_id
      having count(*) = (select count(*) from input_parameters)
      order by sum(direct_match_cnt) desc
    /
    
    PROFILE_ID MATCH
    ---------- ----------------------------------------
           102 4 direct matches out of 4
           101 3 direct matches out of 4
           100 2 direct matches out of 4
    
    SQL> 
    

    SY.

  • Message number choice function, please help.

    Hi all

    I'm new to OFA.

    I'm choice dependent desiging message where there are 4 boxes of choice of message

    I wrote the code but the issue I'm facing is when I select a value in the first choice of message, processFormRequest the method is not called. If I click on any craft in the page, so only processFormRequest() is called and value is filled in the second fall down.

    So I need to call processFormRequest() after a value is selected in the choice of Message...

    Means

    Hello

    Did you put the firePartialAction in the choice of the Message. If you have the firePartialAction in MessageChoice means check the code of processFormRequest() if the choice of Message event is taken into account correctly or not.

    Re: List of choices dependence relative to a framework for Oracle Page

    Check out this link.

    Thank you and best regards,

    Myvizhi

  • Using management session on a DB function, please help

    Hello;
    I am writing a small application which utalizes a table in my DB. It's like a switch / stop. I wanted to know if it is possible to make a session management script which will make this 'switch' work for all users that connect to the web site.

    I need to be in position on any if there is another user who turned it off at the same time. In addition, when a new user logs into the site, it is always 'on '.

    I enclose the code of the application so far, as it is now, when a user turns off... Go for everyone. That's what I'm trying to work around. I need to use the DB so all pages of the site to realize that he is disabled or enabled and you don't have to turn it off or on whenever you go to a new page to the web site. Look at it like that. When you use like a flash site, you can turn off the sound and the whole site remembers. Well, I'm doing dynamic site CF.

    Is it possible to do with session management? If so, how I would write it. I've enabled in my session management application.cfm file. This is where I would be more likely to put this type of script for the entire site is managed by it.

    My code is attached.

    Thank you

    Phoenix

    You have probably not need to manage it its on/off switch in the Pb is at all.

    If the site is a place where the user must open a session, use variables Session or a Client for them to log in and then have a Session/Client.soundOn variable that you set for power based on what the user selects in your form.

    If there is no connection for this site, you can use cfcookie to define a variable cookie.soundOn.

    Client session variables and cookies will give you the specific features to the user you are looking for dethrone it depends on the requirements and the nature of your particular application as to how you should handle the situation.

  • This question is about programming in C. you please help me with a question that is.

    This question is about programming in c. can you please help me with an issue that is -

    Why do we write - printf ("r = c = %d %d sum = %d\n", sum c, r,);

    What we're trying to accomplish here by writing this.

    I also wanted to know why we write things within double quotes.

    The book programming in C I have, gave no information on this subject.

    The way if statements can be nested, of same whiles and fors can

    also be nested. To understand the nested loops how to work, watch the

    program below:

    / * Demonstration of nested loops * /.

    (main)

    {

    int sum c, r,

    for (r = 1; r<= 3="" ;="" r++="" )="" outer="" loop="">

    {

    for (c = 1; c<= 2="" ;="" c++="" )="" inner="" loop="">

    {

    sum = r + c;

    printf ("r = c = %d %d sum = %d\n", sum c, r,);

    }

    }

    }

    When you run this program, you will get the following result:

    r = 1 c = 1 sum = 2

    r = 1 c = 2 sum = 3

    r = 2 c = 1 sum = 3

    r = 2 c = 2 sum = 4

    r = 3 c = 1 sum = 4

    r = 3 c = 2 sum = 5

    In short, in C, a string enclosed in double quotation marks is replaced by a pointer to character to this string somewhere in memory.  The first parameter of a call to printf() is a pointer to the format string and the following parameters replace the % {(quoi que) the characters that appear in the format string.}  %d represents a whole argument of printing.

    HTH,

    JW

  • SQL Loader: Help TRIM and Decode functions please

    Hello

    I have load data from a flat file, for some columns, I need to use the TRIM and DECODE functions. It's a pipe delimited file.

    I get a syntax error (one is lower) same error listed for GARNISH.

    SQL * Loader-350: at line xx syntax error.
    Expected ', 'or') ', found 'DECODE '.


    ===========
    , FINAL_BILL_DATE CHAR (30) "TRIM(:FINAL_BILL_DATE)".
    , BUSINESS_ID 'DECODE(:BUSINESS_ID,'B',1,'C',2,'E',3,'G',4,'O',5,'R',6,'T',7,'U',8,'H',9,-1) '.


    Can someone please help.

    Thank you
    Josiane

    Hello josiane.
    The error you receive leads me to believe that at some point before the DECODING on the BUSINESS_ID line, probably some line before the FINAL_BILL_DATE line, it is a syntactic error causing the quotes before DECODING actually put an end to some other syntaxes. Without any lines that might actually contribute to this, including details of the header, it's the best I can advise.

    Hope this helps,
    Luke

    Please check the answer as helpful or response, if it is so. If this is not the case, further clarification.
    Try to always provide create table and table insert to help members of the forum to help you.

  • My search function has been hijacked. Whenever I try to click on a relivant search it goes to a completely independent website. I deleted firefox and reinstalled but it did not work. This will not occur in Internet Explorer. Please help, I don't want to u

    My browser to search was hacked, how do I get rid of this. It does not work in Internet Explorer. Please help cause I don't want to use IE I don't have to.

    I have tried different anti virus programs but its still here.
    

    Michael

    Install, update and run these programs in this order. They are listed in order of efficiency.
    (Not all programs to detect malware, you may need to run them all to solve your problem.)
    These programs are provided free for personal use, but some have limited functionality in "free" mode - but these are the features that you really need not to find and eliminate the problem you have.

    Note: If your malware infection is bad enough and you're poorly led to URLS other than what is displayed, you may need to use another PC to download these programs and use a USB stick for transfer to the afflicted PC.

    Malwarebytes' Anti-Malware - http://www.malwarebytes.org/mbam.php

    SuperAntispyware - http://www.superantispyware.com/

    AdAware - http://www.lavasoftusa.com/software/adaware/

    Spybot Search & Destroy - http://www.safer-networking.org/en/index.html

    Windows Defender: Home Page - http://www.microsoft.com/windows/prod.../default.mspx

    In addition, if you have a re-direct search engine problem, see this:

    http://deletemalware.blogspot.com/2010/02/remove-Google-redirect-virus.html

    If they can't find it or cannot delete it, post in one of these forums using specialized malware removal:

    http://www.spywarewarrior.com/index.php

    http://Forum.aumha.org/

    http://www.spywareinfoforum.com/

    http://bleepingcomputer.com

  • How to display the output of PL/SQL and difficulty package below error (please help)

    -PACKAGE SPECIFICATION AND met with success, but I see no way out, an error is also here... Please help. How do I solve this problem
    -with the code

    CREATE OR REPLACE PACKAGE package_variables
    -Declare the components of a package.
    Established PROCEDURE (VARCHAR2 value);
    Public FUNCTION get RETURN VARCHAR2;
    END package_variables;
    /



    CREATE OR REPLACE PACKAGE BODY package_variables
    -Declare the package-scoped variable.
    variable VARCHAR2 (20): = "initial value";
    -Define the function
    Get function RETURN VARCHAR2 IS
    BEGIN
    RETURN variable;
    END get;
    -Define the procedure.
    PROCEDURE set(value VARCHAR2) IS
    BEGIN
    variable: = value;
    The END value;
    END package_variables;
    /



    Result VARIABLE VARCHAR2 (20)
    CALL package_variables.get () IN: result;
    SELECT: result AS result FROM dual;


    RUN package_variables.set ("new value '");
    CALL package_variables.get () IN: result;
    SELECT: result AS result FROM dual;

    /*

    OUTPUT


    PACKAGE compiled package_variables.
    PACKAGE compiled package_variables BODY.

    Error at startup on line 2 of the command:
    CALL package_variables.get () IN: results
    Error report:
    SQL error: ORA-01008: not all variables
    01008 00000 - "not all variables.
    * Cause:
    * Action:
    RESULTS
    --------------------------------


    1 selected lines

    anonymous block filled

    Error at startup on line 2 of the command:
    CALL package_variables.get () IN: results
    Error report:
    SQL error: ORA-01008: not all variables
    01008 00000 - "not all variables.
    * Cause:
    * Action:
    RESULTS
    --------------------------------


    1 selected lines

    */

    The package name is package_variables (note the 's'. Plural.) But using package_variable (in the singular) in your call.
    Also select in as a SQL statement seems to be not valid. You encapsulate a begin - end around her block.

    SQL> begin
      2  select package_variables.get into :outcome from dual;
      3  end;
      4  /
    
    PL/SQL procedure successfully completed
    outcome
    ---------
    Initial Value
    

Maybe you are looking for

  • Why doesn't it let me turn off 'on my iphone"for notes?

    I don't want ' my iPhone' account... I want that all my notes to automatically record on my gmail account. Why can not disable this option? Y at - it turn a trick to this? I have the 6 s 64 GB iPhone and uses the last iOS.

  • Problems with micro USB in Garageband 10.1.1

    Just upgraded to GarageBand 10.1.1 in the App store and my Audio-Technica ATR2500 USB mic is recording is more correctly. It records, but at a much lower volume. So, for example if I go to an existing project and create a new track with the same sett

  • 431445 001 and 431446-001

    Is there anything else different from 431445-001 431446-001, outside power? Thank you!

  • Losing the name of the bar graph XY

    I have this question of loss of cursor name: I have two sliders of interest in the attached graph, the Green shallow who lose the cursor name (I've already activated, the name of the cursor), dark green who carries the cursor with her name "LTstart".

  • Upgrade to XP?

    I teach a class and one of my students asked if you move from Windows 95 to XP.  I didn't think it was possible, but I would like to explain why.  Is it because there are too many versions of Windows between these versions?