Sponsored Content
Top Forums Shell Programming and Scripting calling mysql gurus : need help with my view Post 302350077 by hcclnoodles on Wednesday 2nd of September 2009 06:17:31 PM
Old 09-02-2009
calling mysql gurus : need help with my view

hi there

I have a view which is working fine, but i have been told that i need to make sure the resulting output excludes all rows with nic_status equal to the string "removed".

Does anybody know in which part of the code below i would place the conditional ...

Code:
WHERE nic_status != 'removed'

view code below

Code:
CREATE VIEW `view2` AS 
select 
`t2`.`serial` AS `serial`,
`t2`.`nic_name` AS `nic_name`,
`t2`.`nic_ip` AS `nic_ip`,
`t2`.`nic_duplex` AS `nic_duplex`,
`t2`.`nic_speed` AS `nic_speed`,
`t2`.`nic_status` AS `nic_status`,
`t2`.`datetimestamp` AS `datetimestamp` 
from `network` `t2` 
where (`t2`.`serial`,`t2`.`nic_name`,`t2`.`datetimestamp`) in
(select `network`.`serial` AS `serial`,`network`.`nic_name` AS `nic_name`,max(`network`.`datetimestamp`) AS `MAX(datetimestamp)` 
from `network` where ((`network`.`serial` = `t2`.`serial`) and (`network`.`nic_name` = `t2`.`nic_name`)) group by `network`.`serial`,`network`.`nic_name`) 
order by `t2`.`serial`,`t2`.`nic_name`;

any help on this would be great

Last edited by hcclnoodles; 09-02-2009 at 07:35 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Any RF unix gurus out there?

I am having a problem here. We are having several problems in regards to hung process's on unix (HPUX box), caused by my RF equipment (Mobile data capture units). these contact the host via a simply telnet session and locks the system? Is it a timeout problem as the timeout is disabled on the host. (5 Replies)
Discussion started by: Subrosa
5 Replies

2. Shell Programming and Scripting

Help with shell script - Unix Gurus calling

Unix Gurus, I have been breaking my head to get this done..seems simple.. I need to read a flat file and based on a key word in a line, i need to skip the previous 3 lines. eg : Line1 Line2 Line3 Line4 Line5 Line6 Error Line7 Line8 Line9 Error Line10 (4 Replies)
Discussion started by: ravred
4 Replies

3. Shell Programming and Scripting

SED GURUS - Help!

I wish to substituite a string on each line but ONLY if it appears within double-quotes: this_string="abc#def#geh" # Comment here I wish to change the "#" characters within the double quoted string to "_": this_string="abc_def_geh" # Comment here ... but as you see, the "comment" hash... (2 Replies)
Discussion started by: Simerian
2 Replies

4. Shell Programming and Scripting

Calling MYSQL Stored Procedure?

Hi, Can anyone help me with the correct syntax to call a MYSQL stored procedure from a shell script. I have tried the following, (no input params): /usr/bin/mysql -uadmin -ppassword call TL_CLENSEDATA(); resulting in error: /home/hosting/data/scripts/dbclense.sh: line 12: syntax error... (3 Replies)
Discussion started by: kshelluser
3 Replies

5. Shell Programming and Scripting

Hey Perl Gurus

Hey guys im trying to get this if statement to work and i dont know whats wrong. can anybody help? if($author=~/\A+\Z/i)&&(length($author!=0)) { print " $author validation correct" } elsif($author!=~/\A+\Z/i)&&(length($author=0)) { $author='BLANK'; } else { ... (1 Reply)
Discussion started by: neil1983
1 Replies

6. UNIX for Dummies Questions & Answers

Calling all the awk gurus out there.

Hi all, I just signed up to the forums, although, I have lurked on here for awhile. Anyways, my issue is I am trying to get awk to spit out something I can use without having to spend hours in excel hell haha. So, I used sed to replace the spaces with semicolons and redirected that to a file. ... (6 Replies)
Discussion started by: savigabi
6 Replies

7. Shell Programming and Scripting

Question to gurus about sed.

Hi Folks. I need change something into file and after all manipulation I need delete only last COMMA into this piece of code -> GROUP 1 ( '/oralog1/ORAPRD/log01a.dbf', '/oralog2/ORAPRD/log01b.dbf' ) SIZE 512M, GROUP 2 ( '/oralog1/ORAPRD/log02a.dbf', ... (12 Replies)
Discussion started by: beckss
12 Replies

8. Shell Programming and Scripting

Question to gurus with expect

Hi., I need to ask question for expect script. I have prompt like # and very long script (orachk). I added to expect script line set prompt "(%|#|\\\$) $" and insert into it also piece of code ---- expect { timeout { puts "Running..." exp_continue } ... (0 Replies)
Discussion started by: beckss
0 Replies

9. What is on Your Mind?

Moving from Desktop View to Mobile View

See attached video for a demo on how to move back and forth from the desktop view to the mobile view. Currently this only works for the home page, but I will work on some new PHP code in the future to make this work with the page we are currently on. Edit: The issue with making every page ... (2 Replies)
Discussion started by: Neo
2 Replies
VWRIGHT(1)						      General Commands Manual							VWRIGHT(1)

NAME
vwright - normalize a RADIANCE view, shift it to the right SYNOPSIS
vwright [ view options ] distance vwright [ view options ] name DESCRIPTION
In the first form, vwright shifts a RADIANCE view the specified distance to the right, putting out a complete set of view parameters in a single line on the standard output. This utility is most often used to compute a right-eyed view from a left-eye view for stereo imaging. If no options are specified on the command line, vwright reads a view from its standard input. The distance given is in world coordinate units. A negative value indicates a shift to the left rather than the right. The second form substitutes a name prefix in place of the shift distance, and produces constant assignments on the standard output suitable for passing directly to rcalc(1). For a given prefix N, the constant names are as follows: Nt: view type ('v'==1,'l'==2,'a'==3,'h'==4,'c'==5,'s'==6) Npx: view point x value Npy: view point y value Npz: view point z value Ndx: view direction x value (normalized) Ndy: view direction y value (normalized) Ndz: view direction z value (normalized) Nd: view focal distance Nux: view up vector x value (normalized) Nuy: view up vector y value (normalized) Nuz: view up vector z value (normalized) Nh: view horizontal size Nv: view vertical size Ns: view shift Nl: view lift No: view fore clipping distance Na: view aft clipping distance Nhx: derived horizontal image vector x value (normalized) Nhy: derived horizontal image vector y value (normalized) Nhz: derived horizontal image vector z value (normalized) Nhn: derived horizontal image vector multiplier Nvx: derived vertical image vector x value (normalized) Nvy: derived vertical image vector y value (normalized) Nvz: derived vertical image vector z value (normalized) Nvn: derived vertical image vector multiplier EXAMPLES
To start rpict(1) on a view .06 meters left of the view in the file "right.vf": rpict `vwright -.06 < right.vf` scene.oct > right.hdr & To move the rad(1) view named "left" 2.5 inches to the right and render from there: rad -v "right `rad -n -s -V -v left examp.rif | vwright 2.5`" examp.rif & To pass a view to rcalc for conversion to some other view: rcalc -n -e `vwright orig < orig.vf` -f viewmod.cal -o view.fmt > new.vf AUTHOR
Greg Ward SEE ALSO
pdfblur(1), rad(1), rcalc(1), rpict(1), rvu(1) RADIANCE
8/29/96 VWRIGHT(1)
All times are GMT -4. The time now is 04:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy