query查询请求的意思,为了在数据库中寻找某一特定文件、网站、记录或一系列记录,由搜索引擎或数据库送出的消息。
在SAP实施过程中经常会出现,对于用户的部分报表需求,标准报表无法实现,通过查询后台表就可以导出其想要的信息。
但是IT不会授予用户SE16N等后台表查看权限,此时可以创建Query以方便用户查阅。其优点在于无需开发,减轻开发量,且系统标准功能,较为稳定。
扩展资料:
query的查看和寻找:
query生成的ABAP程序是这样的:AQFLZHR00A======ZHR_DPA_0001_A通常后面那个ZHR_DPA_0001_A是query的名字。
可以通过SQ01查到,而且通常EGQ,EGP是查不到的,要到EGD查才能查到这个query。前面部分,前面4位通常是固定的,ZHR00A是用户组。query除了可以关联表,还可以关联逻辑数据库。
参考资料来源:百度百科-query
这是写法问题,意思根据sql语句通过query来查询某数据库的记录。当然也可以对数据库进行insert delete 等 *** 作。我写详细点吧。写法有很多,我写一个你容易理解的。
//执行查询语句
var
sql:string
begin
sql:='select * from tablename'
adoquery1.close
adoquery1.sql.clear
adoquery1.sql.add(sql)
adoquery1.open
end
//执行update类语句
var
sql:string
begin
sql:='update tablename set name = aaa'
adoquery1.close
adoquery1.sql.clear
adoquery1.sql.add(sql)
adoquery1.Execute
end
散分吧,呵呵。
您好。
DB_TABLENAME ---- 数据库表名
String数组 ---- 表中数据字段名
privacy=1 ---- 查询where语句
下面是官方说明文件:
public Cursor query (String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
Since: API Level 1
Query the given table, returning a Cursor over the result set.
Parameters
table The table name to compile the query against.
columns A list of which columns to return. Passing null will return all columns, which is discouraged to prevent reading data from storage that isn't going to be used.
selection A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given table.
selectionArgs You may include ?s in selection, which will be replaced by the values from selectionArgs, in order that they appear in the selection. The values will be bound as Strings.
groupBy A filter declaring how to group rows, formatted as an SQL GROUP BY clause (excluding the GROUP BY itself). Passing null will cause the rows to not be grouped.
having A filter declare which row groups to include in the cursor, if row grouping is being used, formatted as an SQL HAVING clause (excluding the HAVING itself). Passing null will cause all row groups to be included, and is required when row grouping is not being used.
orderBy How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered.
limit Limits the number of rows returned by the query, formatted as LIMIT clause. Passing null denotes no LIMIT clause.
Returns
A Cursor object, which is positioned before the first entry. Note that Cursors are not synchronized, see the documentation for more details.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)