• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic