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.

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!

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