• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

updating tables using variables..

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again,
Just wondering if any of you guys know anything about passing a variable into an SQL statement....e.g...
INSERT INTO TEST Data ( 1, ""+variable , 'Thursday', 1, 5 )
Can anybody clarify whether this is even possible (in any shape or form)???
Thanks,
alan
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by liverpool alan:
Hi again,
Just wondering if any of you guys know anything about passing a variable into an SQL statement....e.g...
INSERT INTO TEST Data ( 1, ""+variable , 'Thursday', 1, 5 )
Can anybody clarify whether this is even possible (in any shape or form)???
Thanks,
alan


"insert into test values (1,'" + variable +"','Thursday',1,5)"
 
liverpool alan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanz for that......
Alan
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alan,
Not to get technical but your name does not appear to follow the guidelines required for names on JavaRanch. When you registered you agreed to use a first name and last name and not use an obviously ficticious name. I must ask you to re-register with your real name. Thanks.
------------------
Moderator of the JDBC Forum
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic