473,803 Members | 3,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQl Syntax Check

FM
Hi there:

My question is about checking my sql-syntax against DB2UDB V9 throug
JDBC 2.0

Is there a way to check my syntax,for example "select * from T1"?

Thank you for your help.

Regards,
Felix
Mar 12 '08 #1
4 10746
FM wrote:
Hi there:

My question is about checking my sql-syntax against DB2UDB V9 throug
JDBC 2.0

Is there a way to check my syntax,for example "select * from T1"?
Can you define "checking"?
If you want an SQL Syntax checker within JDBC take a look at Data
Studio, especially pureQuery.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Mar 12 '08 #2
FM
On 12 Mrz., 16:49, Serge Rielau <srie...@ca.ibm .comwrote:
FM wrote:
Hi there:
My question is about checking my sql-syntax against DB2UDB V9 throug
JDBC 2.0
Is there a way to check my syntax,for example "select * from T1"?

Can you define "checking"?
If you want an SQL Syntax checker within JDBC take a look at Data
Studio, especially pureQuery.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Sorry that i was not clear enough.
What i mean is if i could check that my sql-syntax is correct and if
columns and tables i use are correct too.
Mar 12 '08 #3
www.mimer.com has anon-line SQL Validator that compares your code to
one of several SQL Standards. I use it to make sure my code in my
books in ANSI/ISO complaint. Does that help?

Mar 12 '08 #4
FM wrote:
On 12 Mrz., 16:49, Serge Rielau <srie...@ca.ibm .comwrote:
FM wrote:
Hi there:
My question is about checking my sql-syntax against DB2UDB V9
throug JDBC 2.0
Is there a way to check my syntax,for example "select * from T1"?
Can you define "checking"?
If you want an SQL Syntax checker within JDBC take a look at Data
Studio, especially pureQuery.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Sorry that i was not clear enough.
What i mean is if i could check that my sql-syntax is correct and if
columns and tables i use are correct too.
Sure - "prepare" the statement (there's probably something like a
prepareStatemen t() method in Java somewhere).

While it's possible to syntax check a statement prior to execution
(with whatever code you can get your hands on - e.g. Serge's pureQuery
suggestion, or Celko's mimer suggestion), checking whether the
referenced columns and tables are correct is only going to be possible
by actually preparing or executing the statement (preferably the
former).
Cheers,

Dave.
Mar 12 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2137
by: leegold2 | last post by:
Newbie question: In Perl I could do #perl -c myscript.pl and with that "-c" it won't run, but will just "compile" it, so I get all my syntax errors. Is there a similar thing in PHP? A way to catch my syntax errors before I actually run my program. Thanks, Lee G.
0
1929
by: kpohl | last post by:
Hi! It would be great if anyone could help me with this problem: I want to check the syntax of my php code. Therefore I use the command line function PHP -l, the structure is similar to the following code (example from the php Manual.) The Problem is: I read from the standard output with echo stream_get_contents($pipes); this function is available only from PHP version 5, but I must write for version 4.3.0. Which way could it be solved?...
5
2281
by: Detlef Jockheck | last post by:
Hi, I would like to check if a string contains a valid date format (Format: "dd.mm.yyyy") or not. What is the best way to do this. regexp? At the moment it would be sufficient to check for .. but a full date verification (Month in range 1-12 ...) would be very nice too.
6
25070
by: Jeff Duffy | last post by:
Hi all. I've been wondering why python itself doesn't provide a switch to check a file for valid syntax. I know that you can currently call python -c "import py_compile; py_compile.compile(r'MyApp.py')" but in order to manage this effectively you have to add a shell alias, write a script, mess about with your editor, or what have you. This becomes yet another small annoyance I'd like to get rid of. I'm also
0
1812
by: Thiko | last post by:
Hi According to the official mysql manual: http://www.mysql.com/doc/en/Charset-SHOW-CHARSET.html The syntax to show all available character sets is the SHOW CHARACTER SET command. It takes an optional LIKE clause that indicates which character set names to match.
8
10342
by: Clifford W. Racz | last post by:
Does anyone know of a decent tool, preferably free, that will check and validate DTD syntax, to make sure that my DTD is correct? The only tool that I have found thus far is the IBM visual DTD tool, which I do like, but is limited. Basically, your DTD is "good" when it parses... and I am not sure this is the best way to do it. As for validation of XML, I have found a great tool, xmlvalid, here: <...
2
3159
by: Krzysztof Bartosiewicz | last post by:
Hi! I have problems with editing my VBA code. It is connected with some kind of automatic-correction mechanism in Access which I cannot find. I turned off Automatic Syntax Check in Options menu and it still is the same. The problem is that when I try for example to write Edit1.Value = Date() Access changes it to Edit1.Value = Date
1
2009
by: dreamy | last post by:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sum( ) VALUES ()' at line 1 This is my code <?php //make conection $name=$_POST; $cloth=$_POST; $bag=$_POST;
2
2529
by: hannoudw | last post by:
Hi there I'm trying to do a function that check if the informations sent by the user when he wants to register are correct !! but i'm keep getting this error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@hotmail.com' at line 1 Could anyone help me please! i don't know whats' wrong with the code. This is the function user_functions.php <?php class...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.