If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > SQL Query - Ingres

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-07-07, 10:44
renalsupport renalsupport is offline
Registered User
 
Join Date: Aug 2007
Posts: 2
SQL Query - Ingres

Hello,
I am trying to teach myself SQL to aid me in my new position. I am trying to write what I thought was a simple query to pull the last login of a specific user. I am using Ingres 2006 on RHAS4.
1) Can you have the script prompt for the user name?

2) If you can, what is the expression to initiate the search? (&1 is Oracle, what is it in Ingres?)

This little script will run properly when I substitute the '&1' with a known user name. But what I need is to have it ask me the user name when I run the script.

echo "SELECT name, dlastlogin, full_name FROM cyber.c25 WHERE name = ‘&1’; \p\g" | sql cbds_test

Any information would be greatly appreciated.
Brian
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On