PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Formatting the result
  • Use in the HFSQL stored procedures
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SQLCode (Property)
In french: CodeSQL
..SQLCode is used to find out the SQL code of a query created with the query editor (".WDR" file). The comments entered in the query editor are visible in the SQL code.
Versions 17 and later
iPhone/iPad This property is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for the iPhone/iPad applications.
iPhone/iPad This property is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
// Assigns the SQL code of the query to a string
MySQLCode is string
MySQLCode = QRY_QueryCalculation..SQLCode
Syntax

Finding out the SQL code of a query Hide the details

<SQL Code> = <Query name>..SQLCode
<SQL Code>: Character string
SQL code of the specified query. If the ".WDR" file contains comments, these comments will be found in the SQL code of the query (the comments start with "--").
<Query name>: Character string (with or without quotes)
Logical name of the query used. This name was defined in the query editor.
Remarks

Formatting the result

The SQL code of the query is identical to the one displayed in the query editor via "SQL code" from the popup menu of the query: the space characters, the tabulations and the CR characters are kept.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUser code (UMC)

Use in the HFSQL stored procedures

..SQLCode can be used in the code of a stored procedure to find out the code of a stored query found on the server.
See also
Minimum version required
  • Version 12
This page is also available for…
Comments
Exemplo SqlCode
https://youtu.be/XtqStG3G3yA

http://windevdesenvolvimento.blogspot.com.br/2018/05/dicas-1771-publica-windev-23-sql-022.html

//--- exempla abaixo

TableDeleteAll(TABLE_CLIENTES)
_SQL is SQL Query =
[
SELECT
cliente.clienteid,cliente.nome
FROM
cliente
WHERE cliente.nome = {parametro_nome}
ORDER BY cliente.nome
]
IF EDT_NOME="" THEN
_SQL.parametro_nome=Null
ELSE
_SQL.parametro_nome=EDT_NOME
END
HExecuteQuery(_SQL)
FOR EACH _SQL
TableAddLine(TABLE_CLIENTES,_SQL.clienteid,_SQL.nome)
END

EDT_sql_code=_SQL..SQLCode
De matos
29 May 2018
Sql Code - Show Sql Code
//Sql Code - Show Sql Code
//Nessa aula de hoje, vou mostrar como mostrar o codigo da qry
//In this class today, I'll show you how to show the qry code

//Chamado a janela para mostrar codigo sql

EXTERN WIN_sql_codigo_usado
LoadWDL("utilitarios_matos.wdl")
//Chamado wdl utilitarios matos
//Called wdl utilities matos
Codigo_Sql is string=QRY_nota_fiscal_ler..SQLCode
//Estou colocando o codigo sql na variavel codigo_sql
//I am putting the sql code in the variable code_sql
Open(WIN_sql_codigo_usado,Codigo_Sql)
//Estou abrindo a janela, e passando parametro sql
//I am opening the window, and passing sql parameter

// Blog e Video com Exemplo

http://windevdesenvolvimento.blogspot.com.br/2017/03/aula-1101-sql-021-sql-sqlcode.html

https://www.youtube.com/watch?v=UBGxNb2pO60

De matos
24 Mar. 2017