03-25-2010
Hi
Thanks for your reply.When I am using this code in my application,Its giving 1830 error.
This is the query I am using:
SELECT to_char(trim(to_date(:sEventStartTime,'YYYYMMDD')- to_date(:sCurrentDateTime,'YYYYMMDD')))
INTO :sDatediff :idatediff_i
FROM dual;
where sDatediff is declared as string.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
this is the seventh problem i'm having with samba.
for some reason, i cannot logon to the domain.
i've created user accounts... and i was able to establish a connection between
the samba server (my PDC) and my workstations by logging in as "root."
however now when i try to logon it gives... (5 Replies)
Discussion started by: xyyz
5 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I am trying to compare two dates which are in variables and i am not getting the correct result as expected.
$first_date = '07/19/2007'
$second_date='07/20/2007'
Can you please suggest how to i check whether they are equal or not.
if ($first_date -eq $second_date) condition is not... (3 Replies)
Discussion started by: kotasateesh
3 Replies
3. Solaris
I am wriitng a shell script to compare a date in `date +%Y%m%d%H%M` to the output of `cat /var/adm/messages.0 | grep Temp |grep "CPU Fans" | cut -f1-4,19 -d' '` which looks like
Dec 2 11:30:57 79
Dec 2 11:37:58 79
Dec 2 11:44:58 79
Dec 2 11:50:59 79
Dec 2 11:58:00 79
Dec 2... (1 Reply)
Discussion started by: Hitesh Shah
1 Replies
4. Shell Programming and Scripting
Hi All,
I have thefollowing files in the directory inbox/sat
ras.sat.trn.20090103.001902.00004358
ras.sat.trn.20090612.001903.00005339
ras.sat.trn.20090723.001902.00004358
The above file contains the date of the file creation. We just need to write a ksh shell script to check the... (5 Replies)
Discussion started by: satheesh_color
5 Replies
5. Shell Programming and Scripting
Hi,
I have a file which has the date in the last line in the example pasted along with the rates of the countries.
-- I want to compare the date in the last line of the file mentioned in the example below with the system date from Monday to Friday.
-- If system date is equal to the date... (2 Replies)
Discussion started by: Raji_gadam
2 Replies
6. Shell Programming and Scripting
#!/bin/ksh
var="2009-08-31 12:39:05 UTC"
ddate=`echo $var|cut -d' ' -f1`
y1=`echo $ddate|cut -d'-' -f1`
m1=`echo $ddate|cut -d'-' -f2`
d1=`echo $ddate|cut -d'-' -f3`
filedate=$y1$m1$d1
currdate="20070814"
if ]; then
echo "$LINE -> $filedate LOWER THAN $currdate"
... (0 Replies)
Discussion started by: HemaV
0 Replies
7. Shell Programming and Scripting
Hi,
I am having difficulty to compare a string in a file against a date from a a table and print the latest date. Below are the values.
String in File : 2009-12-02 00:37:51
Value Table : 2010-01-10-02.00.49.294758
I have to compare both the values ( Ignore the Microsecond in the table... (5 Replies)
Discussion started by: sam_78_nyc
5 Replies
8. Shell Programming and Scripting
Hi All,
I want to generate quarter dates using awk or anything, by giving a dates as input
for example :
start_date=2010-01-01
end_date=2010-05-31
output should be:
start_date end_date qtr
2010-01-01 2010-03-31 1
2010-04-01 2010-05-31 2
Example 2:... (1 Reply)
Discussion started by: sol_nov
1 Replies
9. Shell Programming and Scripting
Hi All,
I would need your help to compare dates in my script.
Say if I have the dates in a file I need to comapre these dates with yesterday's date and the dates which are older than yesterday needs to be displayed.
Example:
03/22/2012
03/24/2012
03/20/2012
03/21/2012
03/12/2012... (1 Reply)
Discussion started by: pdreddy34
1 Replies
10. Shell Programming and Scripting
I have a script called " passwd_status " which gives the passwd-s status of my servers.
the script output is like below
password status for A:
abc ks 10/05/115 1 30 ps
password status for B:
abc ks 09/25/115 1 30 ps
password status for C:
abc ks 10/10/115 1 30 ps
Now , i want to... (1 Reply)
Discussion started by: charanarjun
1 Replies
LEARN ABOUT PHP
fbsql_query
FBSQL_QUERY(3) 1 FBSQL_QUERY(3)
fbsql_query - Send a FrontBase query
SYNOPSIS
resource fbsql_query (string $query, [resource $link_identifier], [int $batch_size])
DESCRIPTION
Sends a $query to the currently active database on the server.
If the query succeeds, you can call fbsql_num_rows(3) to find out how many rows were returned for a SELECT statement or
fbsql_affected_rows(3) to find out how many rows were affected by a DELETE, INSERT, REPLACE, or UPDATE statement.
PARAMETERS
o $query
- The SQL query to be executed.
Note
The query string shall always end with a semicolon.
o $
link_identifier -A FrontBase link identifier returned by fbsql_connect(3) or fbsql_pconnect(3).If optional and not specified, the
function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if
fbsql_connect(3) was called with no arguments.
o $batch_size
-
RETURN VALUES
fbsql_query(3) returns TRUE (non-zero) or FALSE to indicate whether or not the query succeeded. A return value of TRUE means that the query
was legal and could be executed by the server. It does not indicate anything about the number of rows affected or returned. It is perfectly
possible for a query to succeed but affect no rows or return no rows.
For SELECT statements, fbsql_query(3) returns a new result identifier that you can pass to fbsql_result(3).
fbsql_query(3) will also fail and return FALSE if you don't have permission to access the table(s) referenced by the query.
EXAMPLES
The following query is syntactically invalid, so fbsql_query(3) fails and returns FALSE:
Example #1
fbsql_query(3) example
<?php
$result = fbsql_query("SELECT * WHERE 1=1")
or die ("Invalid query");
?>
The following query is semantically invalid if my_col is not a column in the table my_tbl, so fbsql_query(3) fails and returns FALSE:
Example #2
fbsql_query(3) example
<?php
$result = fbsql_query ("SELECT my_col FROM my_tbl;")
or die ("Invalid query");
?>
SEE ALSO
fbsql_affected_rows(3), fbsql_db_query(3), fbsql_free_result(3), fbsql_result(3), fbsql_select_db(3), fbsql_connect(3).
PHP Documentation Group FBSQL_QUERY(3)