Return data from all columns apart from a certain data type.
Bit stuck on something, hope somebody here can help:
I want to do a 'select * from ' a table, to return all columns except ones of a certain datatype. ie. I want to return data from all columns, excluding columns of datatype 'SDO_GEOMETRY'.
This gives me the list of columns:
SELECT COLUMN_NAME
FROM USER_TAB_COLUMNS
WHERE TABLE_NAME = 'ORDER_ITEM'
AND DATA_TYPE <> 'SDO_GEOMETRY'; But I can't seem to take it any further...
Now if I knew the columns beforehand, then of course I could just list them, excluding the geometry column, but this is to be used for a plug-in for MS Word, where a user can pick database columns to dynamically fill a report from - but I don't want the geometry columns as these can't be handled in this way.
Hi Reggie,
> connects to the database and presents a list of tables
My guess is that this macro is written so it selects from all_tab_cols.
Change that plugin and let it select from a view like the one above. That way, the users won't be able to see/pick anything that you are not able/willing to present for them.
Edit:
You could even tease your users, and let them see the columns, but not being able to pick them.
create or replace view available_tab_columns
as
select decode(pickable.data_type, null, 0, 1) pickable
,atc.* -- narrow down yourself
from all_tab_cols atc -- or maybe user_tab_cols
,(select 'CHAR' data_type from dual union all
select 'DATE' from dual union all
select 'NUMBER' from dual
-- complete positive list, yourself
) pickable
where atc.data_type = pickable.data_type(+);Regards
Peter
Message was edited by:
Peter Gjelstrup
Similar Messages
-
How to Select data using same column name from 3 remote database
Hi,
Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
Ex.
SELECT *
a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
FROM
*((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
*(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
WHERE b.dept = 'finance'
AND a.position = 'admin'
AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
GROUP BY a.name, b.status ;
NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
Thanks in advnce. :)
Edited by: user12994685 on Jan 4, 2011 9:42 PMuser12994685 wrote:
Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
Each object must be uniquely identified. So you cannot do this:
select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
SQL> select * from (dual, dual) d;
select * from (dual, dual) d
ERROR at line 1:
ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
SQL> select * from (select * from dual d1, dual d2) d;
select * from (select * from dual d1, dual d2) d
ERROR at line 1:
ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
DUM DUM
X X
SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution. -
HI,
I bought my iphone 5 from you guys (online Apple Store). all good apart from one thing, FACETIME is totally missing from my phone and its not there in my settings too. kindly advise with the reason or if there any upgrades to be done.
Many Thanks,
Chamara KodagodaWe are all iphone userss just like you. You did not buy your iphone from us.
You are not addressing Apple here at all.
Did you buy the iphone ins the Middle East? If so, it will never have facetime. It is not allowed by the government. -
My Macbook (2009 White) Has had water spilled onto it, it all works apart from the screen. When connected to an external display it works fine, just not on the Macbook itself. Does anyone know how to fix this?
Take it to Apple and ask them to fix the physical damage the water caused.
Allan -
All drives apart from boot drive completely wiped!! HELP!!
Just booted up my G4 1.25GHZ which has an internal drive and 2 firewire drives attached. All files on all the drives apart from the boot drive have dissapeared.
The drives are empty1 That's 600GB of data that's just vanished. The only thing I can think of is I'm using Personal Backup from Intego for backing up data mostly in the background and it seemed to be taking ages to repair permissions yesterday. But it wasn't backing up on all the drives.
I'm trying Techtool pro to recover the data but I need to know what happend...
Help if you can, thanks.Have you tried the drives on another computer to see if the files are showing up? This might be a problem with the FireWire jacks or OS X not recognizing it anymore, it happened to me once, I had to reinstall Panther at the time and it was a bad memory chip that caused OS X to behave improperly.
If the drives work on other systems, you should try reinstalling OS X and if it still does not work, try the Hardware Test that came with your computer. -
Since approx 7am GMT I've been getting "Error in sieve filter" message with each incoming mail, worse though, since about 12 noon I cannot recieve or send mail to or from my iCloud account apart from I've been getting emails from Apple (ie I've just received a welcome one from Apple Support Communities...)!! I've had this account for years, never had a problem - it can't be the OSX Mail server because the problem is the same when I log directly into iCloud. I've tried sending emails from my Hotmail account to my iCloud account (a .mac) and just get undeliverable messages back. I'm really in the s**t now at work. : ( I just set up a Smart TV yesterday with a wireless dongle - that's the only thing I've done out of the ordinary. I've spoken to Sky who are my ISP and they say all's fine with them (although the router kept kicking my off the internet this morning which was strange...). Router seems fine now though. I'm really hoping someone here can help!!
Many thanks!!Do you think once Apple sort this out I'll get my missing emails back?
-
iCal keeps sending email notifications of all agenda items from the last 2 years (then I bought my laptop). After laptop start up this action is repeated every hour. How can I stop these >300 emails coming in every hour?
Hi,
We have rolled out a fix for this issue.
Please log off and log back in to your machine and the issue should be resolved automatically. In case that does not work, please manually run the msi installer posted here (may require reboot).
For details, please refer to the KB article here: Multiple RunOnce keys created 11.0.10 and 10.1.13 Acrobat | Reader
Please let us know if you still face any issues.
Thanks,
Ashu Mittal -
Can access a remote server from all locations except from my house
This is a very weird problem.
My home ISP is Xplornet. This is a rural "fixed wireless" set-up (antenna on the roof connected to the Xplornet modem). The Xplornet modem is connected to a Belkin router. The router connects wirelessly to my laptop.
The remote server (the office server) is connected to an Apple airport. The ISP is Bell, and we have a static IP.
Before we moved, I was with Rogers (cable Internet service). While with Rogers, I could connect remotely to my office server using the AFP protocol.
Now, here's the weird problem: Now that I am with Xplornet, I can connect to my server remotely from any location EXCEPT my house. I can go to a Starbucks and connect to my server. I can go on vacation in the U.S. and use the local WiFi to connect to my server. But I CANNOT connect from my house to the remote server.
I have spoken to Xplornet and they say it's an Apple problem (which is what every non-Apple tech always seems to say). Or, perhaps, they say, it's the local dealer (Sentel Communications).
Sentel says I need to pay for a static IP for my home (Huh?). Why would I need to pay for a static IP at home just so I can connect OUT to a remote server?
Is this somehow related to the Belkin router not letting me "out"?
Any thoughts and advice would be greatly appreciated.Thanks for responding, Bob.
Below is the result of my Ping attempt, and port scans. I scanned 548, and 5003, which I use for FileMaker (which works fine from home), I don't use screen sharing. (I can confirm that both 548 and 5003 are open on Airport on the host machine.)
So, from my home (remote) location, here's what I get (IP: 74.xx.xxx.xx):
--- 74.xx.xxx.xx ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 57.126/91.371/185.774/45.549 ms
Scan of port 5003
Port Scan has started ...
Port Scanning host: 74.xx.xxx.xx
Open TCP Port: 5003 fmpro-internal
Port Scan has completed ...
Scan of port 548
Port Scan has started ...
Port Scanning host: 74.xx.xxx.xx
Port Scan has completed ...
So, 5003 is OK, 548 is not. I have to conclude this is related to my home ISP in some way?
Unfortunately, the host server is running 10.3 (don't ask), which is not supported by Logmein. (I do use Logmein for a Windows machine on the same network, and I can connect to one area of the server via the PC, but not to the part I need, which might be the subject of a future thread.)
Regardless, being able to connect to my work server remotely from every location EXCEPT from my home is infuriating.
I just saw this thread about an ISP that has blocked port 548, although I always assumed the ports had to be open on the host side, but maybe not? (I have to confess, I do find the port stuff confusing.)
If my home ISP blocks 548, then I guess that would prevent me from remotely accessing the server from home?
If that is the case, is port 548 the only AFP option? -
ICal deleted all my events before a certain date on it's own
I couldn't tell you when this happened, but just noticed it today. I went back to check on a prior event detail in my iCal and realized EVERYTHING from all calendars before October 11th has been deleted completely. Is there anyway I can get this info back?... kinda need it for tax purposes..
I do have a time machine backup of the whole computer, but assume I'd lose my new events since that backup if I reverted.
THANK YOU
adamI am getting more confident that the problem has something to do with a background synchronization process. If I launch either Entourage or iSync, iCal launches also automatically. Perhaps there is a sync preference somewhere that got fouled up?
Can anyone verify that launching Entourage or iSync also triggers iCal to launch on its own?
MBP 15" 2.33 GHz Mac OS X (10.4.9) -
Returning a result from multiple columns based on the last date that the column has a value.
I have this table named (pmtable)
ctrlno jobid docdate work1 work2 work3
1 7 2/12/2014 20 hrs
10 hrs
2 7 2/22/2014 35 hrs
15 hrs
3 7 2/28/2014
12 hrs
4 8 1/17/2014 15 hrs
13hrs
I want the result to be like this
jobid work1 work2 work3
7 35hrs 10 hrs 12 hrs
Is this possible?Hi serenace,
To achieve your requirement, you can reference the below.
DECLARE @Tbl TABLE(ctrlno INT,jobid INT,docdate DATE,work1 INT,work2 INT,work3 INT);
INSERT INTO @Tbl VALUES(1,7,'2/12/2014',20,10,NULL);
INSERT INTO @Tbl VALUES(2,7,'2/22/2014',35,NULL,15);
INSERT INTO @Tbl VALUES(3,7,'2/28/2014',NULL,NULL,12);
INSERT INTO @Tbl VALUES(4,8,'1/17/2014',15,13,23);
INSERT INTO @Tbl VALUES(4,8,'2/17/2014',15,NULL,NULL);
INSERT INTO @Tbl VALUES(4,8,'3/17/2014',NULL,16,NULL);
;WITH cte AS(
SELECT jobid,docdate,attr,value FROM
@Tbl
UNPIVOT
(value FOR attr IN(work1,work2,work3)) AS UT
cte2 AS(
SELECT jobid,attr,value , ROW_NUMBER() OVER(PARTITION BY jobid,attr ORDER BY docdate DESC) AS rn
from cte
SELECT jobid,ISNULL([work1],0) [work1],ISNULL([work2],0) [work2],ISNULL([work3],0) [work3] FROM
cte2
PIVOT
(SUM(value) FOR attr IN([work1],[work2],[work3])) AS PT
WHERE rn=1
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Data from an odata service not displaying data in all columns.
Hi
This is my Odataservice
the code in view. I have placed only the first 2 columns code. The rest are similar
the last few lines
oTable.setModel(omodel);
oTable.bindRows("/MixmatpoXS");
return oTable;
The result I am getting
Only Two columns are populated which I believe is the keys. This is a calculation view created in the Hana modeler.
What could be the reason.
Thanks and regards
Aruntemplate: new sap.ui.commons.TextView().bindProperty("text","PROPERTYNAME")
see this PROPERTYNAME properly. i think you missed this one. bec in you mensioned 1 is Plant and another one is PLANTNAME so.. -
How to read the data from a column that is in clob data type (but XMLdata)
Hi ,
I have a table XYZ which has a column RESPONSE_XML in clob datatype format.we can convert it to XMLTYPE(RESPONSE_XML) to read the data in XML format.
Now this is the DynamicXML schema file. Here I want to see all the COMMONNAME, ResourceDescribedby_VALUE into column_A, ResourceDescribedby_ResourceSpecCharacteristic_Name tags into column_B
How can I do that .. any suggestions please ..
Here is a sample XML:
<?xml version="1.0" encoding="WINDOWS-1252" ?>
_- <soap:Body>
- <SearchResourceResponse xmlns="http://www.google.com/google.xsd">
- <MessageElements xmlns:tns="http://www.www.google.com/google.xsd" xmlns="">
<MessageStatus>SUCCESS</MessageStatus>
- <MessageAddressing>
<from>gmail</from>
<to>Gmail SOAPTester</to>
<messageId>1234</messageId>
<action>SearchResource</action>
<transactionId>OR</transactionId>
<ServiceName>SearchResource</ServiceName>
<ServiceVersion>1.1</ServiceVersion>
</MessageAddressing>
</MessageElements>
-<SearchResponseDetails xmlns:tns="http://www.www.google.com/google.xsd" xmlns="">
- <SubNetwork>
- <Pipe xsi:type="icl:Trail" xmlns:icl="http://www.www.google.com/google.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CommonName>318-223-4675</CommonName>
<objectID>91535716980514105329</objectID>
<SourceSystem>MARS</SourceSystem>
- *<ResourceDescribedBy> <value>RDSSLA</value>* *<ResourceSpecCharacteristic> <name>*CentralOfficeCode</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceRelationship>
- <Resource xsi:type="icl:Trail">
- <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>AssignLocationExternalFormat</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>PairVerticalExternalFormat</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>PairVerticalInternalFormat</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>+</value> - <ResourceSpecCharacteristic> <name>PairVerticalSign</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>RDSSLA</value> - <ResourceSpecCharacteristic> <name>CentralOfficeCode</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceDescribedBy> <value>B</value>- <ResourceSpecCharacteristic> <name>EntityType</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
- <ResourceType>FeederCircuit</ResourceType>
- <LogicalPhysicalResource>
- <PhysicalResource xsi:type="icl:PhysicalConnector">
<usageState>S</usageState>
- <ResourceDescribedBy> <value>25.392</value> - <ResourceSpecCharacteristic> <name>CableLength</name> </ResourceSpecCharacteristic>
</ResourceDescribedBy>
</PhysicalResource>
</LogicalPhysicalResource>
- <TerminationPoint xsi:type="icl:TrailTerminationPoint">
<CommonName>1000/34A</CommonName>
- </Resource>
</ResourceRelationship>
<lrStatus>W</lrStatus>
</Pipe>
</SubNetwork>
</SearchResponseDetails>you don't appear to have posted valid XML, so I can't reproduce using your example, but you will need to look at something like this:
select xtab.common_name
from your_table yt
,xmltable('/SearchResourceResponse'
passing xmltype(yt.response_xml)
columns
common_name varchar2(20) path 'SearchResponseDetails/CommonName'
) xtab
; -
From Time column in Excel to Java Date ?
Hi there!
After I have read range data from Excel to a Java Object[][]
array/table, one of my excel time columns becomes "floats"
numbers when I try to access them in Java, like this:
from 15:00:00 in Excel to 0.625 in my Java program
How can I avoid this OR transform/parse this 0.625 number
back again to time/Date 15:00:00 inside Java ? hmmm
Is there any setup of jCom that can controll this somehow ?
I have been able to transform:
from 11.15.01 in Excel, becomes "Thu Nov 15 00:00:00 CET 2001"
with the jCom bridge ...
When I have this "string" on this format, it's easy
to get a Java Date of this with SimpleDateFormat.
... but not with this time of mine :-)
Any clues where to look or a solution for this ?
-- Thank you !
-- ErlendExcel stores times as decimal fractions (representing portions of a day)
There is no Time data type in VB so is probably represented by a Single
object.
This object is then converting to a java.lang.float on the Java side.
0.625 can be parsed by multiplying by (24*60*60) to get the number
of seconds after midnight.
A list of supported COM data types and their java equivalents
can be found in chapter 7 of the jCOMReference pdf file.
damon
"Erlend Bjorge" <[email protected]> wrote in message
news:3be2983e$[email protected]..
>
Hi there!
After I have read range data from Excel to a Java Object[][]
array/table, one of my excel time columns becomes "floats"
numbers when I try to access them in Java, like this:
from 15:00:00 in Excel to 0.625 in my Java program
How can I avoid this OR transform/parse this 0.625 number
back again to time/Date 15:00:00 inside Java ? hmmm
Is there any setup of jCom that can controll this somehow ?
I have been able to transform:
from 11.15.01 in Excel, becomes "Thu Nov 15 00:00:00 CET 2001"
with the jCom bridge ...
When I have this "string" on this format, it's easy
to get a Java Date of this with SimpleDateFormat.
... but not with this time of mine :-)
Any clues where to look or a solution for this ?
-- Thank you !
-- Erlend -
Hi All, we are having a nightmare trying to get audio from the Ipod touch to a new computer, it registers everything when doing test with the following info optical drive detected no audio cd found. so we can upload photos but not music, anyone know how to overcome this in simple terms please?
iOS: Device not recognized in iTunes for Mac OS X
or
iOS: Device not recognized in iTunes for Windows -
Citrix Xenapp 5 and Windows server 2003 environment. We want to force Firefox to kiosk mode with a pre-set homepage for all users. I also want to lock this to only one website. I have managed to set up the kiosk mode with R-Kiosk addon and Mozilla.cfg file. I am trying to use BlockSites to block all internet sites and only allow the one site with the whitelist option. I can get the addon to install for all users, but can’t get the default settings across. I have tried to add this with the Mozilla.cfg file, but it looks like this addon is getting it’s settings from the profile folder. If I set the preferences for the addon in Mozilla,cfg file, it actually picks it up but it doesn’t apply it to the addon for some reason. Does anyone have any other ideas on how I can lock this down to the one site?
I am not entirely sure how to do this, but the enterprise community would be a good place to ask. They have a email group you can ask on this page: [https://www.mozilla.org/en-US/firefox/organizations/faq/]
Maybe you are looking for
-
After I SL mail stopped working. At first I thought it was only mail with attachments but i tried a simple text only email and it will not send, it just stays in outbox... Anyone else having the same issue?
-
How do i clean fingerprints off my iMac 27" screen?
I have the 27" late 2012 model iMac and was wondering how to clean fingerprints off the screen.While my family does a videochat we kinda move the scrrenup,down,left or right to view the whole room and nov there are fingerprints on the screen.If i cle
-
Problem deleting multiple keywords in lightroom 5
I am importing about 20,000 pictures from Flickr. they are all creative commons, and the end result will be the use of approximately 4000 of these in an online sign language dictionary. I use Bulkr to import them and this process imports the tags as
-
ISAPI plugin setup for Idempotent --- URL level
The document http://www.weblogic.com/docs51/admindocs/isapi.html#ini says Idempotent=ON/OFF is a URL level flag, does this mean I can indicate which servlet is idempotent and which is not ? but it fails to tell me how to set
-
QuickTime Pro 7.55.90.70
Another Apple product purchase is hanging on the balance here. How can I quickly (my meager hourly USD wages have easily been burned in addition to two kids that need to be bathed for school) reinstall this on my PC? I have my key code (authorized on