Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I need a clarification on this
Table which contains field name and field-values(tables which are already exists in mdb) are respectively
Tablename and Orders,...,Odrer Details
My script was follows as like this
LOAD * INLINE [
Tablename
Orders
Customers
Products
Categories
Divisions
Shippers
Shipments
Order Details
];
LET Vtablecount=FieldValueCount('Tablename');
For i=1 to $(Vtablecount)
Let Vtable=FieldValue('Tablename',i);
SQL SELECT *
FROM $(Vtable);
NEXT
Everything is fine here
But I was unable to load a single table name as Order Details dynamically due to it has space .
even though i was tying also this
SQL SELECT *
FROM [$(Vtable)];
Can anybody help me in this if knows.
Thanks in advance
Regards
Sattish.
Not sure this is correct
use [Order Details]
But we can't
Hi,
Use instead:
FROM '$(Vtable)';
Miguel
No use.
I'm assuming that "Order Details" is a valid database table name, since you have not specified otherwise.
If you use your SQL Query tool, can you select from "Order Details" with space? In postgres, for example you need the character "`" (grave tilde) when the name of the table or field has something else than azAZ (underscores, points, etc).
Make sure that your data source (your MDB) has the table stored with space and that you can do the query manually.
I have created a sample test in my laptop and works fine.
Moreover, make sure that the loop is populating the variables as you expect.
Miguel
Yes manually it was working fine.
But i want to retrieve the all the tables dynamically(which all are tables exists in MDB) irrespective of any space.
See below this is one more scenario for your reference.Creating QVD's through Binary load irrespective of any space.Here no issues it was working fine.
Binary d:\practice\workbook\bkp\qv_training.qvw;
SET Vbinqvdpath=D:\Others\Bin\;
Let Vbinumtab=NoOfTables();
FOR i=0 to $(Vbinumtab)
Let Vtable=TableName(i);
STORE [$(Vtable)] into $(Vbinqvdpath)[$(Vtable).qvd](qvd);
NEXT
Regards,
Sattish G
So I was right, the grave tilde works (see attached).
Miguel