Restriction for table colum 'name'
Hi there,
I was trying to select from a table whose column name begins with a number.I get an error 'From keyword not found where expected'.
Oracle 10g version.
Table columns
1. annual_std_dev number
2. 24_hour_mean number
3. Year varchar2
select 24_hour_mean number from table1 where year = '2007'; Thanks
Becuase the number is at the beggining of the column name you have to use double quotes when using this column. And it had to be created using the double quotes
select "24_hour_mean" from table ...
Similar Messages
-
How to use simple types for table column names ?
Hi,
can any one tell how to to use simple types for table column names?
It is required in internationalizing of webdynpro applications.
Regards,
RajeshHi,
1: define required column names in <SimpleType>
2:use the following code to get those values
3:bind 'text' property of Column headers to context attributes
4:take a context attribute 'Value' as type of <SimpleType>
5:set these values to context attributes
IWDAttributeInfo objAttrInfo=wdContext.getNodeInfo().getAttribute(IPrivate<ViewName>View.IContextElement.VALUE);
ISimpleTypeModifiable simple=objAttrInfo.getModifiableSimpleType();
Map m=simple.getEnumerationTexts();
Collection c=m.values();
Iterator it=c.iterator();
if(it.hasNext())
wdContext.currentContextElement.set<att1>(it.next().toString);
if(it.hasNext())
wdContext.currentContextElement.set<att2>(it.next().toString);
if(it.hasNext())
wdContext.currentContextElement.set<att3>(it.next().toString);
Regards
LakshmiNarayana -
Restriction for table maintainence
Hello Gurus,
I am working on a SLO project, where i had merged 5 source systems to one system.
In few roles in source systems for table maintainence the authorization groups is maintained as '*' in production.
In source systems if they maintain * they would be able to display/change the data related to that system only.
But now in target system , if we maintain * in authorization group they are able to display/change the data related to all the 5 systems.
This need to restricted, Please provide some pointers on how this can be done.
This restriction should be in such a way that they should be able to change data related to the system they belong to .
Thanks,
Sanketh.>
Sanketh Teegala wrote:
> Thanks for the reply prashanth.
>
> But , suppose consider users are maintaining table T001B. ( they are maintaining it through parameter transactions).
> as it is a standard table it has been assigned to same authorization group in both source and target systems.
> In source system , user is able to view data related only that system.
> But in target system user is able to view other system data also.
>
> How can i restrict this data ?
>
> Thanks,
> Sanketh.
Hi Sanketh,
I hope you are progressing with your SLO task. Once you have finished this project, most things will be simple in comparison
Unfortunately your requirement is not a simple one
You could use line item auths (nasty to set up IMO). Have a search for info on auth object S_TABU_LIN
Alternatively you could introduce auth checks on key auth fields (e.g. BUKRS, WERKS etc) into the method that you use to display table data. This would likely require new transactions with validation code that is performed before data is displayed or limits what can be updated. Another messy approach would be to use parameter transactions that pass in an org unit into the table selection criteria. You would need one for each org unit so will likely not be practicable.
What I would say is that focus on what is legally required. If none of it is required by law then focus on getting the rest of your consolidation done first and then address this in partnership with your project development team. -
Remain case for table column name
Hello, i am a java developer. I had helped my company to develop a java application all the while and before this we are using ms sql server database. Recently, we want to migrate the database to oracle database. The problem is, in our application, we use the resultsetmetadata to retrieve all the table column name and respective data and store in hashtable, but in ms sql server the table column name is not all in uppercase. When our application try to get the data using hashtable.get("aColumnName"), it will fail because in oracle the column name is all in uppercase. There are more than 1000 jsp page and java code that used the same method to get data, so if i want to change all the code to uppercase, it will consume a lot of unproductive time, is there any way to solve this?
I assume that your code builds an SQL statement like "select * from ??? where table_name = '????';".
If this is correct just wrap the table_name in UPPER(table_name).
If my assumption is incorrect then please give more information.
James. -
Using string as colum name in query
here i am using " lc_remarks " for a colum name , it is changed according to previous conditions,
in below code it is used as a string , how can i use it as a column name
BEGIN
lc_remarks := ' left_date ';
Select student_id into ln_temp_student from std_temp_tut_ledger
where lc_remarks is null;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ln_temp_student := 0;
DBMS_OUTPUT.PUT_LINE( ' insert record here ' || f_name(i) );
When TOO_MANY_ROWS THEN
ln_temp_student := 2;
END;
i also triend this one
BEGIN
lc_remarks := ' where left_date is null';
Select student_id into ln_temp_student from std_temp_tut_ledger
lc_remarks;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ln_temp_student := 0;
DBMS_OUTPUT.PUT_LINE( ' insert record here ' || f_name(i) );
When TOO_MANY_ROWS THEN
ln_temp_student := 2;
END;
but looked like it does not processed " lc_remarks " in queryTaken from
http://www.databasejournal.com/features/oracle/article.php/2109681
To retrieve values from a dynamic statement (INTO clause).
declare
l_cnt varchar2(20);
begin
execute immediate 'select count(1) from emp'
into l_cnt;
dbms_output.put_line(l_cnt);
end; -
Alias for table and colum names?
Hi there,
is there a new to create a alias for table and colum names? If so, how can I do this?
Thanks,
AndreI'm not sure why you want them changed. The Oracle database by default is case insensitive, which in essence means it converts everything to upper case when a case is not specified (which can be done by wrapping it in quotes). Unfortunately, Java strings are case sensitive. This means that if you try searching resultsets for "TableName" when the database driver is returning "TABLENAME", you will run into problems. It is probably better to have your project match your database as closely as possible to avoid any issues later on.
That said, I don't know of a way to automatically have the workbench use mixed case names - it uses the strings as they are returned from the database. I believe you will need to manually change the table names if you want them to be different than what you have imported.
Best Regards,
Chris -
How to use bind variable value for table name in select statement.
Hi everyone,
I am having tough time to use value of bind variable for table name in select statement. I tried &p37_table_name. ,
:p37_table_name or v('p37_table_name) but none worked.
Following is the sql for interactive report:
select * from v('p37_table_name') where key_loc = :P37_KEY_LOC and
to_char(inspection_dte,'mm/dd/yyyy') = :P37_INSP_DT AND :p37_column_name is not null ;
I am setting value of p37_table_name in previous page which is atm_state_day_insp.
Following is error msg:
"Query cannot be parsed, please check the syntax of your query. (ORA-00933: SQL command not properly ended) "
Any help would be higly appreciated.
RajInterestingly enough I always had the same impression that you had to use a function to do this but found out from someone else that all you need to do is change the radio button from Use Query-Specific Column Names and Validate Query to Use Generic Column Names (parse query at runtime only). Apex will substitute your bind variable for you at run-time (something you can't normally do in pl/sql without using dynamic sql)
-
Can substitution strings be used for table name references?
Hi,
I was wondering if it's possible to use substituion strings for table names in SQL queries. This would allow for me to edit all references to a table at one location. For instance, if a table name or dblink changed, I could edit the substitution string or application item to ensure all the queries reference the new table.
For example:
select * from &table1.
table1 would be the substitution string for the actual table name
I know this is possible if I used a pl/sql function returning a query, but I would much rather use a substition string in a SQL query.
Thanks in advance.
Briani think not
because how create the fields of * in this case
in the other because all is dynamic, i think that you obtain only an error -
Finding source database table/column name for a column in a view
Hi i need to be able to identify the original database table/column name for a column in a view.
e.g. say i have a view like this
create v1 as select a.name fname, b.name bname, c.name cname,......
from u1.names a, u2.names b. u3.names c
where .....
Now I want to find out that the database table/column name for the fname, bname and cname columns in the view v1, which in this instance is u1.name.name, u2.names.name, u3.names.name.
But i need to be able to do it for any view. Short of parsing the SQL is there an easy way of doing this?
Now obviusly I can't do this for virtual columns but I will know my column is not virtual as it has an index on it.But i need to be able to do it for any view. Short of
parsing the SQL is there an easy way of doing this?No, parsing the SQL is the only way. Good luck it is not something I would want to attempt. -
Email name restrictions for icloud
What are the name restrictions for creating a new name for an iCloud email account. Can one use some of the keyboard symbols like * # & % ! - $ __ ( ) or are you restricted to using the alphabet and numbers?
Hello Tuffy Wuffy,
This can be done by removing the iCloud account, then readding it.
On your iOS device’s Home screen, go to Settings > iCloud, then at the bottom of the screen, tap Delete Account.
iCloud: Change iCloud feature settings
http://support.apple.com/kb/PH2613
Cheers,
Allen -
How to pass parameter for table name in form6i.
Hi ,
I am facing the problem to pass parameter for table name in form6i.
If any solution please infirm me earliest to my mail id.
([email protected])
example:
begin
select ename into :ename
from :tab_name
where empno =7788;
end;
It gives error as bad bind variable 'tab_name'
*** where :ename and :tab_name are form fields
Thanking you,
Balasahebobject name not taken as table --> what do u mean by
this?
Please be more clear..
Regards
PriyaI have two block. First block I am displaying all the table using user_objects table. Another block I want display, user which table selected, corresponding table all the records. -
"Table Name" in customizing SUS:"make field control settings for tables"?
Hi Gurus,
In the following customizing node, I can find the table name such as :
ORDER.DET.EDIT
+ ORDER.DET.VIEW+
+ ORDER.HISTORY.DETAIL+
+ ORDER.ITEM.EDITH+
+ ORDER.ITEM.EDITL+
+ ORDER.ITEM.EDITL.WO.OR+
+ ORDER.ITEM.EDITM+
+ ORDER.ITEM.EDITM.WO.OR+
+ ORDER.ITEM.EDITS+
+ ORDER.ITEM.EDITS.WO.OR+
+ ORDER.ITEM.VIEWH+
+ ORDER.ITEM.VIEWL+
+ ORDER.ITEM.VIEWL.WO.OR+
+ ORDER.ITEM.VIEWM+
+ ORDER.ITEM.VIEWM.WO.OR+
+ ORDER.ITEM.VIEWS+
+ ORDER.ITEM.VIEWS.WO.OR+
+ ORDER.LIST+
+ ORDER.SDLN.EDIT+
+ ORDER.SDLN.VIEW+
It's difficult to know the difference for these so-called "table name"...
"SAP implementaion --> supplier relationship management --> supplier self-service --> settings for user interface --> make field control settings for tables"+
What's actual meaning for these table names? Where can I find related document and actual corresponding transparent tables for these so-called talbes?
Thanks and best regards
JackHi Neelima,
Thanks a lot.
Checked the SAP note, but I could not find corresponding infomation about that, kindly please advise again.
Best regards
jack -
Table & Field Name for Plan Data in CO
Hi All,
Can anyone tell me the table & field name where we can get the planned data in Cost Center Accounting and Profit Center Accounting.
I checked out the COSP(which is Totals) and COEP tables for CCA but i could find the fields only for actual data and not planned data.
Same for PCA...i checked out the GLPCT & GLPCA tables but in vain.
Regards & Thanks
Piyush Kothari.Hi,
Thanks for the reply but COKL is only for Activity Type which contains Allocation Cost Elements.
I would like to have the Table & Field name for Plan data of Primary Cost Element.
Piyush -
Get Table fields name for an SAP table
hi,
i need to pass SAP table name as a parameter to the selection screen of a Report program.
This prog shud give me the table Fields name along with type and length.
Is there any standard SAP report program for the same or i have to write my own logic?
Please advise.
regards,
ags.Hi,
For your requirement you have to write own program in dynamic manner by using field symbol concept.
Use this FM DDIF_FIELDINFO_GET and get the field information of database table.
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = <master> u201C Table name
Tables
DFIES_TAB = <table_field> u201C here you will get field information of table
exceptions
not_found = 1
internal_error = 2
others = 3.
if sy-subrc <> 0.
message text-005 type 'E' .
endif.
Loop <table_field> assignigng <field>
*---here you have to collect the relevant information that you are going to display in your output.
Endloop.
Use any one of ALV or OOALV and display your records.
Regards,
Peranandam -
Trandata error for table "/" table name ...
Hello all,
Now i found the new error, if i trandata table with table name "/" ex : /test04
i get this error:
GGSCI (riyasman-e00d10) 1> dblogin userid gg, password gg
Successfully logged into database.
GGSCI (riyasman-e00d10) 2> add trandata db.*
ERROR: No data found retrieving if to ignore object.
GGSCI (riyasman-e00d10) 3> info trandata db.*
ERROR: Failed to lookup object ID for table DB./db/test04.
GGSCI (riyasman-e00d10) 4> this error from OGG on oracle, if i trandata table OGG on db2 is success..!
GGSCI (riyasman-e00d10) 8> add trandata db.*
Logging of supplemental log data (include_longvar) is already enabled for table "DB"."/DB/TEST04"have you to clean this error..
thanks,
RiyasHi NK,
Yes, sign (") was an important, and you must create table on db2 and Oracle with quote ,
so yo can add trandata :-)
{code}
add trandata db.*
or
add trandata db."/DB/TEST04"
{code}
thanks,
Riyas
Maybe you are looking for
-
How do i choose a better graphics processor for my MacBook Pro when ordering it?
I am considering getting a non retina mac book pro online and read about customising it for better performance. It mentioned upgrading to a better graphics processor, but I see no options to upgrade in the checkout, only upgrades to the processor. Do
-
Itunes 10.6.3 installer " unexpectedly quit on PPC OSX 10.5.8 "
Hello I'm in a mess.I upgraded my Ipod Touch 4g to IOS 6 and now have to upgrade Itunes to Ver 10.6.3. The problem is that when I try to install it the installer quits a couple of seconds after clicking the install PKG. I've repaired permissions an
-
Unable to read attribute of type TABLE
Hello IDM Gurus, I was having some trouble reading data in the source tab from a temporary table created in a FROM AD Pass; specifically I am unable to read from an attrribute of type TABLE, which is being used for the memberOf attribute when reading
-
FS10N GL Balances not showing line item details
Hi Expert, i am unable to see the posted document in FS10N. i ve check the Button in FS00 Line Item display.. and save it. again i did but FS10N display line item not showing .. see the error message below. No items selected (see long text) Message
-
Check Stored Procedures after Migration from MS SQL Server 2008 to Oracle11
I successfully migrated my application database (azteca) from MS SQL Server 2008 to Oracle 11g R2. After migration, I found there are few stored procedures are not valid. How do I check these invalid stored procedures and find what is wrong with them