Meaning of ?{1}

7 views
Skip to first unread message

Sidthakrey

unread,
May 18, 2017, 7:17:58 AM5/18/17
to Web Object Wizard Community PlanetJ
I have seen in SQL operation code like  

column_name= ?{1}

what is the meaning of this, what is 1 in here ,is it FD id or something else,

Thnaks,
Siddharth

Travis Torgerson

unread,
May 18, 2017, 7:25:21 AM5/18/17
to Web Object Wizard Community PlanetJ
The value inside the curly brackets { } (1 in the case of your example) is the Default value for that particular search parameter.  Using curly brackets allows you to set a default value outside the Field Descriptor.  So, in your example, the column_name field search parameter in the running operation will have the default value of 1 when the parameter renders.

Thanks,
WOW Support

Araya Faisal

unread,
May 18, 2017, 7:27:16 AM5/18/17
to web-obje...@googlegroups.com
This means the 1. Colomen of your select.




>>> Sidthakrey <siddhart...@gmail.com> Donnerstag, 18. Mai 2017 08:37 >>>
--
You received this message because you are subscribed to the Google
Groups "Web Object Wizard Community PlanetJ" group.
To post to this group, send email to web-obje...@googlegroups.com
To unsubscribe from this group, send email to
web-object-wiz...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/web-object-wizard?hl=en?hl=en
To add features to your CE software, visit PlanetJ at www.planetjavainc.com/products
---
You received this message because you are subscribed to the Google Groups "Web Object Wizard Community PlanetJ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-object-wiz...@googlegroups.com.
Visit this group at https://groups.google.com/group/web-object-wizard.
For more options, visit https://groups.google.com/d/optout.

Travis Torgerson

unread,
May 18, 2017, 7:42:17 AM5/18/17
to Web Object Wizard Community PlanetJ, Faisal...@kabe-farben.ch
Araya, I believe you are confusing the SQL like this:

SELECT * FROM SCHEMA.TABLE WHERE COLUMN_NAME = ?
UNION
SELECT * FROM SCHEMA.OTHERTABLE WHERE COLUMN_NAME = ??1

With SQL like this:

SELECT * FROM SCHEMA.TABLE 
WHERE COLUMN_NAME = ?{1}
AND COLUMN_NAME2 = ?{CURRENT_DATE}
AND COLUMN_NAME3 = ?{'SOME STRING VALUE'}

The top SQL with the union is actually using the value of the first parameter (WHERE COLUMN_NAME = ?) to fill in the bottom select from the UNION (WHERE COLUMN_NAME = ??1),  This is called a parameter parameter:
https://sites.google.com/a/planetjavainc.com/wow_builders_guide/home/17-parameters/17-6-table-parameters

The bottom SQL is using Default Parameter Values by using curly braces:

Thanks,
WOW Support
Reply all
Reply to author
Forward
0 new messages