View previous topic :: View next topic
|
Author |
Message |
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi All,
I have a doubt in the DECRIBE which is used in SQL.
I am using DESCRIBE TABLE with BOTH option and output is populating to the SQLDA.
I want to know what will be the value in SQLNAME field.Is it will be the column name and i saw a statement that if we use BOTH the occurence will be double.What will be in the second occurence.
Can anone give the example.
I searched in the manuals but i am not able to understand what will be value in each field.If someone gives me the example it will be great. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the exact syntax you are working with along with any diagnostic info or unexpected results. Once everyone is "on the same page", some suggestions may arrive. |
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi Dick,
Here is syntax which i am working.
Code: |
EXEC SQL
DESCRIBE TABLE :XYZ
INTO :SQLDA
USING BOTH
END-EXEC |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What happens when you execute this? Do you get a syntax error, an abend, some unexpected result?
In addition to that bit of source, you need to post anything else that relates to this task. |
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi Dick,
I am analyzing one program and i saw this code in that.I cant execute that program.But i want to know the result of this.I want infor like below.
If i have a table EMP and columns as below
EMPNO CHAR(5)
EMPNAME CHAR(15)
EMPPH CHAR(10)
What will be the data in SQLDA if DECRIBE TABLE with BOTH option is applied on this table? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
Hi Anuj,
I read the the doc which you provided.
My understanding is that if DESCRIBE executed on the above table i will get below result
SQL NAME SQLLEN
EMPNO 5
EMPNAME 7
EMPPH 5
Please conform that my understanding is correct or not |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I cant execute that program.But i want to know the result of this. |
Suggest you put this in some test code and run that. . . |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
or SPUFI............... |
|
Back to top |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
In SPUFI the describe is not working |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Do NOT post "it is not working". What have you provided for anyone to help. . .
If you won't post the problem, i suspect that no one can help. . . |
|
Back to top |
|
|
|