November 14, 2025 at 1:21 pm
I have a need where I need to pass a field name to a Stored Procedure then lookup information on it. Any insight would be greatly appreciated!
IE:
Declare @Field char(50)
Set @field = 'fpartno'
Select @field from m2mdata01..inmastx
November 14, 2025 at 4:50 pm
altough not a best practice, dynamic sql will be about the only way to help you out
ref: dos-and-donts-of-dynamic-sql
btw: Where is the where clause of your query ?
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply