|
-
Dec 10th, 2003, 02:31 AM
#1
Thread Starter
Lively Member
Variable Table Names (remedied)
can anyone show me how to reference tables in an sql query with a variable?
eg SELECT * FROM varTable
i dont know the syntax ;p
thanx
Last edited by TeaSpoon; Dec 10th, 2003 at 03:39 AM.
----------------------------------------
ÖÖ two hungry cookie monsters
-
Dec 10th, 2003, 02:48 AM
#2
Re: Variable Table Names (a bit urgent :)
strSQL = "SELECT * FROM " & varTable & ";"
-
Dec 10th, 2003, 02:56 AM
#3
Thread Starter
Lively Member
i try :)
i tried ...
rsTemp.Open "DELETE * FROM "InputData";",
gconnMedAidBrowser, adOpenStatic, adLockOptimistic
but it no work 
is there another way?
----------------------------------------
ÖÖ two hungry cookie monsters
-
Dec 10th, 2003, 03:06 AM
#4
Re: i try :)
You wrote that wrong:
VB Code:
rsTemp.Open "DELETE * FROM " & InputData, gconnMedAidBrowser, adOpenStatic, adLockOptimistic
-
Dec 10th, 2003, 03:37 AM
#5
Thread Starter
Lively Member
mendhak u genius :)
i didnt see the SQL statement as one long string...
i was seeing it as being processed one word at a time....
thanks for the realization
btw : cute frog Ö
----------------------------------------
ÖÖ two hungry cookie monsters
-
Dec 10th, 2003, 04:10 AM
#6
*blushes* Thx
-
Dec 10th, 2003, 05:42 AM
#7
Hyperactive Member
Guys according to standard
DELETE * FROM tablename --- is not good
Rather use
DELETE FROM tablename
There are some rdbms where the 1st statement even does not run....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|