SqlDbx Forum

SqlDbx

You are not logged in.

#1 2010-02-19 13:55:50

dsarte
Member

Comments in Script

is there anyway i can write comments in a DB2 script?

DB2 spufi allows you to write comments on sequel codes. Is there anything similar in SqlDbx?

Offline

#2 2010-02-19 16:52:43

sqldbxhelp
Administrator

Re: Comments in Script

I am not sure  I understand what you mean.
Can you provide example.

Offline

#3 2010-02-22 12:18:19

dsarte
Member

Re: Comments in Script

DB2 Spufi requires a double-dash, "--", on the first two positions of a statement line for it to be treated as a comment. An example is:

select *
-- from tableA
from tableB
with ur;

the statement that has the double-dash on the first two position will not be executed and will be ignored as a comment line.

SQLDbx, apparently does not have this feature. Or, does it?

Offline

#4 2010-02-22 13:50:05

sqldbxhelp
Administrator

Re: Comments in Script

I assume you are connecting to DB2 on z/OS
Before version 9 DB2 had issue with '--' style comments,
so tools like SPUFI were removing them before sending statement to server.
/* */ style comment does work.
For example following statement works ok:

select *
/* from tableA */
from tableB -- rest is a comment
with UR

Currently SqlDbx does not try to emulate SPUFI behavior

Offline

#5 2013-01-14 15:13:02

vasu
Member

Re: Comments in Script

Thank you. this helps me.. In my machine SQLDBX not recoginze '--' as comment inside SQL -
It's identifying /* .......  */

Example -

select * from A
--Fetch first 10 rows only
fetch first 20 rows only;

above sql returning all the rows in side A table

but if i use follwoing sql - its fetching only 20 rows..

select * from A
/* Fetch first 10 rows only  */
fetch first 20 rows only;

dont now the reason.. but its working...

Thanks
Vasu

Offline

Board footer

Powered by FluxBB