The SQL statement is not valid - when importing data from SQL Server using a query
Hi there,
I am trying to import data from SQL to Power Pivot using a SQL query like below:
SELECT Score.FieldCount, Score.Record.GetAt(0), Score.Record.GetAt(1), Score.Record.GetAt(2), Score.Record.GetAt(3), Score.Record.GetAt(4)
FROM
SELECT * FROM dbo.CLR1(
dbo.CLR2('c:\FILES\Test.xml'),
'SELECT * FROM [dbo].[CXCustomer_Small]') Input
) Score
And when I tried to validate it, it returns
The SQL statement is not valid. A column name cannot be blank.
I ran the above SQL statement in Management Studio and it works without problem. Any idea?
Thanks!
Chu
-- Predict everything. http://www.predixionsoftware.com
Never mind, I figured out - I need to give each column a name.
-- Predict everything. http://www.predixionsoftware.com
Similar Messages
-
Importing data from SQL Server
I'm relatively new to Oracle, and my question is about importing data. I have an SQL 2000 server and I export a database using Microsoft OLE DB provider for Oracle. The process finished OK but when I tried to query the tables qith SQL Plus Worksheet, I get a message saying:
select * from rwp_purge
ERROR at line 1:
ORA-00942: table or view does not exist
but the table is there. I can see it using DBA Studio. So, what is happening? Do I have to commit transactions after importing data from SQL Server? Do I have to rebuild statistics?
thanks in advance,
Gonzalo PellegriniWas the table created in the schema you are loggin as when trying to access the table? If not, you will have to grant access to the table logged in as the table owner.
-
Using Oracle Forms Importing Data From SQL Server into Oracle Tables.
Dear All,
We are using Oracle Forms 10g in windows XP and having OAS 10g and Oracle database 9i.
How can we import data from SQL Server 2005 into Oracle tables using Oracle Forms?
Thanks & Regards
EidyI have no idea what "Oracle Hetrogenius Services" is, so I can't help you with that, sorry.
SQL Developer might also assist you. SQL Developer can connect to SQL Server as well as Oracle and has some tools for migration. See the documentation for details:
http://download.oracle.com/docs/cd/E12151_01/doc.150/e12156/toc.htm
For additional help on using SQL Developer for this task, please consult Support or the SQL Developer forum: SQL Developer
Hope this helps,
Jacob -
Import data from sql server /vice versa
My Database serevr version is 10.1.0.3.0.
Sql Server 2000.
Is it possible to import data from sql server to oracle database?
Also other way around.
I mean import data from Oracle to sql server.
Regards,
DHi,
You can use Heterogeneous Service to do this. This component is free but poor of resources. Simple things you can do with this, complex I really don't know.
Also, to import from sqlserver to oracle you can use Oracle Warehouse Builder, an Oracle ETL tool. But, OWB do not work in other way, oracle to sqlserver.
And why do want to use sqlserver, if you have oracle?
[]'s,
Gustavo. -
Can the latest version of numbers [mountain lion] import data from filemaker version 12
can the latest version of inumbers [ mountain lion ] import data from the newest version of filemaker 12 ?
i want to import a filemaker database [ version 12 ] directly into inumbers [ latest version ].
m/s excel 2011 only allows the import of filemaker database - thru version 11 .
since excel does not offer compatibility to filemaker version 12, im looking to see if the lastest version of numbers provides this ability. ? ? ? -
Error when importing metadata from sql server
Hi,
I am having problem connecting to SQL Server. from OWB.(my owb client is 11.1.0.6.0 and owb repository is 11.1.0.1.1)
I am using Oracle Database Gateways 11g Release 1 (11.1.0.6.0) to connect.
i make all the configuration for the gateway .
and execute the dg4msql_cvw.sql to create corresponding views in sql server ...
THe dblink allows me to run SQL query from sql plus to the tables in SQL server (the host that i want to import data from is i sql server 2000).
When I test the connnection from owb to SQL Server it returns "successful"
but when i go to import the meta data of tables in SQL Server i get this error.
ORA-00942: table or view does not exist
[Oracle][ODBC SQL Server Driver][SQL Server]Invalid object name 'V$VERSION'.[Oracle][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.
ORA-02063: preceding 2 lines from FIN_LINK
owb looking for v$version in sql server and i dont know why .
i tried to create this view in sql server like this
create table v$version (banner varchar(20))
but i dont know what kind of data should i insert in ,,,,,,,
is there any idea how can i fix this
thanxthanx dallan for replying
i really execute that script u talk about and i mentioned that in first post ...
its' dg4msql_cvw.sql script and its make a views in sqlservere
its create these views :
ALL_CONS_COLUMNS
ALL_IND_COLUMNS
USER_CONS_COLUMNS
USER_IND_COLUMNS
... i r execute it as following : i have windows server 2003, the sql server 2000 installed on this server
i open the query analyzer and connect to the user that hold the db, i select open and browse to the dg4msql_cvw.sq
and then execute ... but still same error
i think this may works ..right?
and this is the trace log file :
note :
here are the trace log file :
Oracle Corporation --- TUESDAY MAY 05 2009 12:44:14.846
Heterogeneous Agent Release
11.1.0.6.0
Oracle Corporation --- TUESDAY MAY 05 2009 12:44:14.846
Version 11.1.0.6.0
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "On"
RC=-1 from HOSGIP for "PATH"
PATH from environment is "D:\app\OraGtw\bin;D:\app\product\product\11.1.0\db_1\bin;D:\app\BI\server\Bin;D:\app\BI\web\bin;D:\app\BI\web\catalogmanager;D:\app\BI\SQLAnywhere;D:\app\product\product\11.1.0\db_1\jdk\bin;D:\app\BI\server\Bin;D:\app\BI\web\bin;D:\app\BI\web\catalogmanager;D:\app\BI\SQLAnywhere;D:\app\product\product\11.1.0\db_1\jdk\bin;C:\Program Files\HP\NCU;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0"
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using SA as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
##>Connect Parameters (len=209)<##
## DRIVER=Oracle 11g dg4msql-OraGtw11g_home1;
## SERVER=web02;
## Database=acc-aeu;
#! UID=SA;
#! PWD=*
## AnsiNPW=Yes;
## QuotedId=Yes;
## IANAAppCodePage=2252;
## ArraySize=100;
## PadVarbinary=0;
## SupportNumericPrecisionGreaterThan38=1;
SQL text from hgopars, id=1, len=25 ...
00: 454C4553 2A205443 4F524620 5622204D [SELECT * FROM "V]
10: 52455624 4E4F4953 22 [$VERSION"]
hgopars, line 347: calling SQLNumResultCols got sqlstate 42S02
plz guys any ideas ??? -
Import data from SQL Server into MS Word document for Mail Merge purpose ?
Hi,
Is it possible to import contacts from SQL Server into MS Word for mail merge purpose or if retrieving data from MS Excel can we update the data in MS Excel sheet without opening it ?
Note: Remember when you open a word document already set up for mail merge, asks you to run the query to return all records from the excel sheet it is connected to.
KhurramWord and the current data source dialog do not really give you any help with that.
You either have to be able to create a View in SQL Server that performs the query you need, then connect to that, or you have to be able to create the correct query manually (or perhaps using some other query tool that can help you), then use VBA to connect
using that query.
For example, if you have been through the connection process once (connecting to a single table) then you will have a .odc (Office Data Connection file) which has the info. needed to connect to the correct server and database. It's a text file with some
HTML and XML inside. You can copy/rename it. Let's say it is called "c:\a\myodc.odc" Then in VBA you can use something like
ActiveDocument.OpenDataSource Name:="c:\a\myodc.odc, _
SQLStatement:="put your SQL statement in here, and if it is long,...", _
SQLStatement1:="put the second part in here"
You get a maximum of either 255 or around 511 characters in the SQL statement, and Word tends to impose some syntax requirements that Transact-SQL does not, so e.g. you may need to quote all your table names.
You can also se an empty .odc file and provide connection info. in the COnnection:= parameter in OpenDataSource.
As background, until Word 2000, by default you would use MS Query to create your SQL query, and MS Query does have facilities that can help you build your query (a bit like the ones in MS Access). That may still be possible (it is a bit harder to find the MS
Query option now, and I am not sure it works with the latest versions of Word). MS Query only works for ODBC queries, and they do not always work correctly when you actually issue the query using ODBC from Word, because of a Word problem to do with Unicode
fields in SQL Server. But you could probably still use MS Query to help you construct your SQL. (It's probably easier to do that in Excel, though).
Peter Jamieson -
Error occured when importing data from dmp
Hello friends
when i am importing data from dmp file
the following error occured
Please help me to solve this
Error message :
Export file created by EXPORT:V09.02.00 via conventional path
import done in WE8PC850 character set and AL16UTF16 NCHAR character set
export client uses US7ASCII character set (possible charset conversion)
Import terminated successfully without warnings.This is not really an error message but a information about possible character conversion from US7ASCII to WE8PC850 which should NOT be an issue since all US7ASCII characters are in most WExxx character sets.
Message was edited by:
Pierre Forstmann -
Import data from SQL Server to Oracle
I have created a dblink in oracle to access the SQL database. I am able to run queries through the dblink and it works fine. I have created a test table on Oracle Server to import the data. The field named "description" has CLOB data type. The corresponding datatype on SQL Server is varchar(7000).
When I insert the data from SQL Server, it completes successfully without any error but it truncates the data on CLOB field.
If I run the select query in SQLPlus I can see the entire description.
Select "description" from sql_view@dblink;
-- the above works fine.
CREATE table test
(description CLOB);
INSERT INTO TEST
Select "description" from sql_view@dblink;
-- this works but it truncates the data after 256 characters
My question is, how to get the data from SQL Server without truncating characters.
Thanks in advance,
GopalI hear the same from other friend that sql server truncated the leading zeros from the id column.
I really don't have a solution for this but you can try the work around. Export the data to flat file and upload in oracle using SQL loader, as this would be much faster and efficient. -
Importing data from SQL Server 2005 database
Dear Friends
Scenario:
We have built an application for which the database is SQL Server 2005.
Now, we have planned to switch over to Oracle 8i database.
There is a field with data type as Varchar(Max) – which can hold data with a maximum length of 231 characters (SQL Server 2005)
In Oracle 8i, the Varchar2 max size 4000 bytes or characters.
We want to import the data from SQL Sever 2005 database into Oracle 8i database.In the process, the value for the particular field whose data type set as Varchar(Max) in SQL Server 2005 and contains more than 4000 characters gets automatically truncated while importing into oracle.
We want the entire characters stored in the field to be imported into oracle database.
Please suggest solutions.
Thanks and regards
Bharath Kumar VUse CLOB if the data is purely text data. BLOB otherwise.
But the question is why you want to switch over to an Oracle version which is de-supported by Oracle? -
How to import data from SQL server to Oracle?
Dear Sir/Madam,
I want to move database data from SQL Server to Oracle, but don't how to do it, will you please help me do it?Oracle Migration Workbench is your best bet:
http://www.oracle.com/technology/tech/migration/workbench/index.html
Cheers, OTN -
EVDRE encountered an error when retrieving data from web server
Hi
When I am trying to open Data Input=>Build a schedule using a dynamic template in BPC version for SAP netweaver, I am getting the below error "EVDRE encountered an error retrieving data from the Web Server".
I am not able to open any template, every time I am getting the same message. I have tried again after reprocessing all the dimension.
Even I have tried in appset APSHELL also, there also I am getting the same error
Request you to help me to resolve the above error which will allow me to proceed further.
Thanks in Advance.
VenkatHi,
Beside Nilanjan's solution, this error could also occur when the expansion is running more rows than the Excel limit allows (65'000 rows and 256 cols for Excel 2003)...
Even when you're using suppress field to reduce the number of rows, the first sequence is to retrieve the complete dataset before performing any suppression. And this could of course exceed the limit sometimes.
Hope this helps.
Kind Regards,
Patrick -
Error when passing data from app server...
Hello Experts,
I am encountering an error when trying to pass data from application server
to my internal table. Below is the error:
"You cannot convert the character set"
Hope you can help me guys.Thank you and take care!Hi ,
ABAP code for uploading a TAB delimited file into an internal table. See code below for structures. The code is base on uploading a simple txt file.
REPORT zuploadtab .
PARAMETERS: p_infile LIKE rlgrap-filename
OBLIGATORY DEFAULT '/usr/sap/'..
DATA: ld_file LIKE rlgrap-filename.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
name1 like pa0002-VORNA,
name2 like pa0002-name2,
age type i,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
wa_record TYPE t_record.
*Text version of data table
TYPES: begin of t_uploadtxt,
name1(10) type c,
name2(15) type c,
age(5) type c,
end of t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.
*String value to data in initially.
DATA: wa_string(255) type c.
constants: con_tab TYPE x VALUE '09'.
*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
*START-OF-SELECTION
START-OF-SELECTION.
ld_file = p_infile.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
ELSE.
DO.
CLEAR: wa_string, wa_uploadtxt.
READ DATASET ld_file INTO wa_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
APPEND wa_upload TO it_record.
ENDIF.
ENDDO.
CLOSE DATASET ld_file.
ENDIF.
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD
Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop.
Reward points if it is usefull ..
Girish -
IPhoto gives import error "file not valid" when import more than one photo
Trying to import lots of photos.
Every time I try to import more than a few, I get an error that "The following files could not be imported (they may be an unrecognized file type of the files may not contain valid data)."
When I go back to importing just one at a time, it works fine every time.
I have tried rebuilding the iPhoto library as well.
I have tried also not copying into the iPhoto library and copying into the iPhoto library (using Preferences/Advanced/Importing).
Any help would be great.
This is painful doing one-by-one, and each one I bring in shows as a separate event...
Every once in a while I will get lucky and it will import more than 5, though I will still get the error before it imports all selected. Ugh!Unfortunately did not work.
And now a silly question - how do I get to be able to see my original iPhoto library? When I try to open it, I don't see any of the albums and mobileme galleries I had created anymore (though I can still see them on the web) -
IPhoto not responding when importing photos from Canon Powershot SD450
Recently I have been unable to import photos from my camera. I can see the thumbprints but when I try to import iPhoto hangs and has to be force quit? I am able to take the SD Card and insert it into an SD card reader, so there is no problem with the SD card.
The following message appears in the Console log:
10/28/08 1:56:53 PM iPhoto[61816] Error loading /Library/Contextual Menu Items/DocumentsToGoXCM.plugin/Contents/MacOS/DocumentsToGoXCM: dlopen(/Library/Contextual Menu Items/DocumentsToGoXCM.plugin/Contents/MacOS/DocumentsToGoXCM, 262): no suitable image found. Did find:
/Library/Contextual Menu Items/DocumentsToGoXCM.plugin/Contents/MacOS/DocumentsToGoXCM: unknown file type, first eight bytes: 0x4A 0x6F 0x79 0x21 0x70 0x65 0x66 0x66
Anyone know if this DocumentsToGoXCM.plugin is related to the DocumentsToGo program for Palm PDAs (which I have)? And why would it be involved with iPhoto?Patricia
Anyone know if this DocumentsToGoXCM.plugin is related to the DocumentsToGo program for Palm PDAs (which I have)?
Sure seems like it.
And why would it be involved with iPhoto?
May not be.
I am able to take the SD Card and insert it into an SD card reader, so there is no problem with the SD card.
Can you import from it there?
Regards
TD
Maybe you are looking for
-
How do I allow my users to set the option to save a new timezone for future sessions?
The option to save a newly selected timezone for future sessions has been greyed-out in the Calendar Client. How can I allow my users to choose this option? <P> This is controlled by the settimezone setting on the Calendar Server. By default, it is s
-
Sending Customer ,Dunning and Payment Advices through Mail
hi to all help me inthis issue for Customer,Dunning and Payment Advices i need to send it through mail to customers and vendors. for example when we run F.27 Transaction the customer statemnts should be mailed to customer directly thanks in advance k
-
I'm trying to update to CC (2014) and keep getting this message: "Installation Failed. Installation encountered an error. Please restart your system and try again. (15) I've done the restart, same problem. Help!
-
Hello, We refreshed using a copy of production our R3 QA box, so I reloaded the data for our BW QA box. Since it was a refresh our BWQ and BWP boxes should contain the same exact data (Which they do, I verified) The question i have Regards why i have
-
IPhone 4 bluetooth and Windows 7
I am trying to connect my iPhone 4 to my windows 7 laptop. Windows 7 is saying that it cannot find a device driver for the iPhone and the iPhone says that it is not connected to the laptop. Can anyone help?