Join file column with column in another database
Hi all,
I am trying to do a join between a column in a file I've imported into the BI Server with a column from a Oracle database table in the BI server, but I only get the error:
*[NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: 37000 code: -3554 message: [Microsoft][ODBC Text Driver] Syntax error in ALTER TABLE statement.. [nQSError: 16015] SQL statement execution failed. (HY000)*
Joining columns between other files works but not when joining with another database table.The log seems OK, it executes the 2 SQL queries as it should but it cannot join the values in the BI Server memory (it seems). VARCHAR field, but I tried with several different types.
Any help appreciated.
There are many ways of doing this, you could potentially use a Dates table to help you out but the comparison between your Excel report and the Oracle table would be pretty straightforward with just 1 calculated column / just a true&false calc column
so you can filter it would be nice.
The dates table can help you so you can only get always the dates from the current month. You can read more about that in the following
Link
Hope this helps!
Similar Messages
-
How to copy one column BLOB value into another column of another database.
How to copy one column BLOB value into another column of another database.
BLOB value contains word document.
I thought of copy the BLOB value into a text file and then update the new column value by the same text in textfile. Will this work?
Is there any other better way to do this?You're welcome
BLOB fields contains binary data. I don't think you can do this
Also if I view the BLOB as text. Can I copy it and insert into the new database.
I think your options are as I said. Datapump or CTAS
Best Regards -
Query with Tables from another Database
Hi.
I have a problem with a Query that executes a stored procedure that inserts data in a Table from another DataBase. The problem is when I try to execute a Query with the data related of that table using the user parameters of SBO ('[%0]'....'[%3]'). I use the following parameters for reference to the Table:
"....FROM [-BDName-].[dbo].[-TableName-] T1..... "
Any suggestions? Thanks a lot....
(Suggestions in English or Spanish)None
-
Files associated with user's mailbox database and reverent directory path (exchange 2010)
Hi,
I want to know all the files and other associated types of log files with particular user's mailbox database in exchange 2010 & its reverent directory path . Please suggest
Aditya MedirattaHi,
If you want to view the database file path and associated log file path, you can use the following command.
Get-MailboxDatabase "Mailbox Database" | fl *path
Default path is C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database
Best regards,
Belinda Ma
TechNet Community Support -
Easiest way to use JSON to make a messaging app (with Parse, or another database)
I would like to make a messaging app that has photo upload capability and logons. How best to do this using JSON and a database, such as Parse or a more cost efficient database.
Thanks in advance!I would like to make a messaging app that has photo upload capability and logons. How best to do this using JSON and a database, such as Parse or a more cost efficient database.
Thanks in advance! -
How to join two tables with no similar columns
Hi all,
I have two tables as follows:
Table T1 have Attributes as follows:
GLCODE,
BRANCH,
ITEM_NUMBER,
DEMAND_DATE,
QUANTITY,
SOURCE
Table T2 have Attributes as follows:
FORECAST_DATE
Now in SQL if run the following stattement iam getting out put.
SELECT GLCODE,BRANCH,ITEM_NUMBER,DEMAND_DATE,QUANTITY, SOURCE,(SELECT DISTINCT FORECAST_DATE FROM T2) FROM T1
The above SQL Statement giving correct results for me.
The same SQL Statement how can we implement in mapping level?
Regards,
AvaJaap van,
>
You have to specify an outer join, but how do you do that if there is no join to begin with? I would do the following (which I didn't test yet):
add an extra column (say C_JOIN) to the T2-ingroup of the join operator and fill it with from a constant operator with say value 1. Then use T2.C_JOIN (+) = 1 as the join condition.
If every record in T2 is guaranteed to have the same value, instead of using a deduplicator, which will read all records, sort them and deduplicate them, you can use a filter with filter condition ROWNUM < 2, which only will read one record.
I am facing almost the same problem but not entirely thou and I was wondering if you have an idea how to even start.
Problem:
I got this table:SQL> desc ita.tpis32_job_status
Name Null? Type
JOBID NOT NULL NUMBER
T1_ID NUMBER
QID NUMBER
REQ_TYPE VARCHAR2(10)
SUBMIT_TIME DATE
OWNERID VARCHAR2(30)
DESCRIPTION VARCHAR2(150)
STARTTIME DATE
ENDTIME DATE
STATUS VARCHAR2(50)
ERROR_ID NUMBER
TABLE_NAME VARCHAR2(30)
SERVER_ID VARCHAR2(10)
DATABASE VARCHAR2(20)
PRIORITY NUMBER
NUM_LINES NUMBER
PROCESS_ID NUMBER
QUE_TIME NUMBER
STATUS_CODE NUMBER
ERROR_MSG VARCHAR2(500)
NUM_LINES_TS NUMBER
REMOTE_STATUS NUMBER
This the above table, i am looking for JOBID (a five digit number) like 25875.
What I want to do is add or append this five digit number to a string to find the corresponding table in dba_tables or all_tables. The only way I have try to do this is by writing PLSQL as you see from here:
Re: Use PLSQL to delete tables dynamically
When the select is writing properly, the result of the five digit number from JOBID and the string should look like the below result (job_(five digit_%).
My problem is there is no relationship between ALL_TABLES and the my own table (ita.tpis32_job_status). Any help will be appreciated.
TABLE_NAME
JOB_58871_OUTDATA
JOB_58868_TS
JOB_58868_OUTDATA
JOB_58867_TS
JOB_58867_CMDLBL_2
JOB_58867_OUTDATA
JOB_58866_TS -
Compare column to another column with a specific value?
What i need to do is compare a column that holds the SiteNames of holidays to another column with the DifficultyDescription of holidays.
I want to show that sites that are not included in boldANY*bold* holiday with an “easy” or “moderate” rating.
Some of my SiteNames have holidays with different difficulty ratings....
e.g Yellowstone National Park(SiteName) - H2 - Moderate(DifficultyDescrip)
Yellowstone National Park(SiteName - H3 - Strenuous(DifficultyDescrip)
In this example i would want Yellowstone not to be in the results of my query as one of its results is 'moderate'.
I want to show holidays that are not in boldANY*bold* holiday with 'easy' or 'moderate'
Here is my attempt so far...
select it220_holdet.holcode.holcode as holcode
it220_holdet.diffdetails.diffdescrip as diffdescrip
it220_sitedetails.sitename as sitename
from it220_holidaydetails it220_holidaydetails,
etc....
where it220_sitedetails.sitename != it220_diffdetails.diffdescrip = 'Easy' <<<< where the sitename is not equal to a difficulty description of 'Easy'
and it220_sitedetails.sitename != it220_diffdetails.diffdescrip = 'Moderate' <<<< where the sitename is not equal to a difficulty description of 'Moderate'
Is the logic of this correct? The error message i am getting is SQL command not properly ended.
Is this more of a syntax problem than logic. Any help would be great.
Thanks in advance!
Edited by: Jay on 19-Nov-2010 02:47
Edited by: Jay on 19-Nov-2010 02:47Hi,
Ok,
Problem is in this part of query
where "IT220_HOLIDAYDETAILS"."DIFFRATING"="IT220_DIFFDETAILS"."DIFFCODE"
and "IT220_HOLIDAYDETAILS"."HOLCODE"="IT220_LOOKUP_SITEHOLIDAY"."HOLCODE"
and "IT220_LOOKUP_SITEHOLIDAY"."SITECODE"="IT220_SITEDETAILS"."SITECODE"
and "IT220_SITEDETAILS"."SITENAME" = "IT220_DIFFDETAILS"."DIFFDESCRIP"
and "IT220_SITEDETAILS"."SITENAME" = "IT220_DIFFDETAILS"."DIFFDESCRIP"
Check are you joining correct columns.
And remove possibility that tables values are in different cases
SELECT "IT220_HOLIDAYDETAILS"."HOLCODE" AS "HOLCODE",
"IT220_HOLIDAYDETAILS"."COUNTRYVIS" AS "COUNTRYVIS",
"IT220_DIFFDETAILS"."DIFFDESCRIP" AS "DIFFDESCRIP",
"IT220_SITEDETAILS"."SITENAME" AS "SITENAME"
FROM "IT220_SITEDETAILS" "IT220_SITEDETAILS",
"IT220_LOOKUP_SITEHOLIDAY" "IT220_LOOKUP_SITEHOLIDAY",
"IT220_DIFFDETAILS" "IT220_DIFFDETAILS",
"IT220_HOLIDAYDETAILS" "IT220_HOLIDAYDETAILS"
WHERE UPPER("IT220_HOLIDAYDETAILS"."DIFFRATING") = UPPER("IT220_DIFFDETAILS"."DIFFCODE")
AND UPPER("IT220_HOLIDAYDETAILS"."HOLCODE") = UPPER("IT220_LOOKUP_SITEHOLIDAY"."HOLCODE")
AND UPPER("IT220_LOOKUP_SITEHOLIDAY"."SITECODE") = UPPER("IT220_SITEDETAILS"."SITECODE")
AND UPPER("IT220_SITEDETAILS"."SITENAME") = UPPER("IT220_DIFFDETAILS"."DIFFDESCRIP")
AND UPPER("IT220_DIFFDETAILS"."DIFFDESCRIP") NOT IN('EASY','MODERATE')Regards,
Jari -
Sharepoint document library file name column in content database?
Hi,
How to get a sharepoint document library file name column in content database?
Thanks
Poomani SankaranYou're not supposed to develop any solutions accessing the content database directly. It's not supported. Document Library Filename is stored in LeafName column, table: AllDocs.
2.2.6.1 AllDocs Table
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom. -
Master Detail Form with Report - Referring a column in another table
I have master detail form with a report option. The master table has a column that also references a look up table.
When the report is displayed the lookup column id is displayed. Rather I want to get the look-up value from a lookup table
and display in the report.
When I see the report region Query definition , it just has the columns to add/remove only from the master table.
Could you pls help me with this regard.
Eg :
Dept Table
dept_id
dept_name
location_id
Employee Table
employee_id
employee_name
dept_id
location
location_id_id
location_name
Master is Dept, Detail is dept and lookup table is location.Simply add the lookup table to the FROM clause and join its PK with the FK in the master table in your query. That's basic SQL, and you definitely must get a good grasp of SQL to do more than very basic work in APEX.
For a good example, please see http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/build_app.htm#BCEBJJGB
While you're at it, read and implement the tasks outlined in the 2 Day + Application Express Developer's Guide - http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/toc.htm. After that, read the "Oracle Application Express 3.0-- Building a Functional Application" OBE in http://www.oracle.com/technology/obe/apex/obe30/apexdev30.htm - great stuff.
Georger -
How to join two columns between two tables with different column names
Hi
How i can join 2 columns with different names between the 2 tables.
Can any one please give solution for this.
Thanks
ManuHi,
basic understanding of joins:
If you want to join 2 tables there should be matching column w.r.t. data and it's data type. You need not to have same column names in both the tables...
so, find those columns which has got same values.. -
How to extract files stored in 9ifs to 9i Database Table's BLOB Column
Dear All,
I am new for 9ifs. Now my client need to retrieve the files which is stored in 9i Database Table's BLOB Column. Actually the files are stored in 9ifs. Therefore we now want to write a Java program to retrieve the files from 9ifs to 9i Database Table's BLOB Column for my client.
The Java program will be loaded as Java Procedure to 9i Database. Then the Java Procedure can be triggerred by DML of 9i Database.
The Questions are:
1. Can I use CM SDK (9ifs) to retrieve files form 9ifs to 9i Database?
2. If the files are already stored in 9ifs, Can I use PL/SQL to copy the files from 9ifs to 9i Database?
3. As the Java Procedure will run frequently, Any problem on 9i Database Java Pool?
4. Any other advices to implement the above stituation depends on the Client must use the database link to retrieve our 9i Database data?
Thanks a lot!To Get MySql recordset in dreamweaver.
1. Dreamweaver
2. File>new>html>create>
3. File>save>untitle-1.php (make sure to use a php externsion)
4.Database Panel(Window>Database)
5.Click Application Tab
6.Click Plus sign.
7.click Recordset(query)
8.Name it anything
9.Define your connection
10.Go down to database items
11. Click Tables
12. Click the appropriate table
13. click test
14.click ok
To pull image from MySqlDataBase
1Place cursor on page where you want the image.
2 insert>Image
3Select Image Source box appears.
4Click select file form: Data Source(vs File System)
5 Your recordset will display
6 Select the record.
7 Click ok -
Plotting Time Stamp from Txt file in Column to another column
I want to know how to plot 2 columns that i am reading from a text file.
column 1 has a time stamp in HH:MMS, and column 5 has data in which i want to plot the time verus the data.The Scan from String function will do most of those conversions in a single step. Here are a couple of examples. You will still need to read the array of strings in and process in a loop.
Message Edited by DFGray on 03-19-2010 07:46 AM
This account is no longer active. Contact ShadesOfGray for current posts and information. -
How to insert and retreive zip files in to blob column in oracle database?
This is the code to retrieve
while (rs.next() ) {
Blob fileBlobContent = rs.getBlob(1);
String fileName = rs.getString(2);
String value = rs.getString(3);
long fileNum = new Long(value).longValue();
java.io.InputStream is =
((oracle.sql.BLOB) fileBlobContent).getBinaryStream();
FileOutputStream fos =
new FileOutputStream("c:\\temp\\"+fileName);
int c = -1;
while ((c = is.read()) != -1) {
fos.write(c);
This is the code to insert into the row aftre inserting empty blob
// step 3 - now put the contents of the file
int length = 0;
int buff_size = 1024;
//Writer out_clob = ((oracle.sql.CLOB)fileCobContent).getCharacterOutputStream();
OutputStream outstream = ((oracle.sql.BLOB) fileBlobContent).getBinaryOutputStream();
long chars_read = data.length();
byte[] buffer = new byte[buff_size];
while ((length+buff_size) < chars_read) {
outstream.write(buffer, length, buff_size);
length += buff_size;
//outstream.flush();
// write remaining data
int remaining = (int)(chars_read-length);
outstream.write(buffer, length, remaining);
// steps 4-5:
outstream.flush();
Any help is greatly appreciated. Thanks!String localStrFile = importFormFileArg.getFileName();
try
localStrFileExt = localStrFile .substring(localStrFile.indexOf(".") + 1);
localInputStream = importFormFileArg.getInputStream();
localBr = new BufferedReader(
new InputStreamReader( localInputStream));
/** Read line by line and count the tokens present */
while ((localStrReadLine = localBr.readLine()) != null)
localIntRecords++;
/* parse the file contents with the delimiter comma */
if ("xls".equalsIgnoreCase(localStrFileExt))
localIsMandatoryPresent = isMandatoryFieldsPresent(
localStrReadLine, ',');*/
System.out.println(localStrReadLine+" first \n\n\n ");
localStk = new StringTokenizer(
localStrReadLine, "\t");
StringTokenizer localStk1 = new StringTokenizer(
localStrReadLine, ",");
// here i am unable to getting the records pls any body helpme }
Edited by: mulamahi on Oct 26, 2007 12:32 AM -
Introduction
In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
EmailAddress Parameter
Comment
[email protected] 2012,2013,2014 NULL
In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
Workaround
Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
EmailAddress Parameter Comment
[email protected] 2012 NULL
[email protected] 2013 NULL
[email protected] 2014 NULL
In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
From
Expression:[ParameterName]
Operator :In
Value :[@ParameterName]
To
Expression:[ParameterName]
Operator :In
Value :Split(Parameters!ParameterName.Value,",")
In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
Applies to
Microsoft SQL Server 2005
Microsoft SQL Server 2008
Microsoft SQL Server 2008 R2
Microsoft SQL Server 2012
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.For every Auftrag, there are multiple Position entries.
Rest of the blocks don't seems to have any relation.
So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
Try out this snippet.
DATA lt_data TYPE TABLE OF string.
DATA lv_data TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = 'C:\temp\test.txt'
CHANGING
data_tab = lt_data
EXCEPTIONS
OTHERS = 19.
CHECK sy-subrc EQ 0.
TYPES:
BEGIN OF ty_str,
a1 TYPE string,
a2 TYPE string,
a3 TYPE string,
p1 TYPE string,
p2 TYPE string,
p3 TYPE string,
END OF ty_str.
DATA: lt_str TYPE TABLE OF ty_str,
ls_str TYPE ty_str,
lv_block TYPE string,
lv_flag TYPE boolean.
LOOP AT lt_data INTO lv_data.
CASE lv_data.
WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
lv_block = lv_data.
lv_flag = abap_false.
WHEN OTHERS.
lv_flag = abap_true.
ENDCASE.
CHECK lv_flag EQ abap_true.
CASE lv_block.
WHEN '[Auftrag]'.
SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
WHEN '[Position]'.
SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
APPEND ls_str TO lt_str.
ENDCASE.
ENDLOOP. -
How can I Move data from one column to another in my access table?
I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
I understand how to drop a column or add a column, how do I transfer data from one column to another.
Here is my trial code:
<cfquery name="qQueryChangeColumnName" datasource="#dsn#">
ALTER TABLE leaderboard
UPDATE leaderboard SET points2 = points3
</cfquery>
Unfortunately, I get the following error:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
How can I transfer my data with the alter table method?I looked up the Access SQL reference (which is probably a
good place to start when having issues with Access SQL), and
it suggests you probably need a WHERE clause in there.
I agree the documentation is a good place to start. But you should not need a WHERE clause here.
Too few parameters. Expected 1.
If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message..
Maybe you are looking for
-
Hi all, OS: OEL 6.3 64 bits DB: 11.2.0.3 Grid: 12.1 While installing Grid Control 12c, the following error appears to me: INFO: SaveInvWCCE JRE files in Scratch INFO: oracle.installer.mandatorySetup property is set to false, so skipping t
-
Keep getting this kernel panic every once in awhile its always at night when my mac pro is sleeping also it has a problem with waking on its own.. i have disconnected my externel HD thinking that may of been the problem seeing i had it connected all
-
Where are the iPad, iPhone backup files located on windows 2007?
Hi, I have 3 iPads and one for my daughter and have made a few errors with back ups so need to put order in the backup names on my computer, I need to delete the irrelevant ones. Where are they located? Even using search i cannot find anything? Thank
-
Hi, I have 5 Dashboards, I want whenever user select a perticular dashboard, user should be navigated to "Home" page on respective dashboard. Can we configure something like this? Regards, Jitendra
-
How to parse an equation?
Here's my problem: The user enters an equation into a TextField. The app reads the TextField and records the equation into a String. Say the user enters 3x + 5. Now, I need to convert the String into an algorithm that will be able to calculate the va