DeveloperBarn Forums

Go Back   DeveloperBarn Forums > Databases > Microsoft SQL Server

Discuss "Dynamic Stored Procedure" in the Microsoft SQL Server forum.

Microsoft SQL Server - Microsoft SQL Server is a powerful database engine used for large enterprise applications. Learn how to setup, administer and use SQL Server here.


Closed Thread
 
LinkBack (1) Thread Tools Display Modes
  #11 (permalink)  
Old 03-25-2008, 12:56 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 397
Thanks: 12
Thanked 20 Times in 20 Posts
Rep Power: 1
jmurrayhead is on a distinguished road
Default

I figured it out I forgot to select that field from the view
__________________
jmurrayhead
Did I help you out? Make me popular by clicking the icon!

If you found a post helpful, please click the button in the lower right-hand corner of the post.

Powered by ASP.Net
Sponsored Links
  #12 (permalink)  
Old 03-25-2008, 12:56 PM
Lauramc's Avatar
SQL Lackey
 
Join Date: Mar 2008
Location: Far Far Away
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
Lauramc is an unknown quantity at this point
Default

I don't see application_delet. But I do see application_deleted. Are you getting this error when trying to execute the code or when trying to print it? If it is on execute, you might try printing it so you can see what the output is.

[EDIT] I am glad you got it figured out. Let's hope it's all good now! [/EDIT]
  #13 (permalink)  
Old 03-25-2008, 12:58 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 397
Thanks: 12
Thanked 20 Times in 20 Posts
Rep Power: 1
jmurrayhead is on a distinguished road
Default

Quote:
Originally Posted by Lauramc View Post
I don't see application_delet. But I do see application_deleted. Are you getting this error when trying to execute the code or when trying to print it? If it is on execute, you might try printing it so you can see what the output is.

[EDIT] I am glad you got it figured out. Let's hope it's all good now! [/EDIT]
Nope...now I have a syntax error near 'AND' lol..I'll just keep reviewing it...man I hate dynamic stored procedures...but in this case, it's necessary...
  #14 (permalink)  
Old 03-25-2008, 01:01 PM
Lauramc's Avatar
SQL Lackey
 
Join Date: Mar 2008
Location: Far Far Away
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
Lauramc is an unknown quantity at this point
Default

Sometimes you have to! I would make use of the print command to try and diagnose it... but if you run into trouble, just let us know.
  #15 (permalink)  
Old 03-25-2008, 10:16 PM
lewy's Avatar
Dark Sonic Master

 
Join Date: Mar 2008
Location: South TX
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
lewy is on a distinguished road
Default

You may want to post what your sp looks like as working so that others may benefit from the final solution.
  #16 (permalink)  
Old 03-25-2008, 10:17 PM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 397
Thanks: 12
Thanked 20 Times in 20 Posts
Rep Power: 1
jmurrayhead is on a distinguished road
Default

Quote:
Originally Posted by lewy View Post
You may want to post what your sp looks like as working so that others may benefit from the final solution.
It's not working yet, still some bugs I have to work out with similar errors as above.

BTW, don't tell me what to do in my own forum
  #17 (permalink)  
Old 03-26-2008, 11:19 AM
jmurrayhead's Avatar
Your Lord & Master

 
Join Date: Mar 2008
Location: Reston, VA, USA
Posts: 397
Thanks: 12
Thanked 20 Times in 20 Posts
Rep Power: 1
jmurrayhead is on a distinguished road
Default

I'm a total nit sometimes. The query wasn't working because I assigned the @sql variable as varchar(255) but the string was over 255 characters. Once I increased the amount of characters, the whole string was being read into the variable. Now it works
Closed Thread

  DeveloperBarn Forums > Databases > Microsoft SQL Server

Bookmarks

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissions on Tables, Stored Procedures, etc. theChris Microsoft SQL Server 2 03-24-2008 11:49 AM

LinkBacks (?)
LinkBack to this Thread: http://www.developerbarn.com/microsoft-sql-server/73-dynamic-stored-procedure.html
Posted By For Type Date
DeveloperBarn Forums - ASP Help, ASP.Net Help, PHP Help, SQL Help, Tutorials, Windows Help This thread Refback 04-26-2008 09:36 AM


Sponsored Links

ASP.NET Resource Index
a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer.

Free Web Directory
Including Chats and Forums Resources, Offer automatic, instant and free directory submissions.
URLZ Web Directory
URLZ Web Directory

Free Web Directory - Add Your Link
The Little Web Directory
Free Web Directory
Pegasus free web directory is a free directory organised by categories.


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


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
©2008 DeveloperBarn.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45