显示文本字段 [英] Display of text fields

查看:92
本文介绍了显示文本字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[抱歉可能的重复:我不能很好地处理......你的Majordomo的...... / :)
技术性...... - :)]


大家好!


[在Debian / Woody上使用PG 7.2.1,k。 2.2.22]


经过长时间的努力,我终于成功转移了旧的

* .dbf文件和相关的* .dbt(别名备注字段) )到一个pg表。

目前我把备忘录字段放在一个单独的表中,该表只有两个

字段(即:n_memo整数,备忘录文本),它可以与视图中的主表相关

.


现在,第一个问题是当我从这个表中选择*时它是

将向上滚动到最后,无论是\ x或\t还是\pset寻呼机是否设置了
! [有关信息:如果我将文本字段放在主要的

ex.dbf表中 - 其中包含更多列 - 或者从视图中选择

连接2个表页面控件工作正常]。


第二个问题:每个文本字段的显示如下:


#----- -----引用---------

- [记录1] ---------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ----------

col1 |使用艺术学生安排的解剖图

带分析笔记,由James M. Dunlop,ARCA绘制,

...... [cut]。 ...


[单个列表中的示例,但结果相同
$ cols表中的
]


#----------- unquote --------


我的问题是:


1.有没有办法避免显示''---------''行,除了

\ a flag?

2.如果我把备忘录放在主表中,是否有可能

控制备忘录文本字段的显示? [只有部分

记录有备忘录,而且引用col设置为''T'',所以我正在寻找

的选择性指令,例如as:if ctl_memo =''T''显示备忘录,

else,仅显示其他cols。

3.寻呼机在版本7.4.3上是否更好?


我意识到我正在使用的版本(7.2.1)与运行版8.0相比已经过时了,所以你的帮助将是特别感谢。

问候,

Ennio。

-

[Perche''usare Win $ ozz (dico io)se ...anche uno sciocco sa farlo。 \\?//

Fa''qualche cosa di cui non sei capace!" (diceva亨利米勒)](°|°)

[为什么要使用Win $ ozz(我说)如果......即使是傻瓜也能做到这一点。 )=(

做一些你不擅长的事情!(曾经说过Henry Miller)]


------- --------------------(广播结束)------------------------- -

提示6:您是否搜索了我们的列表档案?

http://archives.postgresql.org

解决方案

ozz(dico io)se .. 。anche uno sciocco sa farlo。\\?//

Fa''qualche cosa di cui non sei capace!(diceva Henry Miller)](°|°)

[为什么要使用Win


ozz(我说)如果......即使傻瓜也可以这样做。)=(

做一些你不擅长的事情!(曾经说过Henry Miller)]


----------------- ----------(广播结束)---------------------------

提示6:您是否搜索了我们的列表档案?

http://archives.postgresql.org


Ennio-Sr写道:

我的问题是:

1.有没有办法避免显示''---------''行,除了<那个国旗?


我不这么认为,不是那种布局。

2.如果我把备忘录放在主表中,是否可以
控制备忘录文本字段的显示? [只有部分
记录有备忘录,并且引用col设置为''T'',所以我正在寻找
选择性指令,例如:if ctl_memo =''T ''显示备忘录,
否则,仅显示其他cols]。


使用视图和CASE ... END表达式

3.寻呼机在版本7.4.3上工作得更好吗?




我不知道有任何变化。当你有一个占用太多空间的单个

文本字段时会出现问题吗?如果是这样,我会用子字符串构建我的视图



创建视图my_view AS

SELECT a,b ,c,substring(long_memo_field,1,80)

FROM ...


HTH

-

Richard Huxton

Archonet Ltd


---------------------- -----(播出结束)---------------------------

提示1:订阅和取消订阅命令转到 ma*******@postgresql.org


[Sorry for possible pluri-repeat: I''m not putting up very well with the
technicalities of ... your Majordomo ... -:)]

Hi all!

[Using PG 7.2.1 on Debian/Woody, k. 2.2.22]

After a very long struggle I finally succeded in transferring my old
*.dbf file and the relating *.dbt (alias memo fields) to a pg table.
For the time being I put the memo field in a separate table having two
fields only (i.e.: n_memo integer, memo text) which can be related to
the main table in a view.

Now, the first problem is that when I do a select * from this table it
will scroll up to the end, no matter whether \x or \t or \pset pager are
set or not! [For information: if I put the text fields in the main
ex.dbf table - which has more columns - or do a select from a view
connecting the 2 tables the page control works fine].

Second problem: the display of each text field looks like this:

# ---------- quote ---------
-[ RECORD 1 ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
col1 | Anatomical Diagrams for the use of the Art Students Arranged
with analytical Notes and drawn out by James M. Dunlop, A.R.C.A.,
...... [ cut ] ....

[Example taken from a single column table, but the result is the same
for the 2 cols table]

# ----------- unquote --------

My questions are then:

1. Is there a way to avoid displaying the ''---------'' lines, apart from
the \a flag ?
2. In case I put the memos in the main table, would it be possible to
control someway the display of memo-text fields? [Only some of the
records have a memo, and a referring col set to ''T'', so I''m looking
for a selective instruction, such as: if ctl_memo=''T'' display memo,
else, display the other cols only].
3. Does the pager work better on version 7.4.3?

I realize that the version (7.2.1) I''m working with is old as compared
to the running 8.0, so your help will be particularly appreciated.
Regards,
Ennio.
--
[Perche'' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo. \\?//
Fa'' qualche cosa di cui non sei capace!" (diceva Henry Miller) ] (°|°)
[Why to use Win$ozz (I say) if ... "even a fool can do that. )=(
Do something you aren''t good at!" (used to say Henry Miller) ]

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

解决方案

ozz (dico io) se ..."anche uno sciocco sa farlo. \\?//
Fa'' qualche cosa di cui non sei capace!" (diceva Henry Miller) ] (°|°)
[Why to use Win


ozz (I say) if ... "even a fool can do that. )=(
Do something you aren''t good at!" (used to say Henry Miller) ]

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Ennio-Sr wrote:

My questions are then:

1. Is there a way to avoid displaying the ''---------'' lines, apart from
the \a flag ?
I don''t think so, not in that layout.
2. In case I put the memos in the main table, would it be possible to
control someway the display of memo-text fields? [Only some of the
records have a memo, and a referring col set to ''T'', so I''m looking
for a selective instruction, such as: if ctl_memo=''T'' display memo,
else, display the other cols only].
Use a view along with a CASE...END expression
3. Does the pager work better on version 7.4.3?



I''m not aware of any changes. Is the problem when you have a single
text-field that takes up too much space? If so, I''d construct my view
with a substring:

CREATE VIEW my_view AS
SELECT a,b,c,substring(long_memo_field, 1, 80)
FROM ...

HTH
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org


这篇关于显示文本字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆