How to insert data in a column with uniqueidefier data type
Guys,
I need insert data in a column with uniqueidefier data type, when i am trying to that getting error.
error message says: "Conversion failed when converting from a character string to uniqueidentifier."
I have data in table a col1,col2,col3,col4 - col3,col4 has datatype as varchar and i am updating table b columns col1,col2 with table a col3 and col4.
Please guide how to do it.
Hi,
Not any String can be convert to uniqueidentifier.
1. you have to make sure u use a value which is fir to be uniqueidentifier
2. Use convert or cast in the insert query in order to convert the string into uniqueidentifier
insert X ... convert(uniqueidentifier, 'string which fit to be convert to uniqueidentifier')
Please post DDL+DML for more specific help
DDL = Data Definition Language. In our case that is, CREATE TABLE statements for your tables and other definitions that are needed to understand your tables structure and there for let us to test and reproduce the problem in our server. Without DDL no one
can execute any query.
How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
DML = data manipulation language is a family of queries used for manipulating the data it self like: inserting, deleting and updating data. In our case we need some sample data in order to check the query and get result, so we need some indert query for
sample data.
If you post a "create query" for the tables and "insert query" with some sample, then we could help you without Assuming/Guessing. There is a reason that DDL is generally asked for and expected when discussing query problems - it helps
to identify issues, clarify terminology and prevent incorrect assumptions. Sample data also provides a common point of reference for the discussion. A script that can be used to illustrate or reproduce the issue you have, will encourage others to help.
[Personal Site] [Blog] [Facebook]
Similar Messages
-
How to Insert a User Defined Column with CheckBox In ADF Swings
I have create JTable by dragging a view object from Data Control Palette .But apart from columns listed in JTable i need to insert a User Defined column with Check Box selection option in each row .
Can any one help me out to sort the problem.
Regards
Bhanu Prakash
Message was edited by:
user579125I retrieve 10 column from Database and build JTable. But apart from 10 column displayed i need to display one more column( User Defined) at run time with the check box option for each row . Because on select of corresponding check box i need to do some mathematical calculation. add also How do i know whether check box is selected or not.
Regards
Bhanu Prakash -
How to display more than one column with for each
Hi guys,
how to display more than one column with for each like below?
for each
Item1
Item2
Item3
Item4
Item5
Item6
Item7
Item8
Item9
Item10
End for each
for each
Item1 Item2 Item3
Item4 Item5 Item6
Item7 Item8 Item9
Item10
End for eachTake a look at this to see if the solution provided would work for you: https://blogs.oracle.com/xmlpublisher/entry/multi_column_row_woes
Won't you have more than 10 records in your data file ? If you are going to have only 10 items then you may be able to use position() function to limit it to 3 each..
Take a look at this: https://blogs.oracle.com/xmlpublisher/entry/turning_rows_into_columns
Thanks,
Bipuser -
Hi All.
I have a control file which i need to add a column with header data value.
example
data file:
123456;201303
santiago;producto1;100
santiago;producto2;200
valparais;producto1;400
valparais;producto3;900
The control file skip the first column and load the three columns on the table, but, now i need to add other column with 201303 value constant of the first record and load it on the table.
Then
select * from table:
santiago producto1 100 201303
santiago producto2 200 201303
valparais producto1 400 201303
valparais producto3 900 201303
How i do this in the control file?
Regards!SCOTT@orcl_11gR2> host type test.dat
123456;201303
santiago;producto1;100
santiago;producto2;200
valparais;producto1;400
valparais;producto3;900
SCOTT@orcl_11gR2> host type test1.ctl
options (load=1)
load data
infile test.dat
replace
into table onecol_onerow
fields terminated by ';'
trailing nullcols
(filler1 filler, newcol)
SCOTT@orcl_11gR2> host type test2.ctl
options (skip=1)
load data
infile test.dat
append
into table test_tab
fields terminated by ';'
trailing nullcols
(col1, col2, col3,
newcol expression "(select newcol from onecol_onerow)")
SCOTT@orcl_11gR2> create table onecol_onerow
2 (newcol number)
3 /
Table created.
SCOTT@orcl_11gR2> create table test_tab
2 (col1 varchar2(15),
3 col2 varchar2(15),
4 col3 number,
5 newcol number)
6 /
Table created.
SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test1.ctl log=test1.log
SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:44 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
SCOTT@orcl_11gR2> select * from onecol_onerow
2 /
NEWCOL
201303
1 row selected.
SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test2.ctl log=test2.log
SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:45 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 4
SCOTT@orcl_11gR2> select * from test_tab
2 /
COL1 COL2 COL3 NEWCOL
santiago producto1 100 201303
santiago producto2 200 201303
valparais producto1 400 201303
valparais producto3 900 201303
4 rows selected. -
Not able to save date column with custom date format. in OBIEE 11g
Hi,
I have migrated one report from OBIEE 10g to 11g. There is a date column with customized date format(i.e. Default format is 'dd-MMM-yyyy' and I have used 'MMM-yyyy').
But when I use this custom format and try to save the report in 11g its giving this below error.
''Catalog object privilege validation failed for user to path /shared/ALM BI/Finacial Results/History Income Statement Detail.
You do not currently have sufficient privileges to save a report or dashboard page that contains HTML markup.
This HTML might be present in column headings, table headings, text views, narrative views, the print header,
or the print footer and must be removed before saving.''
Please let me know what changes I need to do for this.
Regards,
Ambika Nanda.Hi ,
privilage issues...check the security settings once..
Thanks,
Ananth -
I am having trouble getting a numbers spreadsheet to hold different formats in the same column. A column with a date formatted heading will not convert to $ for the cells below. Any suggestions would help.
Hi Wayne,
Thank you for this response. I have tried this but when I start enterring $ amounts some, such as $6.00, go in OK others such as $4.00 appear as a date ie 4 Oct 12.
Kind regards
Paul -
How do I create Equal Height Columns with my Background Images?
Hi there,
here is my page http://www.allthingsprintuk.co.uk/ATPHome.html
My problem is that the side bar HTML list is coming off the page in IE. & also the html in the header can look awful due to browser settings.
My question is how do I create Equal Height Columns with my Background Images so that they fit with the HTML text? Is there a good link you can point me to, or a tutorial?
The only way I can see by doing it is slicing my images up into 3 (top middle & bottom) & then setting the middle to repeat y????
Or does anyone know of a way to create rounded corners WITH drop shadows in CSS that will work on all browsers?
Thanks in advance
LouisaTry these http://www.pixelan.com/
-
How to i add an image path with spry data set
hi
how to i add an image path with spry data set. I made a xml file and then created a data set in html but image won't load
this is my XML
<?xml version="1.0" encoding="UTF-8"?>
<banner width = "185" height = "400">
<item>
<image scr = "nui-panforte-recipe_01.jpg" ></image>
<description>CHOC-COCONUT PANFORTE</description>
<text1>Try this delicious GLUTEN FREE Christmas treat</text1>
<text2>CHOC-COCONUT PANFORTE</text2>
</item>
</banner>
this is my HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="../../SpryAssets/xpath.js" type="text/javascript"></script>
<script src="../../SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var ds1 = new Spry.Data.XMLDataSet("recipe_banner.xml", "banner/item");
//-->
</script>
</head>
<body>
<div spry:region="ds1">
<table>
<tr spry:repeat="ds1">
<td>{image}</td>
<td>{description}</td>
<td>{text1}</td>
<td>{text2}</td>
<td>{text3}</td>
<td>{text4}</td>
<td>{link}</td>
<td>{url}</td>
<td>{target}</td>
</tr>
</table>
</div>
</body>
</html>It would be helpfull if you actually created an <img> tag to start with
<img src="{image/@src}" />
would work. -
Show all Columns with datatype = date
Is it possible to select all columns with datatype = date in the Repository.
We like to cast it like dd.mm.yyyy.
Regards,
StefanWouldn't it be easier to do it in the presentation services rather than the .rpd?
Update: anyways, if you wanna be nasty, use something like this:
CONCAT( CAST ( DAYOFMONTH("Siebel Data Warehouse"."Catalog"."dbo"."Dim_Incident (W_INCIDENT_D)"."CLOSED_DATE") AS VARCHAR ( 2 )), CONCAT('.', CONCAT( CAST ( EXTRACT( MONTH FROM "Siebel Data Warehouse"."Catalog"."dbo"."Dim_Incident (W_INCIDENT_D)"."CLOSED_DATE") AS VARCHAR ( 2 )), CONCAT('.', CAST ( EXTRACT( YEAR FROM "Siebel Data Warehouse"."Catalog"."dbo"."Dim_Incident (W_INCIDENT_D)"."CLOSED_DATE") AS VARCHAR ( 4 ))))))
Message was edited by:
ChrisBerg -
How to Insert record in IT0014 along with cost Assignment details - FM Pls.
Hi,
I want to insert record in info type 0014 along with Cost Assigment details.
I used FM - HR_INFOTYPE_OPERATION and RP_PLANT_DATA_UPDATE_TABLES.
It works fine, but if I go and check PA20 after execution of program, ICON (Cost Assignment details) is not showing up on screen PA20. But If I check cost assignment tables (ASSOB & ASSHR) the record is present.
Please let me know how to insert record in IT0014 along with Cost Assignment details.
Thanks in Advance,
KrishnaHi,
I want to insert record in info type 0014 along with Cost Assigment details.
I used FM - HR_INFOTYPE_OPERATION and RP_PLANT_DATA_UPDATE_TABLES.
It works fine, but if I go and check PA20 after execution of program, ICON (Cost Assignment details) is not showing up on screen PA20. But If I check cost assignment tables (ASSOB & ASSHR) the record is present.
Please let me know how to insert record in IT0014 along with Cost Assignment details.
Thanks in Advance,
Krishna -
Simple question: validate infocube data by comparing it with PSA data
Hi all,
I want to validate infocube data by comparing it with PSA data, for that i went through PSA via context menu. After that i generated export datasource. Then i am not able to find PSA Export datasource? where can i find that..
Thanks
rajuHi all,
I´ve tryied to VALIDATE INFOCUBE DATA BY COMPARING IT WITH PSA DATA making the step by step contained in the HOW TO ...
The problem is that I have the following error when i activate the transfer rules after aggregating the infoobjet 0TCTREQUID and don´t know how to resolve it:
" IDoc segment /BIC/CICA7ZBW_RECEP_DI could not be assigned to IDoc ZSCA002
Message no. RSAR240
Diagnosis
The transfer structure is assigned to IDoc ZSCA002 as an IDoc segment for the data transfer between source system and Business Information Warehouse.
This assignment failed.
System response
IDoc segment /BIC/CICA7ZBW_RECEP_DI not known to IDoc V2&. Therefore, no data import can take place from the source system for this InfoSource."
Any idea of what could have happend?
Thanks in advance,
Diego -
BAM Data Control - Group query with Active Data Service
Trying to get a group query from a BAM data control to work with Active Data Service in an ADF application (JDeveloper 11.1.1.4.0).
With a flat query, as the data changes, I can see DataChangeEvents fired, resulting in a data push to the client -
<BAMDataChangeEventFilter> <log>
#### DataChangeEvent #### on [DataControl name=CEP_Person_DOB_Flat, binding=data.view_mainPageDef.FlatDOB1.view_pageDefs_FlatDOBViewPageDef_WEB_INF_FlatDOB_xml_FlatDOB.QueryIterator]
Filter/Collection Id : 1966
Collection Level : 0
Event Id : 5
==== DataChangeEntry (#1)
ChangeType : INSERT_AFTER
KeyPath : [2157, 0]
InsertKeyPath : [null, 0]
AttributeNames : [id, _PersonKey, _County, _Surname, _AGE, _DOB, _Country, _FirstName]
AttributeValues : [2157, 10008/129, Vagzukarbsm, Gnnfzxxyqfgpsijcr, 110, Thu Dec 26 00:00:00 GMT 1901, Ekcqvrkoksr, Vwhm]
When I try a group query on the same data, currently just trying to group by _DOB for every 10 years to count the number of people, I get no data change events fired, so don't get any data pushed to the client, though the data has been changed if I refresh the page.
Any ideas ?can you include bam and jdev versions and also include exception from logs?
-
can anyone suggest me how to insert values to sharepoint list column of datatype (person/group datatype). Also, Does sharepoint list allows nulls as a value?
please help.
Thanks
RaghavendraHi Raghavendra,
Based on my test, if we directly insert a column with people account or group name with domain\user or domain\group formats to a SharePoint list, those columns with the values would be ignored when executing the package. Other columns with Null value would
be insert into the list. If we insert a column with numeric format, the values would change to corresponding user or group based on the site permissions in SharePoint site.
So to fix this issue, I suggest we can select <ignore> maps to the “People or Group” column in SharePoint list. The “People or Group” column would show null value in SharePoint list. Then we can manually or use workflow feature add values in the “People
or Group” column in SharePoint list.
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to add custom columns with BO data from GP to UWL
Hi
We have CE 7.1 in our project UWL taskitems only have GP workflow tasks.
In UWL we can see that by default there are standard columns but now we need to add custom columns with data from ours BO associated to process instance
For that we need to develop one custom connector for UWL where we can retrieve the values from custom conenctor to UWL.
Currently our NWDS 7.1 does not have plugins for UWL Connector can anybody tell me where can I download this plugins?
thanks in advance!
Regards
CristianHi,
plz refer the following link
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ee5047-c7a0-2a10-70b7-9557e3e4d440
Regards
Manohar -
How to create primary on a column when redundant data is present
I am interested to add primary key constraint on a column where repeated data is there without affecting the date how can I immplement this.
Can any one help me in this regard.
Thanks
SanjayIf you have duplicated data and going to specify the primary key constraint on that data it's quite against RDBMS concepts and can't be considered as a relevant idea. Nevertheless Oracle provides you with such tricky method, but once again, it's NOT good idea, change your mind:
SQL> create table t (x int);
Table created.
SQL> insert into t values(1);
1 row created.
SQL> insert into t values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t;
X
1
1
SQL> create index t_x on t(x);
Index created.
SQL> alter table t add primary key (x) novalidate;
Table altered.
SQL> insert into t values(1);
insert into t values(1)
ERROR at line 1:
ORA-00001: unique constraint (ORACLE_OCM.SYS_C006647) violated
SQL> insert into t values(2);
1 row created.
SQL> select * from t;
X
1
1
2In this case you have PK constraint and it affects all new DMLs, but
in fact you can't rely on PK.
Rgds.
Maybe you are looking for
-
IPhone 5S Call quality issues - Are they resolved?
Hi folks, So long story short, I was previously a VZW customer with an iPhone 5S. When I was a customer, everything worked great, except one thing, Calls. What would happen during is: 1) The calls would sound metallic/robotic 2) the calls would sort
-
Acrobat XI Pro wont install on Mavericks Mac
Hoping someone might be able to help. Downloaded Acrobat XI Pro trail Successful But will not install on Mac running Mavericks OS 10.9.2 Message returned at very end of install process during the running package scripts stage is "The Installation Fai
-
Mail Provider changed; Error in CC
Hi everybody, we changed our mail provider and do know habe ms exchange server. The account number in Outlook is XXXXX.YYYYY.de I tried to change the URL value in Mail sender adapter to smtp://XXXXX.YYYYY.de But the CC does not work. Any ideas? Thank
-
Hi gurus, How do we get evtcreation_date and evtcreation_time data into check function module or implementation of object type? I am using cdhdr and cdpos and able to write my own logic. Thanks in advance!!! Xevi G.
-
Google UK Search- Bizarre Behaviour - Help!
Up until yesterday I have been using Firefox 2.0.0.14 with Googlebar Toolbar installed on my Mac Pro running 10.4.11. When I have done a web search on a key word in the past I normally get a page of results and at the top of the page there is a butto