Regarding the count(*) while using with table alias

Hi,
I have question in Count(*). Will it work with table allias.
It works when I use like below
"select count(*) po_header_id from po_headers_all" -- its working perfectly
but , when i queried like below its not working,
"select count(*) poh.po_header_id from po_headers_all poh"
I like you guys to clarify my query.
Thanks in advance.
Regards,
Uvaraja

the words you write just after a column or an expression or a function will become an ALIAS and aliases don't have any table or scheme.
select count(*) RRRR from mytable;RRRR is an alias in this example. maybe you have a column called RRRR in the table but this is not it. so you can not put your table name as prefix to it. mytable.RRRR will indicate the column not alias. if it doesn't include a dot, it could be used as alias but dot is violating naming rules.
you could do that:
select count(*) "mytable.RRRR" from mytable;now, "mytable.RRRR" becomes your alias.

Similar Messages

  • 3-1674105521 Multiple Paths error while using Bridge Table

    https://support.us.oracle.com/oip/faces/secure/srm/srview/SRViewStandalone.jspx?sr=3-1674105521
    Customer Smiths Medical International Limited
    Description: Multiple Paths error while using Bridge Table
    1. I have a urgent customer encounterd a design issue and customer was trying to add 3 logical joins between SDI_GPOUP_MEMBERSHIP and these 3 tables (FACT_HOSPITAL_FINANCE_DTLS, FACT_HOSPITAL_BEDS_UTILZN and FACT_HOSPITAL_ATRIBUTES)
    2. They found found out by adding these 3 joins, they ended with circular error.
    [nQSError: 15001] Could not load navigation space for subject area GXODS.
    [nQSError: 15009] Multiple paths exist to table DIM_SDI_CUSTOMER_DEMOGRAPHICS. Circular logical schemas are not supported.
    In response to this circular error, the developer was able to bypass the error using aliases, but this is not desired by client.
    3. They want to know how to avoid this error totally without using alias table and suggest a way to resolve the circular join(Multiple Path) error.
    Appreciated if someone can give some pointer or suggestion as the customer is in stiff deadline.
    Thanks
    Teik

    The strange thing compared to your output is that I get an error when I have table prefix in the query block:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE TMP1.A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    ORA-31693: Table data object "SYSADM"."TMP3" failed to load/unload and is being skipped due to error:
    ORA-38500: Unsupported operation: Oracle XML DB not present
    Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Fri Dec 13 10:39:11 2013 elapsed 0 00:00:03
    And if I remove it, it works:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    . . imported "SYSADM"."TMP3"                             5.406 KB       1 out of 2 rows
    Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Fri Dec 13 10:36:50 2013 elapsed 0 00:00:01
    Nicolas.
    PS: as you can see, I'm on 11.2.0.4, I do not have 11.2.0.1 that you seem to use.

  • BODI and automatic use of table alias

    I have a problem with BODI's automatic use of table alias as the same as the table name, when the table name is a reserved word.
    I'm reading from an Informix database, where I've got a table named aggregate. This is a reserved word and gives me problems when BODI is generating the optimized SQL for my select statement.
    The generated SQl would look like this (simplified):
    SELECT  aggregate.aggr_id
    FROM informix.aggregate aggregate
    This will fail (I'm using an odbc connection), due to syntax error.
    Running this within Aqua Studio will also fail. Changing the table alias to aggr will work fine.
    My question is how I can prevent or owerride BODI's use of aggregate as the table alias in this case.

    Have you tried the Templates?
    1. Select Tools > General Options
    2. Expand Naming Standards and select Templates
    3. Set the template structure you want to use. I used abbreviation (table) or short name(entity) here. i.e use the "Add Variable button to see the options available and add as required. In this instance I'd suggest using the abbreviation e.g. for the primary key I have {table abbr}_PK. Note that you can use "substr" here too.
    4. Apply the change and go to the model.
    Now these template work in 3 different ways.
    1. When transforming or forward engineering the logical to relational models, the templates are applied to the key creation.
    2. In the Relational diagram when drawing new relationships between tables or adding new constraints.
    3. After the fact, if you apply the templates. Either 1 at a time or globally.
    a. To update a single table: To do this select any table and invoke the property palette. Select the Naming Rules button. Check the rules you want to update and click OK. The templates are now applied to your table, renaming the keys.
    b. To update multiple tables, select the relational model mode int he Browser, right-click for the context menu and select "Apply Naming Standards" This will update all the items in the model using the template structure set. Please note, regrettably this last (3b), does not work in the latest patch release, but if you are on the initial production release, then the tables are all updated. This has been bugged and fixed and so will be rectified in the next release.
    Regards
    Sue

  • Can EJB 3.0 beans be used with tables that do not have a primary key?

    Can a EJB 3.0 persistence bean be used with tables that do not have a primary key defined? I am building a test application based on the HowTo - Building EJB 3.0 Faces App paper posted after Openworld (schalk). The issue I am running into when trying to run the application is: Exception Description: Entity class [class com.persistence.Rpthead] has no primary key specified. Note: I get a simular error when using toplink directly.
    The tables I am binding to do not have primary keys defined. They use unique constraints to manage the table integrity.
    Is it possible to use EJB 3.0 on tables without a primary key? If not, are there plans to support this in the future?

    The spec requires a primary key Id annotation. I will take your suggestion to EJB 3.0 expert group.
    Can you also send an email to [email protected] with your requirement?
    -Debu

  • In BAPI's why the structures are used in table parameters?

    Hello sir,
    what is BAPI sir? In BAPI's why the structures are used in table parameters?  table parameters they are using structures but not using any customized tables ? 
    regards
    rachu.

    Hello Rachu
    BAPIs provide RFC-enabled interfaces to SAP business objects (e.g. like customer, sales order, purchase order, etc.).
    A BAPI does basically the same like you would need to do calling the corresponding transaction (e.g. BAPI_SALESORDER_CREATE -> VA01).
    Since they are RFC-enabled they can be called from external systems.
    BAPIs represent an external interface for the outside world. Very often you will find within the BAPI that there is a mapping done to the (SAP-)internal structures at the beginning of the coding and vice versa at the end of the coding. Thus, you will (almost) never find any DB table name used as type of a BAPI TABLES parameter.
    Regards
      Uwe

  • Error erase Queries in Query Manager- The query is used with user-define...

    Hello Experts
    I have deleted a User Field that had a Formatted Search and now I can not remove it because it is linked according to a UF, the error message is as follows:
    "The query is used with user-defined values [Message 952-23]"
    There will be a way to resolve this issue???
    Thanks in advance

    Hi Juan,
    I have tried this very limited, but the formid, is this a number in your case?
    SELECT * from cshs t0 inner join ouqr t1 on t0.queryid = t1.intrnalkey
    where t1.qname = '[%0]'
    Running this query I can get the form id that I need to recreate, but I have a feeling you already know the form id, is this correct?
    - Is there an error when you try to recreate the form id?
    - Will it not let you recreate the same form id because the id is given by the system?
    If it is not possible to recreate the form id, please prepare a backup and log a message. Support should be able to correct the entry in table cshs.
    Hope it helps.
    Jesper

  • My mac book air suddely disconnects many times the wifi while using wifi

    my mac book air suddely disconnects many times the wifi while using wifi

    Lots of things can impact wifi connections.  If you are at the marginal edge of the wifi range (which depends not only on distance, but what's between you and the transmitter) you may find the connection dropping in and out.  Sometimes a minor repositioning of the computer or transmitter can solve the issue.
    As well, interference can also create problems.  For instance, microwave ovens are really good at disrupting 2.4Ghz signals, and that the frequency used most often in wifi routers--so if someone turns on the microwave and it's between you and the transmission point it won't be surprising if the connection drops.  As well, metal blocks the signal fairly effectively, so if (say) ductwork is between the CPU and the wireless router there can be problems.
    Finally, I've run into some combos of devices and routers that just don't seem to like each other :-) .  That said, I've not hit that problem with either Air I'm running (an 11" and a 13"), though obviously I've not tried to connect them to every type of router out there.
    Just this week I was at a hotel and in my room the hotel wifi was "interesting" with every device I tried (iPhone, Android phone, Kindle Fire, iPad and the two Airs) dropping connection regularly from the work desk.  Turned out if I moved the devices over to the nightstand on the other end of the room (not the best work environment) all of the problems went away, so it clearly was a signal issue and the exact layout of that room and the hotel's wifi.
    If the machine has a problem when positioned close to a variety of routers, then I'd suspect a hardware issue with the wifi card in the Air and get that checked by Apple.  Similarly, if your problem is with your home router, I'd check to see if other devices also are getting dropped, since there could be a hardware issue on the router.

  • TS1398 I can't connect to the internet while using wi fi on my iphone 4S.

    I can't connect to the internet while using wi fi on my iphone 4S. I can connect on my computer and on my IPad but not with my iphone. I have tried everything. Once or twice it did connect but then disconnected immediately. I have tried everything.

    LeeinSunnyIsles wrote:
    I can't connect to the internet while using wi fi on my iphone 4S. I can connect on my computer and on my IPad but not with my iphone. I have tried everything. Once or twice it did connect but then disconnected immediately. I have tried everything.
    If you have truly tried "everything" then there is no hope of it ever working again. However, have you tried rebooting your router?
    Have you tried Settings/General/Reset - Reset network settings?

  • Loading issue : Error: sql error in the database while accessing a table

    Hello,
    where as one of the DTP in the process chain failed due to  *Error: sql error in the database while accessing a table*, where as in the short dump it showing as Transaction log of data base is full., but i checked the data base space in DB02, more space is available . once we run the same DTP by manually its successful. its not through  any errors.
    could u please help me out solve the problem.
    Thanks
    siva kumar.

    it might be a lock. do you drop index before loading?
    the database might be full at the moment of loading and not later if many loadings happen at the same time on the same system...
    when you then rerun your dtp manually, it can go through as it's perhaps the only one running at that moment...
    you can try to set the btch parameter to 1...this will help in some cases.
    M.

  • I have a new Macbook pro and can't recall the password I used with my Time capsule - How can I (ideally) retrieve or possibly change the time capsule password?

    I have a new Macbook pro and can't recall the password I used with my Time capsule - How can I (ideally) retrieve or possibly change the time capsule password?

    Remember security on a TC is an illusion.
    Simply press the reset button for 1-2 sec.. you must not do too long .. it will then hard reset.. but soft reset will revert all passwords to default for 5min. ie TC password is now public.
    Remember this the next time because anybody at all can change your passwords.
    Once into the TC you can then open the view passwords if you wanted any weaker security. Click and open the TC.. and click on edit.. then go to the top menu..
    Voila .. all your passwords in plain sight to any Tom Dick and Fred.

  • Hey how are you guys listen i have an iphone 4s the one i use with the H20 CARRIEr and i trying to enable the option call forwarding and when i type tho number i go back and i notice to the call forwarding it turning off as soon i back to the main menu ?

    hey how are you guys listen i have an iphone 4s the one i use with the H20 CARRIEr and i trying to enable the option call forwarding and when i type tho number i go back and i notice to the call forwarding it turning off as soon i back to the main menu ?

    There are a lot of posts in the forums today with people having problems with iMessage.   There was also a published outage yesterday, so it's possible there are still some issues that may be impacting you both.
    I would just wait it out - I'm sure it will be sorted out soon.

  • HT1145 The airport extreme used with my iMac is not seeing my other devices...anybody, please?

    The airport extreme used with my iMac is not seeing my iPhone 5, iPad (third generation) or my windows based PC.  When I open the airport utility it shows only the internet and my iMac.  It does not identify the others.  Any thoughts?  Thanks

    Hi DaileyT,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    When do Apple wireless devices appear in AirPort Utility?
    http://support.apple.com/kb/HT3624
    Troubleshooting missing devices
    If your Apple wireless device doesn't show up in the wireless device list, try the following:
    Check to see that the device is turned on.
    Check that the device is connected to the network via Ethernet or in wireless range of your computer.
    Make sure the device has had adequate time to start up and become discoverable. In the case of Apple wireless devices that are not connected via Ethernet, AirPort Utility scans for new devices once every 15 seconds. From the time a device becomes discoverable (typically around one minute), it could take up to another 15 seconds before the device is displayed in the list.
    If you have just configured a new Apple Wireless device, upgraded the firmware, selected "Restore Default Settings..." or have hard reset and configured an Apple wireless device and it does not show up in AirPort Utility after restarting, you may have an incorrect setting. You may want to hard reset the unit and set it up again.
    If you are connected to a specific wireless network, all Apple wireless devices which make up that network will appear. However, if you "Restore Default Settings..." from AirPort Utility, or hard reset a device that is out of physical wireless range of the computer, you will need to move the device closer the computer to configure it again.
    Best of luck,
    Mario

  • What 32inch plus tv to buy in the UK to use with new intel Mac mini

    As the title - What 32inch plus tv to buy in the UK to use with 1.83 intel Mac mini. It does not have to have freeview as I will be using tubestick. I do want to use the hdmi connection. Who's got a great setup, with no issues - model numbers appreciated £1200 ish budget

    So everything is working normal except for screen saver? Hmm. That's odd. Perhaps your settings are such that shortly after the screen saver kicks in the mini is also set to go to sleep. That would cause the screen to lose sync and give the "no signal" message. Check your Energy Saver against the Screen Saver settings and adjust the sleep interval if need be.
    FYI, running a screen saver on an LCD TV is not a good idea long term. An LCD uses a lamp as a backlight, and the lamp has a finite lifetime. Consuming it's limited hours of life by running a screen saver all the time (like overnight, everynight) will shorten considerably the service life of your TV.

  • I currently have a D-Link DI-604 broadband router with windows computers.  How can I add wifi to the network for use with ipad?  Can I use AirPort Express?

    I currently have a D-Link DI-604 broadband router with windows computers.  How can I add wifi to the network for use with ipad?  Can I use AirPort Express?

    Yes. You can directly connect an 802.11n AirPort Express Base Station (AXn) using an Ethernet cable. The AXn would then just need to be configured as a bridge to allow the D-Link to continue to provide both NAT & DHCP services for all network clients connected to either router.
    In this configuration, the AXn would broadcast a wireless network for your wireless network clients to connect to.

  • Can I get information regarding the client browser using JSP

    can I get information regarding the client browser using JSP. like.. name, screen resolutions, font type, screen width and height of the browser etc.,
    if possible then please give me the samples..
    thanks,

    can I get information regarding the client browser using JSP. like.. name, screen resolutions, font type, screen width and height of the browser etc.,
    if possible then please give me the samples..
    thanks,

Maybe you are looking for

  • Error while Scheduling Java Jobs - IDM

    Hi I am getting the below error when I try to schedule a Java Job for every hour or every minute. However the same job runs perfectly fine when I put in On Demand and run it manually. I even tried with the Dummy Job and it spits the same error. Below

  • WL 5.1sp9 and patches for JDK 1.3 and Solaris 2.8patches

    Are there any patches needed to run WL 5.1 sp 9 with solaris 2.8, JDK 1.3.0, and clarify 10.1. Any response to any topic would be appreciated.

  • Vendor master Head office Concept tax value problem

    Hi, I have created two Vendor master and assigned one vendor as Head office in other,I have tax code for the plant vendor material combinatio for which one vendor 5% VAT is maintained and other vendor I have maintained 2% cst now while creating A MIR

  • Servlet with Multiple Threads spawned automatically

    Hi, I have a problem involving threads in servlet as follows: Scenario: I am working on developing a web application using Tomcat and Netbeans IDE. I have a servlet which gets values from the session object and then constructs a server-side object an

  • Swatches not allowing CMYK mixing

    Version CS3 Indesign Mac, 10.4.10 All of a sudden I can not mix CMYK process inks in the swatches. When I try to do this this is what I see: 1. Color type: process 2. Color Mode: CMYK Then I get Pantone DS If I scroll my choices I also see duplicatio