|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Variables in query strings (that are stored in a db)
Hi all,
If I have a query string that is to be stored in a database, for example Code:
SELECT prod_id, prod_name, prod_desc FROM products WHERE prod_id = 'variable' how can I put a variable identifier into this string so that when I need to run the query I call it from the database and simply insert the relevant variable in the correct place. Is there an appropriate way of doing this in MS SQL Server? Thanks Tryst
__________________
Tryst |
|
#2
|
|||
|
|||
|
I don't understand your rationale for this. If you want to have parametric queries, use stored procedures.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Variables in query strings (that are stored in a db) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|