Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 4th, 2006, 07:44 AM
nagysz nagysz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 46 nagysz User rank is Corporal (100 - 500 Reputation Level)nagysz User rank is Corporal (100 - 500 Reputation Level)nagysz User rank is Corporal (100 - 500 Reputation Level)nagysz User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 4 m 43 sec
Reputation Power: 4
Parsing in SQL

hi

is it possible to do something like i give a text argument to a stored procedure and it handles it like a command or such?

for example

Code:
CREATE PROCEDURE myproc (tablename CHAR(30))
AS
BEGIN

  SELECT * FROM tablename

END;


and there the tablename to be "understood"

Reply With Quote
  #3  
Old September 25th, 2006, 05:46 PM
simpsomboy simpsomboy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 2 simpsomboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 57 sec
Reputation Power: 0
just concactene it as :



Code:
CREATE PROCEDURE myproc (tablename CHAR(30))
AS
BEGIN

  'SELECT * FROM ' ||:tablename;

  PUT YOUR EXECUTION CODE HERE...

 SUSPEND;

END;




Quote:
Originally Posted by nagysz
hi

is it possible to do something like i give a text argument to a stored procedure and it handles it like a command or such?

for example

Code:
CREATE PROCEDURE myproc (tablename CHAR(30))
AS
BEGIN

  SELECT * FROM tablename

END;


and there the tablename to be "understood"

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Parsing in SQL


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT