The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
using SELECT sql statement in shell script hcclnoodles Shell Programming and Scripting 4 06-18-2009 05:19 AM
::select statement return value with correct field size:: ryanW Shell Programming and Scripting 10 04-23-2009 03:38 AM
Oracle Select IN statement benefactr UNIX and Linux Applications 1 03-26-2009 04:15 PM
Want to use the output of Select statement in Unix script akhilgoel9 Windows & DOS: Issues & Discussions 4 05-27-2005 10:52 AM
Pipe SQL select statement results to script houtakker UNIX for Dummies Questions & Answers 6 10-31-2003 01:20 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-09-2009
rdhanek rdhanek is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 74
How can i assign an select statement into a variable?

I am trying to assign an select statement into a variable. Can someone hel me with this.


Code:
example :
a='select * from dual'
 
echo $a should give me select * from dual

But this is not working. I trying with \ before * and quotes too.
  #2 (permalink)  
Old 09-09-2009
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,342
Quote the variable:


Code:
a='select * from dual'
 
echo "$a"

Reply

Bookmarks

Tags
unix, variable storage

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0