•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 402,711 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,410 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 2177 | Replies: 2 | Solved
![]() |
•
•
Join Date: Feb 2005
Posts: 2
Reputation:
Rep Power: 0
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:
Rep Power: 0
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:
Rep Power: 0
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!
Best Wishes and Happy 2007
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- 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


Linear Mode