Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Need help in select statetment Post 302673489 by Alone on Wednesday 18th of July 2012 03:15:52 AM
Old 07-18-2012
Need help in select statetment

Dear Expert,

I have an table name (SMS) in which two column are there one "Flag" other is "Message", If my flag column consist of status "1" then output should be "welcome", else" try again" ,. please correct my code.

Code:
DECLARE 
c PLS_INTEGER := dbms_sql.open_cursor; 
flag VARCHAR2(50); 
STATEMENT VARCHAR2(255); 
BEGIN 
SELECT SUBSTR(flag, 1,2) 
INTO flag 
FROM xxx.sms; 
IF flag = 1 THEN 
dbms_output.put_line('welcome');
ELSE
dbms_output.put_line('ty again');
END IF;
END ;

Thank you,
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Select ALL in VI Editor

Hi all, How can i select all and copy text in VI Editor. Rakesh Gupta (22 Replies)
Discussion started by: rakish
22 Replies

2. IP Networking

select vs poll

Hi, Off late I had been looking at the differences b/w select() & poll() system calls. The requirement is to reduce the overhead, processor power in waiting for the data. In the kind of connections under consideration there would be very frequent data arriving on the sockets, so poll() fares... (12 Replies)
Discussion started by: smanu
12 Replies

3. Shell Programming and Scripting

How to select Shell

We are using the line #!/usr/bin/ksh in the script, to run the script in ksh. If I have Bash shell and Ksh, how to select the shell to run the script during runtime? Thanks in advace Victor (2 Replies)
Discussion started by: mvictorvijayan
2 Replies

4. UNIX for Advanced & Expert Users

Doubt regarding Select()

Please provide the solution for the following scenario: 1) There are two process named as ProcessA and ProcessB 2) ProcessA has opend a named pipe in read mode.This has been made as blocking mode. 3) ProcessB opens this pipe and writes in Blocking mode.So wat happens is even if Process A goes... (2 Replies)
Discussion started by: sunil_ktg
2 Replies

5. Shell Programming and Scripting

select a column

I've a file like this: andrea andre@lol.com october antonio@lol.com marco 45247@pop.com kk@pop.com may pollo@lol.com mary mary@lol.com can I select only the column with email adress? can I utilise a filter with @ ? I want obtain this: ... (2 Replies)
Discussion started by: alfreale
2 Replies

6. Shell Programming and Scripting

Select everything before a pattern

Hi I have i doubt, actually i have to select everything before a word(pattern).For that i am using sed i am using the below line of code but it is not working i am getting a blank instead.. sed -n '/regexp/{g;1!p;};h' file1 Can anyone help? Thanks (15 Replies)
Discussion started by: usha rao
15 Replies

7. Programming

Problems with select

Is select only supposed to report state changes on an FD's, state, whether or not it had pending input available in the first place? I've got a situation where select() repeatedly reports no FD's ready for stdin when there's lots of data available. And if it only reports changes, how is this... (2 Replies)
Discussion started by: Corona688
2 Replies

8. Boot Loaders

Reboot and Select Proper Boot device or insert Boot media in select Boot device and press a key

Hello, I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error " reboot and select proper Boot device or insert Boot media in select Boot device and press a key " I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies

9. Programming

Socket and select

I have created two sockets and binded both. My requirement is that 2nd socket must send/ recv data only on expiration of timeval(tv). but the 1st socket must keep on send/recv the data without waiting for the 2nd socket completion...... I have posted my code below...... In this code the 2nd... (3 Replies)
Discussion started by: naresh046
3 Replies

10. UNIX for Beginners Questions & Answers

Select command

Hi I'm using the "select" command in the global_env.sh to log in to the application directory. This file is called in .bashrc profile. Sample code: Filename: global_env.sh set -o vi export severname=$(uname -n) printf '%s\n%30s\n%s\n' "***********************" "Welcome to $severname"... (6 Replies)
Discussion started by: cheers799
6 Replies
funindex(1)							SAORD Documentation						       funindex(1)

NAME
funindex - create an index for a column of a FITS binary table SYNOPSIS
funindex <switches> <iname> [oname] OPTIONS
NB: these options are not compatible with Funtools processing. Please use the defaults instead. -c # compress output using gzip" -a # ASCII output, ignore -c (default: FITS table)" -f # FITS table output (default: FITS table)" -l # long output, i.e. with key value(s) (default: long)" -s # short output, i.e. no key value(s) (default: long)" DESCRIPTION
The funindex script creates an index for the specified column (key) by running funtable -s (sort) and then saving the column value and the record number for each sorted row. This index will be used automatically by funtools filtering of that column, provided the index file's modification date is later than that of the data file. The first required argument is the name of the FITS binary table to index. Please note that text files cannot be indexed at this time. The second required argument is the column (key) name to index. While multiple keys can be specified in principle, the funtools index process- ing assume a single key and will not recognize files containing multiple keys. By default, the output index file name is [root]_[key].idx, where [root] is the root of the input file. Funtools looks for this specific file name when deciding whether to use an index for faster filtering. Therefore, the optional third argument (output file name) should not be used for funtools processing. For example, to create an index on column Y for a given FITS file, use: funindex foo.fits Y This will generate an index named foo_y.idx, which will be used by funtools for filters involving the Y column. SEE ALSO
See funtools(7) for a list of Funtools help pages version 1.4.2 January 2, 2008 funindex(1)
All times are GMT -4. The time now is 12:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy