Helpful SQL Websites
Awhile back I found a great site that had a list of helpful hints of basic SQL commands and examples. I forgot it and wondered if anyone knows of some other helpful sites that have basic SQL code to use for examples
Hi Ryan,
Am not quite sure which site you really had in mind. But an alternative would be to try the publication sites such as Osborne and Oreilly, as they distribute the code discussed in their books. So you could pick up some appropriate book title to get the necessary sample free codes.
Could try : http://osborne.com/oracle/
Hope this does help.
Ranjith.
Similar Messages
-
很全的help.sql 安装Oracle的sqlplus帮助系统
在linux系统下的时候,我们可以通过man命令,获得系统里对某个命令的usage的解释。
在sqlplus里我们也可以通过help和?命令。
sqlplus的帮助主题对应的是数据库里的一张表(system.help)。
在$ORACLE_HOME/sqlplus/admin/help/目录下的helpus.sql包含了这个表的帮助主题
不过oracle自带的help和?的解释太少了
在网上找了很久终于找到一个很全的help.sql叻
下载文中附件,用system登录,因为这个是建立在system的schema里的help表里的。
直接执行脚本就可以了。比如我把这个sql保存到$ORACLE_HOME\sqlplus\admin\help里,
大家在这里可以看到有
helpbld.sql
helpdrop.sql
helpus.sql
hlpbld.sql
这四个文件,这就是oracle自带的help脚本。可以执行
helpbld.sql来安装oracle默认的help, 这里会提示你输入两个参数,看了这个源文件。
两个参数一个是当前路径,一个是helpus.sql, 还是用system来执行,执行完就安装了help,
就可以使用我上面的那些方式。这个是默认会安装的。
要安装我这个最新的help文件,只需要执行就可以了
SQL>conn system/systempwd;
SQL>@?/sqlplus/admin/help/helpbld.sql
输入 1 的值: F:\developer\oracle\product\10.2.0\db_1\sqlplus\admin\help
输入 2 的值: F:\developer\oracle\product\10.2.0\db_1\sqlplus\admin\help\help.sql
这里就会执行了,执行是有一些和默认的有冲突,可以忽略这些错误。
成功以后,我们执行一下
SQL> select count(*) from system.help ;
COUNT(*)
5085
呵呵呵一下多了好多条了哟
SQL> help create database;
引用:
CREATE DATABASE
Use this command to create a database, making it available for
general use, with the following options:
* to establish a maximum number of instances, data files, redo
log files groups, or redo log file members
* to specify names and sizes of data files and redo log files
* to choose a mode of use for the redo log
* to specify the national and database character sets
Warning: This command prepares a database for initial use and erases
any data currently in the specified files. Only use this command
when you understand its ramifications.
.......这里还要好多有关create table的帮助信息,我就不写了。
有了这个帮助系统,要查一个命令的详解,正是太方便叻。
help.sql文件【 下载 】 -
Need help-SQL with result format suppressing duplicate values
I am trying to write a SQL which would select data from the below tables(in reality i have many other tables also) but I wanted to know how do i get the data in the format given below.
The scenario is :-A training_plan can N no. of OBJECTIVES and EACH objective has N no.of activities
Insert into TEST_TRAINING_PLAN
(TPLAN_ID, TPLAN_NAME, TPLAN_DESC, T_PERSON_ID
Values
('111', 'test_name', 'test_name_desc', '****')
Objectives table:-
Insert into TEST_TRAINING_OBJECTIVE
(T_OBJECTIVE_ID, T_OBJECTIVE_NAME,T_owner)
Values
('10', 'objective1', '1862188559')
Objective and Training Plan relationship table where TPLAN_ID is the foreign key.
Insert into TEST_TP_OBJECTIVE
(TPLAN_TOBJ_ID, TPLAN_ID, T_OBJECTIVE_ID,
REQUIRED_CREDITS)
Values
('1', '111', '10',5)
Objective and Activity relationship table where T_OBJECTIVE_ID is the foreign key from the TEST_TRAINING_OBJECTIVE table.
Insert into TEST_TRAIN_OBJ_ACTIVITY
(TOBJ_TRAIN_ACTIVITY, T_OBJECTIVE_ID, ACTIVITY_ID, IS_REQUIRED, STATUS,
ACTIVITY_TYPE, ITEM_ORDER, IS_PREFERRED)
Values
('1000', '10', 'selfstudy event', SS1, NULL,
'Event', 0, 0);
Insert into TEST_TRAIN_OBJ_ACTIVITY
(TOBJ_TRAIN_ACTIVITY, T_OBJECTIVE_ID, ACTIVITY_ID, IS_REQUIRED, STATUS,
ACTIVITY_TYPE, ITEM_ORDER, IS_PREFERRED)
Values
('1001', '10', 'SQLcourse', 1, NULL,
'Course', 1, 0);
Insert into TEST_TRAIN_OBJ_ACTIVITY
(TOBJ_TRAIN_ACTIVITY, T_OBJECTIVE_ID, ACTIVITY_ID, IS_REQUIRED, STATUS,
ACTIVITY_TYPE, ITEM_ORDER, IS_PREFERRED)
Values
('1002', '10', 'testSQL', 1, NULL,
'test', 2, 0);
COMMIT;
firstname emplid Tplan name Number of activities/credits completed(for TP) Objective Name Number of required activities/Credits (for objective) Number of activities/credits completed(for objective) activity name activity completion status
U1 U1 TP1 5
OBJ1 4 3 C1 PASSED
C2 PASSED
C3 WAIVED
T1 ENROLLED
T2 ENROLLED
OBJ2 3 2
S1 ENROLLED
S2 PASSED
T3 WAIVED
U1 U1 TP2 C4 INPROGRESS
50 OBJ11 50 30 C11 PASSED
**The second row where we have another training_plan record and accordingly all objectivesand their objective.**similarly ,i need to display many Training_plan records in such tabular format.Please help with the SQL query to select and display data in the above format
If you want to suppress duplicate values in some of your results columns
I am using toad 9.1 using Oracle 10g version 2Hi,
You can use the BREAK command to suppress duplicate values.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12009.htm#SQPUG030
(scroll down for an example)
It's a 'SQL*Plus-ism', not sure if TOAD's capable to handle it.
Simple example:
HR%xe> break on department_name
HR%xe> select l.department_name
2 , e.last_name
3 , e.first_name
4 from departments l
5 , employees e
6 where e.department_id = l.department_id;
DEPARTMENT_NAME LAST_NAME FIRST_NAME
Executive King Steven
Kochhar Neena
De Haan Lex
IT Hunold Alexander
Ernst Bruce
Austin David
Pataballa Valli
Lorentz Diana
Finance Greenberg Nancy
Faviet Daniel
Chen John
Sciarra Ismael
Urman Jose Manuel
Popp Luis
Purchasing Raphaely Den
Khoo Alexander
Baida Shelli
Tobias Sigal
Himuro Guy
Colmenares Karen
Shipping Weiss Matthew
Fripp Adam
Kaufling Payam
Vollman Shanta
Mourgos Kevin
Nayer Julia
Mikkilineni Irene
Landry James
Public Relations Baer Hermann
Accounting Higgins Shelley
Gietz William
106 rijen zijn geselecteerd. -
Can someone tell me why my website, container made to 1024 width, has about 1/2 an inch missing from display that you have to sideways scroll to, on monitors set to 1024? How can I fix without redoing the whole website.
Thank you so much in advance!
MaggieHi Maggie,
Unfortunately we on the BrowserLab team don't have the bandwidth to help dig into and solve the HTML/CSS issues that our users find, but I hope others in the community can help you out. As a suggestion, you might try posting your question in the Dreamweaver forum ( http://forums.adobe.com/community/dreamweaver/dreamweaver_general ) or other forums here or elsewhere online as well. Also, if your page is public, post the URL so others can look at the code directly.
Best of luck,
Mark -
Newbie Needs Help With Website
I am new to Dreamweaver and am undertaking the task of building my church website. I have placed the images in tables on and centered. I have also set the table width to 60% so that it will display properly in different resolutions. However the links I have created on the left move over the images when the screen size is reduced. My question is what do I need to do with the links to keep them locked in place when the screen size is reduced.
Any help is greatly appreciated. Below is the code that is used for the links
The website that I am working at is: http://www.friedlandmoravian.org
<div id="apDiv2">
<div align="center">
<p>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','widt h','79','height','25','src','text1','quality','high','pluginspage','http://www.adobe.com/s hockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','bgcolor','#44352A','movie' ,'text1' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="79" height="25">
<param name="movie" value="text1.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#44352A" />
<embed src="text1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="79" height="25" bgcolor="#44352A"></embed>
</object>
</noscript>
</p>
<p>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','widt h','113','height','26','src','text2','quality','high','pluginspage','http://www.adobe.com/ shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','bgcolor','#44352A','movie ','text2' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="113" height="26">
<param name="movie" value="text2.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#44352A" />
<embed src="text2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="113" height="26" bgcolor="#44352A"></embed>
</object>
</noscript>
</p>
<p> </p>
<p>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','widt h','106','height','25','src','text3','quality','high','pluginspage','http://www.adobe.com/ shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','bgcolor','#44352A','movie ','text3' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="106" height="25">
<param name="movie" value="text3.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#44352A" />
<embed src="text3.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="106" height="25" bgcolor="#44352A"></embed>
</object>
</noscript>
</p>
<p> </p>
</div>
</div>I can't see any tables being used on the entry page.. all you are using is absolutely positioned divs. Not sure why you are using AP divs, are you?
Unless you understand how these work, you will be in a lot of bother, one of them being the exact problem you mention.... read this article before doing anything else:
http://apptools.com/examples/pagelayout101.php
That layout can be quite easily achieved by a beginner using a table layout - one for header, a nested table layout for the left and right columns and then another for the footer area.
Also a simple css layout would work, but you'd again need to understand css positioning.
The page took a heck of a long time to load and its because all you've used is images.... type your url into the box at this site and you'll see that the image sizes are just too big, causing the slow load times.
http://analyze.websiteoptimization.com/wso
Had a look at one of the inner pages (history) and again you are using an image for the text area - why would you do that...
Firstly, it would cause a speed issue and more importantly would cause you problems if you wanted the page spidered by the search engines... no text on a page and the SEs won't find you.
Sorry to say this, but I'd start over, but before you do, please read up on how to create a page (using either tables or css) that isn't as fragile as the one you have and that will be consistent across different browsers.
Here are some links to help you get started:
http://www.w3schools.com/
http://www.macromedia.com/devnet/mx/dreamweaver/css.html
http://www.macromedia.com/devnet/dreamweaver/articles/tableless_layout_dw8.html
http://www.macromedia.com/devnet/dreamweaver/articles/css_concepts.html
The last one on the list may suit you to start with, as it takes a FWs comp and shows you how to build the site in Dreamweaver.
http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt1.html
Hope some of this helps :-) -
I am creting a (DW CS5) website in the hindi language. Copy was provided as translated Word docs (in Mangal font) from customer which I have been copying/pasting into my DW pages. I have the encoding set to UTF-8, and the page previews fine/as it should, UNTIL I get it on the server which then shows only black question mark boxes. I have tried testing it on diferent servers, have also tried numerous encoding and charset combinations to no avail. (browser encoding shows UTF-8) I've tried with and without CSS. Other hindi websites view fine.
I am creating the files on an Intel Mac 10.6, test viewing in safari and firefox (boxes with question marks also show in Windows). After countless searches for a solution, I am at my wits end. Most help blogs merely say to encode as UTF-8, which I already have. Can ayone out there PLEASE help and tell me what I am missing/doing wrong? Below is a snippet showing headers and a few lines of sample text...
<!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" xml:lang="hi">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8">
<meta http-equiv="Content-Language" content="hi">
<title>test2</title>
<body>
<p>ड्रॉबार स्प्रिंग सम्भावित अधिक भार स्थितियों में प्रयोग किए जाने के लिए उत्कृष्ट हैं और इनमें ऐसी अंतर्निमित सुरक्षा विशेषता होती है जिसके अंतर्गत टूटने पर स्थिर भार उठाना जारी रहता है। ड्रॉबार स्प्रिंग मे, भार उन लम्बे स्टील लूपों के सिरों पर लगाया जाता है जो स्प्रिंग के मध्य से गुज़रते हैं और विपरीत सिरे में हुक में डाले गए होते हैं, इस प्रकार ये लदान पर स्प्रिंग को संपीडित करते हैं। ड्रॉबार स्प्रिंग के आम अनुप्रयोग का तब प्रयोग किया जाता है जब बरामदे के झूले को सहारा दिया जाता है।</p>
</body>
</html>G'day Hans-G,
When I copy the text from your online sample page and paste it into DW when in design view, then preview the result in a browser, the characters show as they do on your sample page.
I do have charset="utf-8" and it would seem (something I did not know until someone on this forum pointed this out) that escape characters are not required
This is the resulting code view
<p>चीनी एवं अन्ग्रेज़ी के बाद हिन्दी विश्व में सबसे ज़्यादा बोली जाने वाली भाषा है । भारत और विदेश में ६० करोड़ (६०० मिलियन) से अधिक लोग हिन्दी बोलते, पढ़ते और लिखते हैं । फ़िजी, मॉरिशस, गयाना, सूरीनाम और नेपाल की अधिकतर जनता हिन्दी बोलती है ।</p>
<p>भाषाविद हिन्दी एवं <a href="http://hansgd.de/urdu.htm">उर्दू</a> को एक ही भाषा समझते हैं । हिन्दी <a href="http://hansgd.de/devnagri.htm">देवनागरी</a> लिपि में लिखी जाती है और शब्दावली के स्तर पर अधिकांशत: <a href="http://hansgd.de/sanskrit.htm">संस्कृत</a> के शब्दों का प्रयोग करती है । उर्दू नस्तालिक़ में लिखी जाती है और शब्दावली के स्तर पर उस पर फारसी और अरबी भाषाओं का ज़्यादा असर है । व्याकरणिक रुप से उर्दू और हिन्दी में लगभग शत-प्रतिशत समानता है - सिर्फ़ कुछ खास क्षेत्रों में शब्दावली के स्त्रोत (जैसा कि उपर लिखा गया है) में अंतर होता है। कुछ खास ध्वनियाँ उर्दू में अरबी और फारसी से ली गयी हैं और इसी तरह फारसी और अरबी के कुछ खास व्याकरणिक संरचना भी प्रयोग की जाती है।</p>
Gramps
PS IdRatherBeInAustralia -
Please help: my website does not display properly in firefox
(note) everything works fine clientside
I'm totally new here but I really really need help debugging
my website. The problem is I have a flash file the loads an xml
file to display pictures. Basicallly a gallery. It works in IE but
not Firefox and I can't understand why.
here is the offending pages
3dart Page |
Print Page
as you can see they display fine in IE. try in mozilla
firefox and the server just hangs. here is the actionscript from
the .fla:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image
= xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
description
= xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
firstImage();
} else {
content = "file not loaded!";
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("freelance.xml");
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
next_btn.onRelease = function() {
nextImage();
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
stop();
if anyone would help me debug this I would really appreciate
this, I'm not good with code. I'll give you the source files to
look at if need be, i'm desperate! thanksCan you attach some [http://en.wikipedia.org/wiki/Screenshot screenshots] for comparison to show what you mean?
Use a compressed image type like PNG or JPG to save the screenshot and make sure that you do not exceed the maximum file size (1 MB). -
Hi, I need help with Dreamweaver CS4. I don't know HTML which
is why I am using this program. I am using the AP Div (Not the
Insert Div Tag) Icon at the top in the Standard Layout tab accessed
by the icon at the top of the panel in the classic layout mode.
Here is my problem. I am trying to make sure the text and
spacing is the same as much as possible from browser to browser.
The spacing between the lines (leading) is different. Sometimes the
text jumps out of the box or text lines get cut off and looks
jumbled. My pages are layed out with a bunch of AP divs so I can
place them wherever I want. For example I draw one AP div (which
has the square box in at the left top) and then another one below.
Even though they are not touching, the browser displays them
overlapping with the text clashing. Or sometimes text just runs
wild. I've tried to use tables but they are too limiting and I am
not being able to place them freely. Is that because browsers do
not recognize CSS? How do I get at least a decent consistency
between browsers? What am I doing wrong?As well as the links below - another way to learn (including
anyone else's bad habits) is to find a page you like, and then tell
your web browser to show you the code view for the page and/or do a
"Save As" and save the page to your computer to then copy &
paste code segments into your file (in IE click View at the top,
select Source from the options)
HTML and/or DW Tutorials, and other information links that I
have saved
http://validator.w3.org/
http://www.visibone.com/
http://www.w3schools.com/
http://www.hotscripts.com/
http://www.projectseven.com/
http://www.adobe.com/devnet/
http://www.scriptarchive.com/
http://www.htmldog.com/guides/
http://www.htmlcodetutorial.com/
http://alistapart.com/topics/code
http://www.how-to-build-websites.com/
http://css.maxdesign.com.au/floatutorial/
Download User Guide as PDF for easy search
http://www.adobe.com/support/documentation
http://www.ianr.unl.edu/internet/mailto.html
http://lynda.com/ Hours of videos.
(must pay)
http://apptools.com/examples/pagelayout101.php
http://www.thesitewizard.com/archive/css.shtml
http://www.projectseven.com/tutorials/index.htm
If not PDF (link above) an online guide to read
http://livedocs.adobe.com/en_US/Dreamweaver/9.0/
Customizing the layouts that come with CS3 (VIDEO)
http://www.adobe.com/designcenter/video_workshop/?id=vid0155
FormMail
http://www.bebosoft.com/products/formstogo/index.php
For those using MySQL - Installing PHP and MySQL on Windows
XP
http://www.webassist.com/professional/products/solutionrecipes.asp
Community MX lessons
http://www.communitymx.com/abstract.cfm?cid=3D074
http://www.adobe.com/cfusion/designcenter/search.cfm?product=Dreamweaver&go=Go -
Guys
Am sorry if i posted my following request in the wrong place.
I am doing a website as a part of my project. It is supposed to showcase my dissertation. I was wondering if some one could tell me how to replicate the apple table which displays "store, mac etc etc above".
Can some body post the table format or something !
thxI think hunter is just interested in how to do an image flip roll-over above an image map.
Here is the nuts and bolts:
http://www.htmlgoodies.com/tutorials/image_maps/article.php/3479771
But unless you are pretty handy with code you would be better off using a web creation tool such as Dreamweaver. With that you get some nifty easy to use tools where mere mortals can succeed in building what you are looking to do.
Hope this helps you.
Best of luck on your presentation. -
Hi,
I have two functions.But some codes are the same so I want to merge in one function.
My code is:
function get_column_name (p_table_name in varchar2) return varchar2 is
l_var varchar2(100) := null;
l_str varchar2(2000) := null;
i int := 1;
begin
for l_rec in (select COLUMN_NAME item_name,COLUMN_NAME display_name from all_tab_cols
where table_name = p_table_name
and column_name not in (select a.item_name
from item_t a
where a.table_name = p_table_name)
union all
(select item_name,display_name
from item_t
where table_name = p_table_name)
loop
if (instr(upper(l_rec.item_name), 'DATE') > 0) or (instr(upper(l_rec.item_name), 'TIME') > 0) then
l_var := 'to_char(' || l_rec.item_name || ', ''yyyymmdd hh24mmss'') '||l_rec.display_name;
elsif (l_rec.item_name != l_rec.display_name) then
l_var := l_rec.item_name||' '||l_rec.display_name;
else
l_var := l_rec.item_name;
end if;
if ( i = 1 ) then
l_str := l_var;
else
l_str := l_str || ',' || l_var;
end if;
i := i + 1;
end loop;
if (l_str is null) then l_str := '*';
end if;
return l_str;
end;
function get_column_name (p_table_name in varchar2,p_column_name_list in item_list) return varchar2 is
l_var varchar2(100) := null;
l_str varchar2(2000) := null;
i int := 1;
begin
for l_rec in (select COLUMN_NAME item_name,COLUMN_NAME display_name from all_tab_cols
where table_name = p_table_name
and column_name not in (select a.item_name
from cmn_lookup_item_t a
where a.table_name = p_table_name)
union all
(select item_name,display_name
from cmn_lookup_item_t
where table_name = p_table_name
and display_name in (select value from table(cast(p_column_name_list as item_list ))))
loop
if (instr(upper(l_rec.item_name), 'DATE') > 0) or (instr(upper(l_rec.item_name), 'TIME') > 0) then
l_var := 'to_char(' || l_rec.item_name || ', ''yyyymmdd hh24mmss'') '||l_rec.display_name;
if (l_rec.item_name != l_rec.display_name) then
l_var := l_rec.item_name||' '||l_rec.display_name;
else
l_var := l_rec.item_name;
end if;
if ( i = 1 ) then
l_str := l_var;
else
l_str := l_str || ',' || l_var;
end if;
i := i + 1;
end loop;
if (l_str is null) then l_str := '*';
end if;
return l_str;
end; The code start 'loop' is the same just different at 'l_rec' part.How can i merge it?
Thanks for your help!
JingSimple example:
SQL> create or replace type my_type is table of varchar2(20)
2 /
Type created.
SQL> create or replace package my_pkg
2 is
3 coll my_type := my_type('SALESMAN');
4 end;
5 /
Package created.
SQL> create or replace procedure my_prc
2 (
3 deptno number,
4 job_list my_type default null
5 )
6 is
7 begin
8 for v in (select ename from emp where deptno = my_prc.deptno
9 and (job in (select column_value from table(cast(job_list as my_type)))
10 or job_list is null)) loop
11 dbms_output.put_line(v.ename);
12 end loop;
13 end;
14 /
Procedure created.
SQL> exec my_prc(30);
ALLEN
WARD
MARTIN
BLAKE
TURNER
JAMES
PL/SQL procedure successfully completed.
SQL> exec my_prc(30,my_pkg.coll);
ALLEN
WARD
MARTIN
TURNER
PL/SQL procedure successfully completed.
SQL> select ename, job from emp where deptno = 30;
ENAME JOB
ALLEN SALESMAN
WARD SALESMAN
MARTIN SALESMAN
BLAKE MANAGER
TURNER SALESMAN
JAMES CLERK
6 rows selected.Rgds. -
Urgent Help - SQL Statement..
hai everybody,
i need ur help in writing a SQL statement..
i have 2 tables say
CATEGORY
cat_id cat_name
B001 IT
B002 Accounts
B003 Clerk
SUB CATEGORY
sub_cat_id sub_cat_name cat_id
S001 programming B001
S002 Admin B001,B002
S003 HR B001,B002,B003
i want to display one as liek ths
sub_cat_name cat_name
Programming IT
admin IT,Accounts
HR IT,Accounts,Clerk
how to write a qry for this..pl help..
thanx in advance
regards
koelThis is just a natural join between two tables.
The query can be like this:
select b.sub_cat_name, a.cat_name
from category a, sub_category b
where a.cat_id = b.cat_id
Pl. let me know whether this solves your problem. -
Please Help - SQL Report long column value required in a separate cell
Hi.
I need to create a SQL report with the structure like below:
Country State City Vertical Business Details (detail desc)
US MA Quincy Healthcare
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
US MA Braintree IT
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
This is a detail desc value that needs to displayed in a different cell.
I came through a solution where you can hide/display the long column value in a different cell. But my requirement is that it should be displayed when the page opens and user don;t want to click on a button to see the value. This is mainly for their presentations and printing. so its very annoying for them to click on so many buttons to see the detail desc value for every record. I am new to Java script, Please helpI'm not sure I understand your requirements--are you showing us 2 lines of data, 7 lines, or 9? Do you want the long detail description on the same row, or underneath it?
I'm going to go on the assumption that you're showing us two rows, and that the long descriptions in this example happen to be 3-4 lines long, and that you want the long descriptions underneath the details. In which case, I suggest using "named column" templates. They're a lot easier to use than they appear when you first look at them, so bear with me.
Under "Shared Components", select "Templates", and then click on the yellow Create> button. You're creating a report template, from scratch. On the final page of the wizard, select "Named Column (row template)" for the template type. This will create a rather generic (and useless) template, which you'll have to edit; I don't know why they chose to not send you straight into the editor. When you edit it, you'll see that the only field with a value in it is "Row Template 1", and it's set to:
<tr><td>#1#</td><td>#2#</td><td>#3#</td><td>#4#</td><td>#5#</td></tr>For meeting your requirements with basic functionality, change it to something along the lines of:
<tr><td>#COUNTRY#</td><td>#STATE#</td><td>#CITY#</td><td>#VERT#</td></tr>
<tr><td colspan="4">#DETAILS#</td></tr>Then you'll probably want to put something under Column Heading Template, like:
<tr><td>Country</td><td>State</td><td>City</td><td>Vertical Business</td></tr>
<tr><td colspan="4">Details</td></tr>Apply whatever CSS styles you want to it, of course.
Using the template is straightforward: if your report, chose the template, and make sure your SQL returns values using the column names you specified in your template. Otherwise, you'll see literal "#COUNTRY#" text in your report.
You can get fancy with these, of course, such as applying different styles to alternating rows, but I'll leave this as good enough to get you started (I hope).
-David -
HELP - SQL Server Express Install Problems
The SQL Server Express completed without error. However, when I tried to connect to the SQLEXPRESS instance I received one of those wonderful MS errors, "Specified file not found". WHAT FILE? (After all these years MS still can't figure out how
to give an error msg. that provides some hint of what's wrong.) Going on, I started the install console and selected the REPAIR option. (It didn't ask what the problem was, it just ran.) It did ask what instance needed repair. I told
it SQLSERVER. It proceeded to repairing it. My first hint that their repair function worked as well as their error handling was when I got the: That share name has already been used (or something like that) error (notice, MS didn't tell me what
share name, or what aspect of the db they were talking about). After pressing OK, the REPAIR function proceeded to run to completion. When I reviewed the REPAIR report I found that three db processes all had the same SHARE NAME ALREADY USED error.
Actually, I thought that it was no big deal. If this was a real REPAIR, it shouldn't matter that the name was already used because everything else should be the same. (I know I'm nigh eve about the
Intricacies of SQL server.) After repairing my installation, I brought up the SQL Server Management Console again. This time, it did not display SQLEXPRESS in the Connect field. I selected the drop down list arrow to see if it was
listed and the list was blank so I entered SQLEXPRESS in the connect field and clicked on the CONNECT button. I got a NETWORK PATH NOT FOUND error. So, before I really mess things up, I thought I should ask if anyone knows what I should do
next. (As an aside, I've pressed the MS Error Message HELP button numerous times abut various errors I've received over the years. Not only are MS error messages useless, their Help Page has never ONCE been able to provide any information
about the encountered error. MS should spend some time and develop some truly helpful error messages as "File not found" and unknown error code 837289 are absolutely useless and especially since their HELP PAGE is never able to provide any
information either. I do wonder how I can get Unknown Error codes from people who wrote the code that raises the error. Don't they document anything?)I did read the requirements and made sure I met them all. The install package I used was: SQLEXPRADV_x64_ENU.exe. You're correct. I'm not familiar with SQL Server.
I downloaded SQL Server Express and Visual Studio Express to learn and explore because I wanted to learn about the new technology.
After leaving my message, I did some more studying and playing with the system. I managed to figure out that I had to turn on the data base service before I could connect with it. I'm sorry, I don't understand how Microsoft could install a data
base system without turning on its services. Why would I want to install something and NOT use it? The default should be ON and the setup manager should provide a choice to set it to OFF on the configuration page.
My experience is rather dated. I had to retire due to a disability in 2005. I couldn't control my arms and hands. The doctor recently tried a medication again that I had had a severe negative reaction to. He first administered steroids
and started me on a small dose and titrated it up as I was able to handle it. Now I have some days where I have pretty good control — I can print a little but can't write well and other days where I can't print, write, or feed myself.
I have performed many functions. I have been an analyst, a programmer, a data base designer, and a college professor at three different colleges. I've done extensive work in process automation and have even automated the management functions
for a data base system that was used to schedule every aspect of all the aircraft, ranges, and weapons development processes on Eglin AFB. I also wrote major pieces of the code used by the system and trouble shot and corrected functions written by other
programmers. The system supported over 300 users a day on two bases. Unfortunately it was developed in Fortran on a VAX and with VB6 and MS Access using VBA, Queries, Tables and Forms on networked PCs.
I plan to do a lot of reading. I'll also be looking at the Microsoft sites for a sample DB and lessons to go with it. I am a little frustrated with how information is organized on the web. The other night I needed to find some information
about something from Microsoft. It took me almost two hours to ask my question in such a way that MS was able to provide what I wanted. I kept asking essentially the same thing, but I had to use the exact phrase MS used on the page. I know
MS is big and they support multiple generations of each product. They have an almost impossible task. I just have to find the various product entry pages.
Thanks for offering your help. -
HELP: SQL*LOADER AND Ref Column
Hallo,
I have already posted and I really need help and don't come further with this
I have the following problem. I have 2 tables which I created the following way:
CREATE TYPE gemark_schluessel_t AS OBJECT(
gemark_id NUMBER(8),
gemark_schl NUMBER(4),
gemark_name VARCHAR2(45)
CREATE TABLE gemark_schluessel_tab OF gemark_schluessel_t(
constraint pk_gemark PRIMARY KEY(gemark_id)
CREATE TYPE flurstueck_t AS OBJECT(
flst_id NUMBER(8),
flst_nr_zaehler NUMBER(4),
flst_nr_nenner NUMBER(4),
zusatz VARCHAR2(2),
flur_nr NUMBER(2),
gemark_schluessel REF gemark_schluessel_t,
flaeche SDO_GEOMETRY
CREATE TABLE flurstuecke_tab OF flurstueck_t(
constraint pk_flst PRIMARY KEY(flst_id),
constraint uq_flst UNIQUE(flst_nr_zaehler,flst_nr_nenner,zusatz,flur_nr),
flst_nr_zaehler NOT NULL,
flur_nr NOT NULL,
gemark_schluessel REFERENCES gemark_schluessel_tab
Now I have data in the gemark_schluessel_tab which looks like this (a sample):
1 101 Borna
2 102 Draisdorf
Now I wanna load data in my flurstuecke_tab with SQL*Loader and there I have problems with my ref column gemark_schluessel.
One data record looks like this in my file (it is without geometry)
1|97|7||1|1|
If I wanna load my data record, it does not work. The reference (the system generated OID) should be taken from gemark_schluessel_tab.
LOAD DATA
INFILE *
TRUNCATE
CONTINUEIF NEXT(1:1) = '#'
INTO TABLE FLURSTUECKE_TAB
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS (
flst_id,
flst_nr_zaehler,
flst_nr_nenner,
zusatz,
flur_nr,
gemark_schluessel REF(CONSTANT 'GEMARK_SCHLUESSEL_TAB',GEMARK_ID),
gemark_id FILLER
BEGINDATA
1|97|7||1|1|
Is there a error I made?
Thanks in advance
Tigmultiple duplicate threads:
to call an oracle procedure and sql loader in an unix script
Re: Can some one help he sql loader issue. -
hello
I had to reinstall I Web in my powerbook. So all my folders with my website disappeared.
I had a back up of my website folder and I want to import this folder in I Web application I've just reinstalled.
How can I do it ?
Thanks for your help
FGAll your iWeb work is saved in a file called "domain"
You may not have lost this file when you reinstalled iWeb.
By default it is located in your user/library/application support/iweb folder.
This is separate from the iWeb application folder.
Do a spotlight search for "domain"
You may find more than one. (the newly installed iWeb may have created a new one)
Navigate to each "domain" file you find and double click its icon to start iWeb.
You may find your work. iWeb by default opens the last edited domain file but if you've reinstalled iweb it may open a blank domain file. If that happens quit iWeb and look for another "domain" file (using a spotlight search) on your hard drive and double click its icon. Repeat this process until you've tried to open all the "domain" files you can find.
iWeb cannot edit published pages, only the data in the "domain" file.
Good luck, David Phelps http://web.mac.com/phelpssculpture/iWeb/
"I may receive some form of compensation, financial or otherwise, from my recommendation or link."
ibook & imac Mac OS X (10.4.9)
Maybe you are looking for
-
How to Correctly update Macbook Pro's video chip drivers
I am currently using Boot Camp with Windows 7 64 Bit on my MBP Early 2011. My question is how can you successfully update the video chip drivers when using windows 7? When I try to install drivers the AMD updater can not recognize my video card. But
-
FDF response issue with Acrobat Reader 9.4.2
Hello, The Adobe Reader 9.4.2 is causing issues with FDF response. Our web application serves PDF dynamically via custom IHttphandler. Our website enables users to fill pdf forms with data and then sends data by submitting it in XFDF format to some
-
Dear group, I have a user panel that contains three waveform graphs in which only one graph is visible to the user. All three graphs plot the contents of the same one dimensional array; although only one graph is being displayed all three graphs cont
-
Can't confirm family sharing invitation
My dad sent me a family sharing invitation, which I received without any problems. Once I click on "view invitation" I get redirected to family sharing settings and get asked to confirm that I'm using the correct iCloud account and to confirm the inv
-
Logic Studio quit unexpectedly
Every time I try to launch logic studio it quits unexpectedly while initializing core audio. I tried to repair permissions already. Anything I can do short of reinstalling?