| | |
A Funky ASP/SQL "opportunity"
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Feb 2005
Posts: 2
Reputation:
Solved Threads: 0
Hello all -
I've got an interesting problem that I can't seem to solve, so any input on this would be greatly appreciated.
I have a group of web pages. I'm passing several variables back and forth between those pages successfully. One of the variables is called sntime. Essentially, it's a store number. So if it's store 1, I see information out of a table where the store number is equal to 1. This works great. Now here's my question. I'm needing a query that will allow me to pull a recordset out of a dynamic table name. For example, say I have a different pricing table for three stores named pricing_1, pricing_2 and pricing_3 respectively. How can I write a query that will allow me to use the variable I'm passing in between the pages? Something like "Select * from pricing_" + sn +" where store_num= '" &sn& "'". If I use a static table name, the query's always work fine. Somthing like "Select * from table_1 where store_num= '" &sn& "'". Is this type of query possible? As previous stated, any input would be greatly appreciated.
I've got an interesting problem that I can't seem to solve, so any input on this would be greatly appreciated.
I have a group of web pages. I'm passing several variables back and forth between those pages successfully. One of the variables is called sntime. Essentially, it's a store number. So if it's store 1, I see information out of a table where the store number is equal to 1. This works great. Now here's my question. I'm needing a query that will allow me to pull a recordset out of a dynamic table name. For example, say I have a different pricing table for three stores named pricing_1, pricing_2 and pricing_3 respectively. How can I write a query that will allow me to use the variable I'm passing in between the pages? Something like "Select * from pricing_" + sn +" where store_num= '" &sn& "'". If I use a static table name, the query's always work fine. Somthing like "Select * from table_1 where store_num= '" &sn& "'". Is this type of query possible? As previous stated, any input would be greatly appreciated.
•
•
Join Date: Feb 2005
Posts: 2
Reputation:
Solved Threads: 0
All -
I have resolved my own issue. Here's the query I used to achieve my desired results:
"SELECT * FROM pricing_" + sn +" where sku='123456'"
I can dynamically call the serial code number (sku) via passing variables between pages. But the dynamic pricing structure really through me for a loop. Just wanted to let everyone know the problem had been resolved.
Best wishes to all and happy ASP coding!
I have resolved my own issue. Here's the query I used to achieve my desired results:
"SELECT * FROM pricing_" + sn +" where sku='123456'"
I can dynamically call the serial code number (sku) via passing variables between pages. But the dynamic pricing structure really through me for a loop. Just wanted to let everyone know the problem had been resolved.
Best wishes to all and happy ASP coding!
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
All -
I have resolved my own issue. Here's the query I used to achieve my desired results:
"SELECT * FROM pricing_" + sn +" where sku='123456'"
I can dynamically call the serial code number (sku) via passing variables between pages. But the dynamic pricing structure really through me for a loop. Just wanted to let everyone know the problem had been resolved.
Best wishes to all and happy ASP coding!
![]() |
Similar Threads
- Freelance Web designer PHP, MySQL, ASP, SQL Server 2000 (Web Development Job Offers)
- How to connect ASP with sql server ? (Community Introductions)
- google "keyword" question (Search Engine Optimization)
- ASP and SQL ? (MS SQL)
Other Threads in the ASP Forum
- Previous Thread: Problem with XIRR calculation with ASP and EXCEL
- Next Thread: Different templates for different pages
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection diagnostics dreamweaver excel fso iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit webserver windows7





