18种查询表的方法
SAP系统18种查询表的方法
18 T echniques for Locating the Underlying Data of a Screen Field Dennis BarrettDennis Barrett is an applications consultant with SAP America who focuses on Service Management/ Customer Service and the Picture this. An Operations Manager wants a special report of her service orders. She gives you a sketch of what she wants it to look like (columns, rows, headings, grouping, subtotals, totals, and the like), and points to fields on the Service Management transaction screens that have the data she wants you to show in the report.What do you do? Most likely, you would check to find any existing reports delivered with the system (or already written for this client) that provide the information the Operations Manager wants, or that can be copied and revised to fit her needs. If you don’t find any, you might then look into the appropriate reporting system — in this case, the Plant Maintenance Information System (PMIS) — to see if you can adapt it. In this case, however, you can’t find the report, and you can’t cobble one together from existing ones. You must write a report or an ABAP Query to fulfill the requirements.Now, suppose the Operations Manager asks if you can somehow add just one more little function to her Create Measurement Docu-ments transaction: paste the associated sales order number into the MDoc text field. This scenario requires you to create an enhance-ment. In both the first and second scenario, you’ll need access to specific data from the database tables. How do you find that data with just the screen fields as your guide? We all know the information associated with a transaction is stored in several (sometimes many) related tables. So, when you need several fields from a transaction for a report or an enhancement, you may need to find many of the transaction’s tables and establish the links among them. Those links are often not obvious.(complete bio appears on page 18)I’ve come across these very situations on numer-ous occasions while working for several clients with the SD, MM, IM, WM, and Service Management (now called Customer Service) modules. Over time I have gathered suggestions from colleagues and developed some techniques myself to find the data I needed. I will share these techniques — 18 of them in all — with you now.The Starting Gate and Finish Line I will be presenting a wide variety of techniques for reaching the “finish line” of this exercise — namely, locating the table and field that stores the underlying data of a screen field. You’re unlikely to need all of them; you’ll probably be successful within the first four techniques. I include the remaining techniques because some fields can be very hard to chase down, and any one of these other tools just might do the trick.The Starting PointThe starting point for this set of techniques is always the Technical Information screen, because it is here that you learn the screen field’s name, and can dis-cern whether or not the underlying data object is a structure, view, or table.If the underlying data object is a table, your search is over. The field name shown on the Technical Information screen, plus this table name,arm you with the details you need. If the data object is a view, just one more click and you’ve got that table name. If the data object is a structure, you still have to unearth the name of the table. Technique #1:Check the Technical Information ScreenI always start my search for the underlying data object by getting the names of the field and Data Dictionary object from the transaction screen. Call up the Technical Information screen by positioning your cursor in the target screen field and then press-ing F1 or clicking on the ? button. This will bring up the initial Help screen. From within the Help screen, press F9 or click on the Technical info button.Take a look now at Figure 1. It shows the Technical Information screen for the Sold-to party field in the Create Standard (Sales) Order screen for Release 4.0B. You see in the “Field data” block that the Table name is KUAGV and the Field name is KUNNR.1 In Releases 4.0B and below, this screen calls the associated object a “table,” whether it’s a table, view, or structure. Notice in Figure 2 that the 4.5B release (and above) informs you that KUAGV is actually a structure.1The examples herein mention names of tables, structures, and fields that I found in my searches. You may find a different name in the same search — particularly a different structure’s name. For example, the Sold-to party field in the Sales Order initial screen may beKUAGV-KUNNR or RV45S-KUNNR (or maybe something else).I’ll show one name in this article; don’t worry if you find another.It’s a reflection of the continual enhancement of R/3, not (I hope) anerror in the article.In Releases 4.0B and below, to ascertain whether or not an object is a structure you must take one more step. Drill into the Table name field in the Technical Information screen to see the Data Dictionary screen for the object.Figure 3 shows those screens for the table VBAK, the view VIVEDA, and the structure KUAGV. Corresponding screens in Releases 4.5 and 4.6 look very similar. As you can see, the object type is easy to recognize in these screens.If the underlying object is a table, you’re home free. The information is stored in that table in the field with the same name as the one shown on the Technical Information screen. Success! When you write your report or ABAP Query, or when you program your enhancement, you can refer to the data using these table and field names.If the object is a view, then scroll to the View field in the view with the same name as the one shown in the Technical Information screen. See Figure 4; the Table and Field name associated with the View field is your goal. Success again!Figure 3The Release 4.0B Data Dictionary Screens forTable “VBAK,” View “VIVEDA,” and Structure“KUAGV”StructureStructures are Data Dictionary objects that have fields but do not carry data. A structure is Figure 4Locating the “Table” and “Field name” Associated with the “View field”TableTables store data. If your screen field points to a table,or you are able to drill down toTables, Views, and StructuresViewViews used in screens are linked groups of tables. If the field is in a view, you can drill A screen field is associated with a table, view, or structure. While each of these is a Data Dictionary object, only the table actually stores data. This is why the goal of all these techniques is to find the table that actually stores the information that you can see displayed in the screen.Figure 5The Suggested Sequence of TechniquesIf the object is a structure, then you have more digging to do, and you must proceed to one or more of the remaining 17 techniques described here. These techiques follow an order that should get you to the finish line in the fewest number of steps. Remember, as soon as you find the associated table, you’re done with the search. Look at the flowchart in Figure 5 to see my suggested sequence of techniques. Racing Toward the Finish Line: Techniques 2-13Remember, the finish line, or goal, of this exerciseis to locate the table and field names in which the underlying data for a screen field is stored. At this point, we know only that the underlying data object is a structure. Techniques 2-13, which I detailin this section, will most likely hold the answer. If techniques 2-13 do not hold the answer, try tech-niques 14-18 — the measures of last resort! I suggest you hold off trying these last five tactics until you’ve exhausted the other possibilities. If none of these 18 techniques work, you have an unusually difficult problem; I wish you good luck. I hope you find your table quickly and easily.Technique #2: Text FieldsIf the screen label is “Short text”, or the field name is STTXT, or its data element is CO_STTXT, then you are looking for the source of a text field. As Figure 6shows, the Short text field often has a “Maintain long text” icon stuck at the end that may look like a sheet of paper with a pencil. Click on that icon to get to the Long text screen.Texts are stored all over the place in R/3, but frequently in tables STXH and STXL, which are the text header and text line, respectively. Their texts are stored in raw (i.e., non-ASCII) form, so you must use function modules to get them. There are several function modules for processing these texts, including Read_Text, which reads text lines from the database. In the Long text screen, follow GoTo→Header (see Figure 7) to get the Text name, Text ID, and Text object parameters that you’ll need to execute the function module.If the field is not a text field, then you must con-tinue to search.Technique #3: “INCLUDE” TableA structure may contain one or more INCLUDEs. An INCLUDE may actually be a table or another structure. So, if the structure you are working with includes an INCLUDE, and that INCLUDE is a table that contains your field, then you have won again. For example, in a Sales Order Item Overview, the Condition Type is listed as KOMV-KSCHL, but KOMV is a structure. KOMV does contain the INCLUDE KONV, which is a table that contains the field KSCHL. That table and field are your goal, andFigure 7Retrieving the Text Name, Text ID, and Text Object Parameterswe need not go any further. If the structure doesn’t contain an INCLUDE, or if the INCLUDE is not a table, then we must keep searching. The next tech-nique you should apply is described in technique 4 because it’s easy and, quite likely, will get youyour answer.Technique #4: Reports, Queries, Infostructures If you know of any ABAP Queries, already-existing reports, or Infostructures that use the field you need, then you can dig into them to find the source table. Before you started this search, you may have found a report or query that didn’t provide the result that the Operations Manager needs, but that uses the field you are looking for. Now that you have the field name from the Technical Information screen, you can review those reports and queries to see if the search has already been done for you. If you find your field in one of those reports or queries, you can examine the code and find the table that it uses to pull that field; you will have successfully concluded your search.If you don’t find your table and field here, then you must continue searching. Technique 5 is a powerful one for those who know how to use it, and can very often find the result.You may have found a report or querythat uses the field you are looking for.Now that you have the field name, youcan review those reports and queries tosee if the search has already been donefor you. If you find your field in one ofthose reports or queries, you canexamine the code and find the tablethat it uses to pull that field, whichsuccessfully concludes your search.Technique #5: Debug WatchpointIf you are searching in Release 4.0B or above, and want to go to the heavy artillery immediately, then get the Program name (under “Screen data”) from the Technical Information dialog box and debug the program. Go to Tools→ABAP Workbench→ABAP Editor→Program=[the program name]→Debugging. Click on the Watchpoint button on the task bar and enter the program and field names into the Local watchpoint fields, then click on Enter and F8. Any change in the variable triggers the watchpoint, presenting you with the code immedi-ately below the line that changed the variable. Read the code above the watchpoint carefully, and you can probably find the name of the Data Dictionary object that the field is in. Again, it may be a table, view, or structure, but you are getting very close.Ken Greenwood (author of Teach Yourself ABAP/4 in 21 Days) says he always jumps immedi-ately to this technique if the Technical Information screen doesn’t produce the table. Ken further sug-gests that this technique finds the table right away —with the only exception being the IMPORT statement. If the watchpoint doesn’t trigger, then debug again using a breakpoint on IMPORT and you will find it in a maximum of three steps.If you can’t find the table reference you need in the code, then you must continue your search, and the next natural technique for you to use is described in technique 6.Technique #6: Value TableIf debugging didn’t give you what you need or you don’t want to debug a program, then back out to the Technical Information dialog box and double-click on the Data element field under “Field data”. This will show you the value table, if there is one. If you’re just looking for master data like customer name — whose field name is KUNNR — then a value table will probably be defined, and it will give you what you want. You’ll find that transactiondata like Order Quantity — whose field name is KWMENG — has no value table, and you get to keep looking. From here on, techniques 7-13 all have about the same likelihood of revealing your table name. Use them in any order you like. You’llprobably find that you like some more than others, so use those first.If debugging didn’t give you what youneed or you don’t want to debug aprogram, then back out to the TechicalInformation dialog box and double-clickon the Data element field under “Fielddata”. This will show you the value table,if there is one.Technique #7: “Where-Used” Data Element When R/3 moves data from one table (or structure) to another, it often (not always) moves it into a target field having the same data element as the source field. From the Technical Information dialog box, double-click on the Data element field under “Field data” and follow Utilities→Where-used List→ Table fields→Enter (see Figure 8). This will list the tables, views, and structures that use this data element. If your field is a commonly usedFigure 8“Where-used List Data element”Request Screen in Release 4.0Bone, this list may be so large that it’s hard to find your data storage location. For example, KUNNR shows up in 743 objects in Release 4.0B. An infre-quently used field may show up in fewer objects, and you can find your data source in the list.Note also that the list includes structures; some-times, lots of structures. When you drill into a field name in the list, you’ll see the table display that will identify it as a structure or a transparent table. If it’s a structure, you’ll have to keep looking.Technique #8: “Z_DATA_ELEMENT”Since the “Where-used” list for a data element generally contains so many (non-data carrying) structures, the list is not terribly useful for our purpose. Take a look at Figure 9, for example. It has 77 hits.You can create the Data Dictionary viewZ_DATA_ELEMENT, which will show only the data tables that use your data element.Figure 9Data Element “Where-used”ListFigure 10 Components of a View for Searching Data ElementsCreate the view with Tools→ABAP Workbench→ Dictionary→Objectname=Z_DATA_ELEMENT →Views→Create, then enter the values shown in Figure 10.Use this tool with Tools→ABAP Workbench→ Dictionary→Object name=Z_DATA_ELEMENT→Views→Display →Utilities→[Display data or Table contents]→DATA_ELEM=[the name of the data element you are searching for]→[Execute or F8].This view will give you a list of only the tables that use your data element.Technique #9: ViewsTransaction data is normally stored in several hierar-chically connected tables, and R/3 may have one or more views defined for the transaction you’re dealing with. You can search through those views to find other associated tables. Any one of those might store your data. For example, assume you want the Order Quantity data from the Sales order: Single-Line Overview screen. It’s listed as RV45A-KWMENG, but you find that RV45A is a structure. You already know that Order is VBAK-VBELN, so you lookfor views in the Where-used list for VBAK. View VIVEDA connects VBAK, VBUK, and VBAP, and you find KWMENG in the VBAP table. Technique #10: Logical DatabasesTables that are related in a business processare frequently connected in logical databases.The VBAK “Where-used” list for logical databases, for example, includes AAV, which also shows the connection to VBAP.Technique #11: Other Screen FieldsOne or more of the other fields in the same transac-tion may be directly connected to their database tables. If you can discover the Header table of the transaction, it may include the field you want. For example, assume you want the Sold to data from the Sales Order initial screen. It’s listed as RV45S-KUNNR, but you find that RV45S is a structure. Its data element is KUNAG, but Release 4.0B uses that data element in 276 tables, so it would be tough to find it there. On the same screen, the Order or Standard Order is listed as VBAK-VBELN. When you look up the VBAK table, you find that it also includes KUNNR.Technique #12: Application HierarchyIn 4.0B or above, go to Tools→ABAP Workbench →Overview→Data Browser. Press F4 in the empty Table name field, then click on SAP Applica-tions→Application Hierarchy. Drill down through the menu tree to find the tables associated withyour application. Your field may well be in one of those tables.Technique #13: GraphicsIn 4.0B or above, go to Tools→ABAP Workbench → Dictionary, then type in the name of a table you believe is related to your field. Follow the path Display →[Extras or Utilities]→Graphics. You’ll see a graphical representation of the selected table and its links to other tables. You can use this to see the entire family of tables related to a business object, and you may be able to find where your field is located.The Last Resort:Techniques 14-18These are the techniques of last resort, which you should turn to only if you’ve exhausted all other possibilities.Technique #14: Change RecordsR/3 allows for changes that are made to many documents to be recorded in change records, and frequently the change information includes the name of the table and field affected. If change recording is turned on, you can change the field you’re looking for in such a document, and then read the change record to find the table and field name. Depending on theR/3 release, here are some examples of menu paths to change records:•In Plant Maintenance or Service Management Technical Objects: Extras→[Display Changes or Environment]→Display ChangesOrder: Extras→Order documents→[Changes or Extras]→Display ChangesNotification: Extras→Notification documents→ChangesContracts & Planning: Environment→Changes•In Sales and DistributionOrder: Environment→ChangesDelivery: Environment→ChangesIf more than one change is shown, drill into the change you’re interested in (generally the most recent). Tables TCDOB and TCDOBT list allthe available object classes for change document creation. You can get clues there about whether your application supports change documents. Technique #15: Change DocumentsIf you can’t find the change record in your transac-tion, have a look in the change document tables CDHDR and CDPOS (now there’s a mix of English and German naming conventions: “Change Document Header” and “Change Document Position”!) as fol-lows. After you have changed and saved the field you’re searching for, open CDHDR in the ABAP Workbench dictionary, then follow Utilities→Table contents to find the change record. In the selection screen enter today’s date, time range, and your user name. It should pull the one matching record.Ctrl+C (copy) the value of CHANGENR, and use it to pull the appropriate record from CDPOS (Figure 11). This record contains the names of the table and field affected, as well as the new and old values, so you can ensure that you’re looking at the right record.Figure 11Change Table Illustration in Release 4.0BTechnique #16: SQL TraceIf all else fails, it’s time for some serious archeology. In one session, go to your transaction but don’t run it yet. In another session, go into Tools→ABAP Workbench→Test→SQL Trace→Trace On→Ok. Switch to your transaction session and run your transaction. Switch back to the trace session and click Trace off→List trace→[Execute or Ok]. You’ll have a list of all the SQL calls to the tables with their parameters. It may be easier to download it into a word processor document for searching. Use System → List→Save→Local file→unconverted→Enter→Filename=[c:\mypath\filename.doc]→Transfer. Open “filename.doc” in Word, search for your field name, and notice the tables it is associated with. It may involve detective work to determine which table actually stores the data. This approach requires an understanding of SQL commands and principles. Technique #17: Runtime Analysis Alternatively, use runtime analysis withSystem→Utilities→Runtime Analysis→Execute→[Transaction=your_transcode or Program=your_program_name]→F8. Afteryou post the transaction or complete the program, the system will return you to the Runtime Analysis screen. Choose Analyze, then Tables or Table Hit List (F6) to see all the transparent and pool tables that were accessed during the transaction. Hit List (F5) will show you all the program calls and specify the ABAP program that was running. Sometimes the Where-used list from the “Structure” display with Programs checked will list a program in which the field is associated with the database. Compare the programs in that list to those you found in the Runtime Analysis Hit List to narrow your search. Technique #18: Data ContentsFinally, extract some data from the set of tables asso-ciated with your transaction, and copy those records into a text file. Use the “Search” function in your word processor to find data flows by content where the source and destination fields may have different names and data elements. R/3 often uses internal numbers that you’d never think of, such as Object ID and Object Type, to link records. Their values, how-ever, can be quite distinctive, and you may be able to find the path of data flow by searching for the values (ignoring the field names) when you have pulled data from several transactions.For example, to find Measurement documents associated with a service order, we needed to trace the connections shown in Figure 12. There was nothing obvious about which fields linked the data.We created a service order and several Measure-ment documents in R/3. Then we pulled out the records starting with the service order numbers, and chased through the various joins to pull all the associ-ated records. While displaying each table in SE11 we used Utilities→Table contents to extract the data.Figure 12Data Path from Service Order to Measurement DocumentWe exported the records as text documents using System→List→Save→Local file and merged them all into a single Word document. We then used Word’s “Find” function to follow the data through the tables by following the value of the contents. OBJID, OBJNR, and MPOBJ contain internal numbers that “mean” nothing to the transaction, yet they linkedthe records.Helpful Hints✔ Many transactions have header informationand detail or item lines in separate linked tables. Remember that R/3 is a German product. “Kopf” is German for “head,” and “position” can be interpreted in German as “detail” or “item.” You’ll often find header/item table pairs with “K” and “P” in their names, such as VBAK and VBAP. When you are looking for linked tables containing the data for a transaction, this tip may help you identify one ifyou have the other.✔ There are small differences between R/3 Releases 3.1I, 4.0B, 4.5B, and 4.6B for the menu paths and directions used in this article. For example, Release 3.1I menus refer to the ABAP/4 (Workbench, Editor, etc.) whereas higher releases refer to ABAP. The Release 4.0B ABAP Workbench→ABAP Editor menu path shows up in Release 4.6B with the extra step ABAP Workbench→Development→ABAP Editor. The figures in this article were taken from a 4.0B system unless there was an important difference in appearance on another release. Many installations today are still using Release 3.1, and most are running 4.0 or below, so those images are important. The corresponding 4.5 and 4.6 screens are virtually identical to Release 4.0B except for Figure 2, so there’s no need to show the other figures in those releases as well.✔ Release 3.1I and below can’t execute technique 5 because they don’t have the watchpoint functionality in their debuggers, or techniques 12 and 13 because they don’t have the application hierarchy or graphics functions.ConclusionSAP’s three-tiered architecture is the backbone of an R/3 infrastructure. It’s what makes an R/3 system flexible, reliable, and open, all at the same time. It’s also what makes locating underlying data, at times, so inherently difficult. Hopefully the techniques presented here will help. Opt for the ones that you find easiest and most convenient to use. Leave the others as techniques of last resort. Some fields may still resist these techniques; there are no doubt other ways yet to chase them down. If you know of other techniques (or corrections to these techniques), please e-mail me at dennis.barrett@. AcknowledgementsThank you to the many SAP and partner consultants who gave me suggestions and feedback, and to those who reviewed this article.Dennis Barrett is an applications consultantwith SAP America who focuses on Service Management/Customer Service and the Service Provider solution. He has been consulting in computers for over 15 years, always blending applications and programming. He’s a certified ABAP programmer and often facilitates communications between business process owners and programmers. Dennis is the author of “SAP R/3 ABAP/4 Command Reference,” published by Que/MacMillan, and wrote “Customer Service ABAP Tables for Programmers,” published this spring in the PM/CS e-Newsletter, which is sent to all SAP consultants in Plant Maintenance and Customer Service. Dennis maintains a personal Web site at ~dennis.barrett, which includes copies of the PM/CS articles as well as white papers and other items of interest to ABAP programmers and CS consultants. You can reach him at dennis.barrett@.。
vlookup18种用法
vlookup18种用法VLOOKUP 函数是 Excel 中最常用的函数之一,在处理大量数据时非常有用。
它可以帮助我们在一个数据表中查找指定的值,并返回相应的结果。
这个函数的用法非常灵活,可以根据不同的需求进行调整。
在本文中,我们将介绍 VLOOKUP 函数的18 种用法,希望可以帮助读者更好地理解和应用这个功能强大的函数。
1. 在单个数据表中查找指定值最常见的用法是在一个数据表中查找指定的值。
使用VLOOKUP 函数可以轻松地找到相应的结果,并将其显示在另一个单元格中。
这对于查找特定的数据行非常有用。
2. 在不同的数据表中查找指定值VLOOKUP 函数不仅适用于单个数据表,还适用于多个数据表。
我们可以使用函数将不同的数据表关联起来,并在其中查找指定的值。
这样可以大大简化数据查询和分析的过程。
3. 使用范围名称进行查找除了使用单元格引用,我们还可以使用定义的范围名称进行查找。
范围名称可以帮助我们快速识别和引用特定的数据范围,并提高公式的可读性和可维护性。
4. 查找最接近的匹配项有时候我们需要在一个数据表中查找与给定值最接近的匹配项。
VLOOKUP 函数也可以帮助我们实现这个目标。
通过指定“最接近的”参数,我们可以找到与给定值最接近的匹配项,并返回相应的结果。
5. 查找具有多个匹配项的值除了查找单个匹配项外,VLOOKUP 函数还可以查找具有多个匹配项的值。
这在处理复杂数据集时非常有用,可以让我们更好地理解和分析数据。
6. 使用多个条件进行查找在实际的数据分析中,往往需要根据多个条件进行数据查找。
VLOOKUP 函数同样可以处理这种情况。
通过使用多个参数,我们可以在一个数据表中根据多个条件进行查找,并返回满足条件的结果。
7. 忽略大小写进行查找有时候我们需要在一个数据表中进行不区分大小写的查找。
VLOOKUP 函数可以帮助我们实现这一目标。
通过指定“忽略大小写”参数,我们可以在查找时忽略文本的大小写,从而找到相应的结果。
18个查找函数
18个查找函数查找函数是计算机编程中常用的工具之一,用于在给定数据集中快速找到目标元素。
这些函数广泛应用于各种编程语言和领域,包括数据处理、数据库查询、图形算法等。
本文将介绍18个常见的查找函数,并逐步回答与之相关的问题。
1. 线性查找(Linear Search)线性查找是最简单的一种查找方法,它逐个地比较目标元素与数据集中的每个元素,直到找到目标或遍历完整个数据集。
但是,线性查找的时间复杂度较高,适用于小规模数据集或未排序的数据。
问题1:线性查找的时间复杂度是多少?答:线性查找的时间复杂度为O(n),其中n是数据集的大小。
2. 二分查找(Binary Search)二分查找是一种高效的查找算法,要求数据集必须是有序的。
它通过将数据集分成两半,并与目标元素进行比较,从而逐步缩小查找范围。
每次比较都可以将查找范围缩小一半,因此该算法的时间复杂度较低。
问题2:二分查找要求数据集必须是有序的吗?答:是的,二分查找要求数据集必须是有序的,这是保证算法正确性的前提。
3. 插值查找(Interpolation Search)插值查找是对二分查找的改进,它根据目标元素与数据集中最大和最小元素的关系,估算目标所在位置,并逐步逼近目标。
这种方法在被查找的数据集分布较为均匀时能够显著提高查找效率。
问题3:何时应该使用插值查找而不是二分查找?答:当被查找的数据集分布较为均匀时,插值查找能够提供更好的性能。
而对于分布不均匀的数据集,二分查找可能更适用。
4. 斐波那契查找(Fibonacci Search)斐波那契查找是一种利用斐波那契数列的性质进行查找的算法。
它类似于二分查找,但将查找范围按照斐波那契数列进行划分。
这种方法在数据集较大时能够降低比较次数,提高查找效率。
问题4:为什么使用斐波那契数列进行划分?答:斐波那契数列具有递增的性质,能够将查找范围按照黄金分割比例进行划分,使得划分后的两部分大小接近,提高了查找的效率。
中图法分类号查询(全部简表)
中图法分类号与中图分类法查询生物科学属于Q类,医学类属于R类,可以直接转至Q或R类查询A马克思主义、列宁主义、毛泽东思想A1马克思、恩格斯著作A2列宁著作A3斯大林著作A4毛泽东著作A49 邓小平著作A5马克思、恩格斯、列宁、斯大林、毛泽东、邓小平著作汇编A7马克思、恩格斯、列宁、斯大林、毛泽东、邓小平生平和传记A8马克思主义、列宁主义、毛泽东思想邓小平理论的学习和研究—-——-——--—-—-—-—-—-—-—--——————-—----——--————-—---———--—---—--—-—-—--------—-——--B哲学B0哲学理论B1世界哲学B2中国哲学B3亚洲哲学B4非洲哲学B5欧洲哲学B6大洋洲哲学B7美洲哲学B80逻辑科学(总论)B81逻辑学B82伦理学B83美学B84心理学B9无神论、宗教-——-—------———-—-—-—-—-—----—---—-—--—-———------—-———————-—---—-—--————--————--—C社会科学总论C0社会科学理论与方法论C1社会科学现状及发展C2社会科学机构、团体、会议C3社会科学研究方法C4社会科学教育与普及C5社会科学丛书、文集、连续性出版物C6社会科学参考工具书C[7] 社会科学文献检索工具书C8统计学C91社会学C92人口学C93管理学C[94]系统科学C95 民族学C96人才学C97 劳动科学———-———-—-——---——-—----—--———-—-——----——---—--——---——-——--—-—-—-——----——-—————--D政治、法律D0 政治理论D1 共产主义运动D2 中国共产党D3 各国共产党D4工人、农民、青年、妇女运动与组织D5 世界政治D6 中国政治D73/77 各国政治D8外交、国际关系D9法律——-—-——---------——-—--————-——————-————-———--—--————------——————-—-—-—-————--——--E军事E0军事理论E1世界军事E2中国军事E3/7各国军事E8战略学、战役学、战术学E9军事技术E99军事地形学、军事地理学----—--------—-——--——---—-——-———-—--———-—-—-—-——---—--—--—-———--—-—------——----—F经济F0政治经济学F0-0马克思主义政治经济学(总论)F01经济学基本问题F02前资本主义社会生产方式F03资本主义社会生产方式F04社会主义社会生产方式F05共产主义社会生产方式F06经济学分支学科F08各科经济学F09经济思想史F1世界各国经济概况、经济史、经济地理F11 世界经济、国际经济关系F12 中国经济F13/17各国经济F2经济计划与管理F20 国民经济管理F21 经济计划F22 经济计算、经济数学方法F23 会计F239 审计F24 劳动经济F25 物资经济F27 企业经济F28 基本经济建设F29 城市与市政经济F3农业经济F30 农业经济理论F31 世界农业经济F32 中国农业经济F33/37各国农业经济F4工业经济F40 工业经济理论F41 世界工业经济F42 中国工业经济F43/47各国工业经济F49 信息产业经济(总论)F5交通运输经济F50 交通运输经济理论F51 世界各国概况F53 铁路运输经济F54 陆路、公路运输经济F55 水路运输经济F56 航空运输经济F57 城市交通运输经济F59 旅游经济F590 旅游经济理论与方法F591 世界旅游事业F592 中国旅游事业F593/597各国旅游事业F6邮电经济F60 邮电经济理论F61 邮政F62 电信F63 世界各国邮电事业F7贸易经济F71 国内贸易经济F72 中国国内贸易经济F73 世界各国国内贸易经济F74 国际贸易F75 各国对外贸易F76 商品学F8财政、金融F81 财政、国家财政F82 货币F83 金融、银行F84 保险--—---———-—-----———----——-——------————----—-—--———-—--—-————----——--———----——-—-G文化、科学、教育、体育G0文化理论G1世界各国文化与文化事业G2信息与知识传播G20 信息与传播理论G21 新闻学、新闻事业G22 广播、电视事业G23 出版事业G24 群众文化事业G25 图书馆学、图书馆事业G26 博物馆学、博物馆事业G27 档案学、档案事业G3科学、科学研究G30 科学研究理论G31 科学研究工作G32 世界各国科学研究事业G35 情报学、情报工作G4教育G40 教育学G41 思想政治教育、德育G42 教学理论G43 电化教育G44 教育心理学G45 教师与学生G46 教育行政G47 学校管理G48 学校建筑和设备管理G51 世界各国教育事业G52 中国教育事业G53/57各国教育事业G61 学前教育、幼儿教育G62 初等教育G63 中等教育G64 高等教育G65 师范教育G71 职业技术教育G72 成人教育、业余教育G74 华侨教育、侨民教育G75 少数民族教育G76 特殊教育G77 社会教育G78 家庭教育G79 自学G8体育G80 体育理论G81 世界各国体育事业G818 运动场地与设备G819 体育运动技术(总论)G82 田径运动G83 体操运动G84 球类运动G85 武术及民族形式体育G86 水上、冰上与雪上运动G87 其他体育运动G89 文体活动-———-———————--————-----—-—-————---——-——-——-—-——-—--—-—-—-—---————-——--—-——-——-——H语言、文字H0语言学H002 语言规划H003 语言分类H004 语言的分布H01 语音学H02 文字学H03 语义学、语用学、词汇学、词义学H05 写作学与修辞学H059 翻译学H06 字典学H07 方言学H08 应用语言学H09 语文教学H1汉语H11 语音H12 文字学H13 语义、词汇、词义(训诂学)H14 语法H15 写作、修辞H159 翻译H16 字书、字典、词典H17 方言H19 汉语教学H2中国少数民族语言H3常用外国语H31 英语H32 法语H33 德语H34 西班牙语H35 俄语H36 日语H37 阿拉伯语H4汉藏语系H5阿尔泰语系H61 南亚语系H62 南印语系H63 南岛语系H64 东北亚诸语言H65 高加索语系H66 乌拉尔语系H67 闪-含语系H7印欧语系H81 非洲诸语言H83 美洲诸语言H84 大洋州诸语言H9 国际辅助语-———-—-—--—-—-—————-—-——---—-—----------——————--—---————-———-——---————-—-——-——--I文学I0文学理论I1世界文学I106 作品评论和研究I109 文学史文学思想史I11 作品集I2中国文学I200 方针政策及其阐述I206 文学评论和研究I207 各体文学评论和研究I209 文学史、文学思想史I21 作品集I22 诗歌、韵文I23 戏剧文学I239 曲艺I24 小说I25 报告文学I26 散文I269 杂著I27 民间文学I28 儿童文学I29 少数民族文学I299 宗教文学I3/7各国文学-——-—————————-——----—-—-———-------———-—-—--———--——--————---—-----—-——-———-—--——-J艺术J0艺术理论J1世界各国艺术概况J2绘画J29 书法、篆刻J3雕塑J4摄影艺术J5工艺美术J[59]建筑艺术J6音乐J7舞蹈J8戏剧艺术J9电影、电视艺术——--—--————-—--———-—-——-—-—---—---———----——--—-—-—-—-—-——-----—--————-———-——-—-—K历史、地理K0史学理论K01 史学的哲学基础K02 社会发展理论K03 史学专著K04 年代学K05 史料学K06 历史研究K09 史学史K1世界史K10 通史K11 上古史K12 古代史K13 中世纪史K14 近代史K15 现代史K18 民族史志K2中国史K20 通史K21 原始社会K22 奴隶社会K23 封建社会K25 半殖民地、半封建社会K27 中华人民共和国时期K29 地方史志K3亚洲史K4非洲史K5欧洲史K6大洋洲史K7美洲史K81传记K810 传记研究与编写K811 世界人物传记K833/837 各国人物传记K85文学考古K[852] 古文献学K853 纹章学K854 考古方法K86 世界文物考古K87 中国文物考古K883/887 各国文物考古K89风俗习惯K9地理K90 地理学K91 世界地理K92 中国地理K93/97 各国地理K99 地图——-——-————————--—-———————--——-—-——-—-——-—-—-—--—-———--——-————-———--—-—-----—--——N自然科学总论N0 自然科学理论与方法论N1 自然科学现状及发展N2 自然科学机构、团体、会议N3 自然科学研究方法N4 自然科学教育与普及N5 自然科学丛书、文集、连续出版物N6 自然科学参考工具书N[7]自然科学文献检索工具N8 自然科学调查、考察N91 自然研究、自然历史N93 非线性科学N94 系统科学N[99] 情报学、情报工作—----——-—-——-———-—-—--———-——--—--—-———-—--—-——--—--—-----——--—-----—————-——--——-O数理科学和化学O1数学O1—0 数学理论O1-8 计算工具O11 古典数学O12 初等数学O13 高等数学O14 数理逻辑、数学基础O15 代数、数论、组合理论O17 数学分析O18 几何、拓扑O19 动力系统理论O21 概率论与数理统计O22 运筹学O23 控制论、信息论(数学理论)O24 计算数学O29 应用数学O3力学O31 理论力学O32 振动力学O33 连续介质力学(变形体力学) O34 固体力学O35 流体力学O369 物理力学O37 流变学O38 爆炸力学O39 应用力学O4物理学O41 理论物理学O42 声学O43 光学O44 电磁学、电动力学O45 无线电物理学O46 真空电子学O469 凝聚态物理学O47 半导体物理学O48 固体物理学O51 低温物理学O52 高压与高温物理学O53 等离子体物理学O55 热学与物质分子运动论O56 分子物理学、原子物理学O57 原子核物理学、高能物理学O59 应用物理学O6化学O61 无机化学O62 有机化学O63 高分子化学(高聚物)O64 物理化学(理论化学)、化学物理学O65 分析化学O69 应用化学O7晶体学O71 几何晶体学O72 X射线晶体学O73 晶体物理O74 晶体化学O75 非晶态和类晶态O76 晶体结构O77 晶体缺陷O78 晶体生长O79 晶体物理化学过程O799 应用晶体学—--—-—-—-——--————-—-—————-—-------——-—-—--——-—--—--—-———---——-------—--—---——-——P天文学、地理科学P1天文学P2测绘学P3地球物理学P4大气科学(气象学)P5地质学P7海洋学P9自然地理学——-——--——-—--————------—-—---—-——-----—————————--—-—--—--—---———-——-———-—-————-—Q生物科学Q1普通生物学Q1—0 生命科学总论Q10 生命的起源Q11 生物演化与发展Q13 生物形态学Q14 生态学Q15 生物分布与生物地理学Q16 保护生物学Q17 水生生物学Q18 寄生生物学Q19 生物分类学Q21 细胞的形成与演化Q[23] 细胞遗传学Q24 细胞形态学Q25 细胞生理学Q26 细胞生物化学Q27 细胞生物物理学Q[291]细胞分子生物学Q3遗传学Q31 遗传与变异Q32 杂交与杂种Q[33] 人工选择与自然选择Q34 遗传学分支学科Q[36] 微生物遗传学Q[37] 植物遗传学Q[38]动物遗传学Q[39]人类遗传学Q4生理学Q41 普通生理学Q42 神经生理学Q43 分析器生理学Q44 运动器官生理学Q45 内分泌生理学Q46 循环生理学Q47 呼吸生理学Q48 消化生理学Q491 排泄生理学Q492 生殖生理学Q493 新陈代谢与营养Q494 特殊环境生理学、生态生理学Q495 比较生理学与进化生理学Q5生物化学Q50 一般性问题Q51 蛋白质Q52 核酸Q53 糖Q54 脂类Q55 酶Q56 维生素Q57 激素Q58 生物体其他化学成分Q591 物质代谢及能量代谢Q592 体液代谢Q593 器官生物化学Q595 应用生物化学Q6生物物理学Q61 理论生物物理学Q62 生物声学Q63 生物光学Q64 生物电磁学Q65 生物热学Q66 生物力学67 物体化学生物学Q68 物理因素对生物的作用Q691 辐射生物学(放射生物学)Q[692]仿生学Q693 空间生物学Q7分子生物学Q71 生物大分子的结构和功能Q73 生物膜的结构和功能Q74 生物小分子的结构和功能Q75 分子遗传学Q77 生物能的转换Q78 基因工程(遗传工程)Q81生物工程学(生物技术)Q811 仿生学Q813 细胞工程Q814 酶工程Q819 生物工程应用Q[89] 环境生物学Q91古生物学Q93微生物学Q94植物学Q95动物学Q96昆虫学Q98人类学———--————-—--—---—-——----—————-———-----—-------———------—-—-—-—-—-—-——-—--------R医学、卫生R1预防医学、卫生学R2中国医学R3基础医学R4临床医学R5内科学R6外科学R71 妇产科学R72 儿科学R73 肿瘤学R74 神经病学与精神病学R75 皮肤病学与性科学R76 耳鼻咽喉科学R77 眼科学R78 口腔科学R79 外国民族医学R8特种医学R9药学-———----———————-—------——-————---——--———————----—-—————-----——-——-——————————-———S农业科学S1农业基础科学S2农业工程S3农学(农艺学)S4植物保护S5农作物S6园艺S7林业S8畜牧、动物医学、狩猎、蚕、蜂S9水产、渔业----—----——-———--———----—-----——-—---——-—-—-—---—--——--——-—----———-——-———-—-—--—T工业技术TB一般工业技术TD矿业工程TE石油、天然气工业TF冶金工业TG金属学、金属工艺TH机械、仪表工业TJ武器工业TK动力工程TL原子能技术TM电工技术TN无线电电子学、电信技术TP自动化技术、计算技术TQ化学工业TS轻工业、手工业TU建筑科学TV水利工程--———---—-—--—-—-————-—-———--————---—---—---—-—--—-—--—-—---—-——-——----———-—----U交通运输U1 综合运输U2 铁路运输U4 公路运输U6 水路运输U[8] 航空运输--—-—--——-------———-———-————--———-—-—---—-————-—-—————--——----——-—-—--—--——--——-V 航空、航天V1 航空、航天技术的研究与探索V2 航空V4 航天(宇宙航行)V[7]航空、航天医学-----—--—-—-—-———------————-—-—------————-—————--————-———-------—---—--———-—--—-X 环境科学、劳动保护科学(安全科学)X1 环境科学基础理论X2 环境保护管理X3 环境综合研究X4 灾害及其防治X5 环境污染及其防治X7 三废处理与综合利用X8 环境质量评价与环境监测X9 安全科学-—-—————---—-——---—---—-—-———-—-—-—-————-——--—--—--—--—--————-—————----—-——-——--Z综合性图书Z1 丛书Z2 百科全书、类书Z3 辞典Z4 论文集、全集、选集、杂著Z5 年签、年刊Z6 期刊、连续性出版物Z8 图书目录、文摘、索引。
SQL查询语句
找出分数高于90分的学生姓名和所在院系 找出选修数据库的学生的学号和分数 给出计算机系选修数据库的学生的学号和 分数
SELECT 学号,分数 SELECT 学号,分数 SELECT 姓名,所在院系 FROM 课程,成绩 FROM 学生,课程,成绩 FROM 学生,成绩 WHERE (课程名=‘数据库’) WHERE (课程名=‘数据库’) WHERE (分数>90) AND 学生.学号=成绩.学号 AND 课程.课程号=成绩.课程号 AND 课程.课程号=成绩.课程号 AND 学生.学号=成绩.学号 \\多表连接
注:函数SUM和AVG只能对数值型字段进行计算
GROUP BY 子句
分组查询 求各个课程号(Cno)及相应的选课人数。其命 令为: SELECT Cno , COUNT(Sno) CntSno FROM Reports GROUP BY Cno;
GROUP BY子句按Cno的值分组,所有具有相 同Cno的元组为一组,对每一组的学生数使用 函数COUNT进行计算,统计出各课程的人数, 存放在名称为CntSno 这个属性列中。
字符串的匹配
LIKE 是字符串匹配运算符 样式符号 *代表0个或多个任意字符 ?代表1个任意字母 # 代表1个任意数字 (!)a-z代表字符(或以外)范围 通配符 %表示0个或多个字符串 _表示一个字符
查询姓名中第二个汉字是“力”的学生号信息 SELECT * FROM Students WHERE Sname LIKE '_力 %';
自身连接
当一个表与其自已进行连接操作时,称为表的自身连接。要查询的
内容均在同一表中,可以将表分别取两个别名,一个是X,一个是Y。 将X, Y中满足查询条件的行连接起来。这实际上是同一表的自身连 接。 查`询每一门课的间接先修课(即先修课的先修课)。 在Courses表关系中,只有每门课的直接先修课信息,而没有先修课 的先修课。要得到这个信息,必须先对一门课找到其先修课,再按 此先修课的课程号,查找它的先修课程。这就需要要将Courses表 与其自身连接。为方便连接运算,这里为Courses表取两个别名分 别为A,B。则完成该查询的SQL语句为:
查找
2020/7/2
第37页
【分块查找算法】
查找步骤: • 首先用给定值在索引表中查找,确定满足条
件的数据元素应存放在哪一块中, • 对索引表查找的方法既可以采用二分法查找,
也可以采用顺序查找, • 然后再到相应的块中进行顺序查找,便可以
得到查找的结果。
2020/7/2
第38页
例如,给定关键字序列如下:
2020/7/2
第10页
7.1 静态查找表
7.2 动态查找树表 7.3 哈希表
2020/7/2
第11页
7.1 静态查找表
2020/7/2
第12页
一、顺序查找表
以顺序表或线性链表表示静 态查找表
2020/7/2
第13页
数据元素类型的定义为:
typedef struct { keytype key; // 关键字域
2020/7/2
第33页
例对于给定11个数据元素的有序表 {2,3,10,15,20,25,28,29,30,35,40},采用二分查找,试问:
(1)若查找给定值为20的元素,将依次与表中哪些 元素比较?
(2)若查找给定值为26的元素,将依次与哪些元素 比较?
(3)假设查找表中每个元素的概率相同,求查找成 功时的平均查找长度和查找不成功时的平均查找长度。
lowmid high
2020/7/2
第28页
1 2 3 4 5 6 7 8 9 10 11 5 13 19 21 37 56 64 75 80 88 92
lowmid high
1 2 3 4 5 6 7 8 9 10 11 5 13 19 21 37 56 64 75 80 88 92
low high mid
上升星座查询表
上升星座概念:上升星座——你的人格面具上升星座即是你出生时,东方地平线与黄道交界处升起的第一个星座。
上升星座是我们的的外在表现,是外界所觉知到的你。
因此由上升星座也可得知你表达自我的方式。
通常一个人的太阳及上升星座都不会一样,而这就是我们之所以称上升星座为我们的“人格面具”。
大部分时候,我们的太阳是隐藏在上升星座背后的。
在为期二十四小时的每一天中,十二星座依序从地平面升起,因此我们可得知,每个上升星座更替的时间约为两个小时。
另外,你的太阳星座就是你出生当天日出时升起的星座。
也就是说,唯有日出时分出生的人方是太阳星座与上升星座相同的幸运儿,这种人的外在表现与内在本质是相符合的。
上升星座会影响一个人持有某种特定想法,认为要怎么表现才能被人所接受。
由于上升星座也是每个人星盘中的第一宫,意味著我们的童年环境,因此我们可以得知上升星座(也就是自我期许)是当我们还小的时候,父母给予肯定、鼓励我们表现出来的。
上升星座所透露的不只是我们言谈、行为的模式,我们的穿著、发型、外表等等皆受其影响。
上升星座〔命宫/本命星座〕上升星座是出生时,东方所升起的星座。
其重要性在其他任何星座之上。
字诀是『内在的自我』。
主宰『真正和完整的自我』、生命的开端及人生未来的方向与发展。
影响计有:人格型态、外貌气质、自我认同、外在形象及个人的独特性。
影响一个人至少有22个星座,平常所说星座是太阳星座,也就是日座,而上升星座是人的第一徽征算上升星座,需要出生年月日,出生时间精确到分,出生地的经纬度。
两个人出生年月日都不相同,却有可能有同样的上升星座。
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>上升星座计算方法:一般人都很熟悉他们的星座个性,但是其实大部分人所谈的是太阳星座,就是出生時太阳进入的星座。
天干地支的计算方法及天干地支查询表[1]
天干地支的计算方法及天干地支查询表天干地支的计算方法及天干地支查询表天干地支简称干支,是夏历中用来编排年号和日期用的。
天干地支简称干支,是夏历中用来编排年号和日期用的。
干支还有阴阳之分:甲、丙、戊、庚、壬为阳干,乙、丁、己、辛、癸为阴干;子、寅、辰、午、申、戌为阳支,丑、卯、巳、未、酉、亥为阴支。
以一个天干和一个地支相配,排列起来,天干在前,地支在后,地支在后,天干由甲起,天干由甲起,天干由甲起,地支由子起,地支由子起,地支由子起,阳干配阳支,阳干配阳支,阳干配阳支,阴干配阴支阴干配阴支(阳干不配阴支,阳干不配阴支,阴干不配阳支阴干不配阳支),共有六十个组合,称为“六十甲子”。
我国人民过去就是以六十甲子循环起来纪年、纪月、纪日、纪时的。
时的。
干支纪年法干支纪年法 :如甲子为第一年,乙丑为第二年,丙寅为第三年……六十年为一周。
一周完了,再由甲子年起,周而始,循环下去。
阳历年份除以60的余数减3便得到该年农历干支序号数,再查干支表便是干支年纪。
如果序号数小于、等于零则于支序号数加60。
如计算2008年的干支,即为:2008/60=33余数为28,28-3=25,查干支表知该年为戊子。
又如求1983年干支:1983÷1983÷60=3360=33余3,干支序号=3-3=0,加上60,查干支表知该年为癸亥。
,查干支表知该年为癸亥。
表一 天干和地支天干和地支 天干天干 甲乙丙丁戊己庚辛壬癸地支地支子鼠子鼠 丑牛丑牛 寅虎寅虎 卯兔卯兔 辰龙辰龙 巳蛇巳蛇 午马午马 未羊未羊 申猴申猴 酉鸡酉鸡 戌狗戌狗 亥猪亥猪天干和地支组合便成为以「甲子」为首的六十干支循环(表二)。
表二 六十干支表 1 2 3 4 5 6 7 8 9 10 11 12 甲子甲子 乙丑乙丑 丙寅丙寅 丁卯丁卯 戊辰戊辰己巳己巳 庚午庚午辛未辛未 壬申壬申癸酉癸酉 甲戌甲戌乙亥乙亥 13 14 15 16 17 18 19 20 21 22 23 24 丙子丙子 丁丑丁丑 戊寅戊寅 己卯己卯 庚辰庚辰辛巳辛巳 壬午壬午癸未癸未 甲申甲申乙酉乙酉 丙戌丙戌丁亥丁亥 25 26 27 28 29 30 31 32 33 34 35 36 戊子戊子 己丑己丑 庚寅庚寅 辛卯辛卯 壬辰壬辰 癸巳癸巳 甲午甲午 乙未乙未 丙申丙申 丁酉丁酉 戊戌戊戌 己亥己亥 37 38 39 40 41 42 43 44 45 46 47 48 庚子庚子 辛丑辛丑 壬寅壬寅 癸卯癸卯 甲辰甲辰 乙巳乙巳 丙午丙午 丁未丁未 戊申戊申 己酉己酉 庚戌庚戌辛亥辛亥 49 50 51 52 53 54 55 56 57 58 59 60 壬子壬子癸丑癸丑 甲寅甲寅 乙卯乙卯 丙辰丙辰丁巳丁巳 戊午戊午己未己未 庚申庚申辛酉辛酉 壬戌壬戌癸亥癸亥 历史上以干支纪年、纪月、纪日和纪时的起始年代各不相同。
Excel操作大全(超全)
Excel操作大全(超全)Excel 使用技巧集锦——163种技巧目录一、基本方法71.快速选中全部工作表72.快速启动E XCEL73.快速删除选定区域数据 84.给单元格重新命名85.在E XCEL中选择整个单元格范围96.快速移动/复制单元格97.快速修改单元格式次序 98.彻底清除单元格内容109.选择单元格1010.为工作表命名1111.一次性打开多个工作簿 1112.快速切换工作簿1313.选定超级链接文本(微软O FFICE技巧大赛获奖作品)1314.快速查找1415.修改默认文件保存路径 1416.指定打开的文件夹1517.在多个E XCEL工作簿间快速切换1518.快速获取帮助1619.创建帮助文件的快捷方式1620.双击单元格某边移动选定单元格1621.双击单元格某边选取单元格区域1722.快速选定不连续单元格 1723.根据条件选择单元格1824.复制或移动单元格1825.完全删除E XCEL中的单元格1826.快速删除空行1927.回车键的粘贴功能1928.快速关闭多个文件2029.选定多个工作表2030.对多个工作表快速编辑 2031.移动和复制工作表2132.工作表的删除2133.快速选择单元格2234.快速选定E XCEL区域(微软O FFICE技巧大赛获奖作品)2235.备份工件簿2236.自动打开工作簿2337.快速浏览长工作簿2338.快速删除工作表中的空行2339.绘制斜线表头2440.绘制斜线单元格2541.每次选定同一单元格2642.快速查找工作簿2643.禁止复制隐藏行或列中的数据2744.制作个性单元格27二、数据输入和编辑技巧281.在一个单元格内输入多个值 282.增加工作簿的页数283.奇特的F4键294.将格式化文本导入E XCEL295.快速换行306.巧变文本为数字307.在单元格中输入0值318.将数字设为文本格式329.快速进行单元格之间的切换(微软O FFICE技巧大赛获奖作品)3210.在同一单元格内连续输入多个测试值3311.输入数字、文字、日期或时间3312.快速输入欧元符号3413.将单元格区域从公式转换成数值3414.快速输入有序文本3515.输入有规律数字3516.巧妙输入常用数据3617.快速输入特殊符号3718.快速输入相同文本3719.快速给数字加上单位3820.巧妙输入位数较多的数字3921.将WPS/W ORD表格转换为E XCEL工作表3922.取消单元格链接4023.快速输入拼音4124.插入“√”4125.按小数点对齐4126.对不同类型的单元格定义不同的输入法4227.在E XCEL中快速插入W ORD表格4328.设置单元格字体4329.在一个单元格中显示多行文字4330.将网页上的数据引入到E XCEL表格4431.取消超级链接4432.编辑单元格内容4433.设置单元格边框4534.设置单元格文本对齐方式4535.输入公式4636.输入人名时使用“分散对齐”(微软O FFICE技巧大赛获奖作品)4637.隐藏单元格中的所有值(微软O FFICE技巧大赛获奖作品)4638.恢复隐藏列4739.快速隐藏/显示选中单元格所在行和列(微软O FFICE技巧大赛获奖作品)4740.彻底隐藏单元格4841.用下拉列表快速输入数据4942.快速输入自定义短语4943.设置单元格背景色5044.快速在多个单元格中输入相同公式5045.同时在多个单元格中输入相同内容5146.快速输入日期和时间5147.将复制的单元格安全地插入到现有单元格之间5148.在E XCEL中不丢掉列标题的显示5249.查看与日期等效的序列数的值5250.快速复制单元格内容5351.使用自定义序列排序(微软O FFICE技巧大赛获奖作品)5352.快速格式化E XCEL单元格5453.固定显示某列5454.在E XCEL中快速编辑单元格5455.使用自动填充快速复制公式和格式5556.为单元格添加批注5657.数据自动输入5658.在E XCEL中快速计算一个人的年龄5759.快速修改单元格次序5760.将网页上的数据引入到E XCEL表格中58三、图形和图表编辑技巧581.在网上发布E XCEL生成的图形582.创建图表连接符593.将E XCEL单元格转换成图片形式插入到W ORD中604.将W ORD内容以图片形式插入到E XCEL表格中615.将W ORD中的内容作为图片链接插入E XCEL表格中616.在独立的窗口中处理内嵌式图表627.在图表中显示隐藏数据 628.在图表中增加文本框639.建立文本与图表文本框的链接6310.给图表增加新数据系列 6411.快速修改图表元素的格式6512.创建复合图表6513.对度量不同的数据系列使用不同坐标轴6614.将自己满意的图表设置为自定义图表类型6615.复制自定义图表类型6716.旋转三维图表6717.拖动图表数据点改变工作表中的数值6818.把图片合并进你的图表 6819.用图形美化工作表7020.让文本框与工作表网格线合二为一7121.快速创建默认图表7122.快速创建内嵌式图表7123.改变默认图表类型7224.快速转换内嵌式图表与新工作表图表7225.利用图表工具栏快速设置图表7326.快速选取图表元素7427.通过一次按键创建一个E XCEL图表7528.绘制平直直线75四、函数和公式编辑技巧751.巧用IF函数清除E XCEL工作表中的0 752.批量求和773.对相邻单元格的数据求和774.对不相邻单元格的数据求和 785.利用公式来设置加权平均796.自动求和797.用记事本编辑公式808.防止编辑栏显示公式809.解决SUM函数参数中的数量限制8110.在绝对与相对单元引用之间切换8111.快速查看所有工作表公式8212.实现条件显示82五、数据分析和管理技巧831.管理加载宏832.在工作表之间使用超级连接 843.快速链接网上的数据854.跨表操作数据865.查看E XCEL中相距较远的两列数据866.如何消除缩位后的计算误差(微软O FFICE技巧大赛获奖作品)877.利用选择性粘贴命令完成一些特殊的计算878.W EB查询889.在E XCEL中进行快速计算8910.自动筛选前10个8911.同时进行多个单元格的运算(微软O FFICE技巧大赛获奖作品)9012.让E XCEL出现错误数据提示9113.用“超级连接”快速跳转到其它文件92六、设置技巧921.定制菜单命令922.设置菜单分隔线933.备份自定义工具栏934.共享自定义工具栏945.使用单文档界面快速切换工作簿946.自定义工具栏按钮95一、基本方法1.快速选中全部工作表右键单击工作窗口下面的工作表标签,在弹出的菜单中选择“选定全部工作表”命令即可()。
六十甲子五行金木水火土查询表
六十甲子五行金木水火土查询表介绍六十甲子是中国古代历法中的一种纪年方式,它由天干和地支组成,每个天干和地支都有对应的五行属性。
五行包括金、木、水、火和土,它们代表了自然界中的不同元素和能量。
了解六十甲子五行金木水火土查询表可以帮助我们理解中国古代历法和五行学说的基本原理。
六十甲子六十甲子是由十天干和十二地支组合而成的,每个天干和地支都有一个对应的数字,共同组成了六十个甲子。
六十甲子的排列顺序是固定的,每个甲子的周期为60年。
六十甲子被广泛应用于历法、纪年和占卜等方面。
六十甲子的排列顺序如下:1.甲子:甲子是六十甲子的第一个甲子,由天干甲和地支子组成。
甲子对应的五行属性是阳木。
2.乙丑:乙丑是六十甲子的第二个甲子,由天干乙和地支丑组成。
乙丑对应的五行属性是阴土。
3.丙寅:丙寅是六十甲子的第三个甲子,由天干丙和地支寅组成。
丙寅对应的五行属性是阳火。
4.丁卯:丁卯是六十甲子的第四个甲子,由天干丁和地支卯组成。
丁卯对应的五行属性是阴木。
5.戊辰:戊辰是六十甲子的第五个甲子,由天干戊和地支辰组成。
戊辰对应的五行属性是阳土。
6.己巳:己巳是六十甲子的第六个甲子,由天干己和地支巳组成。
己巳对应的五行属性是阴火。
7.庚午:庚午是六十甲子的第七个甲子,由天干庚和地支午组成。
庚午对应的五行属性是阳金。
8.辛未:辛未是六十甲子的第八个甲子,由天干辛和地支未组成。
辛未对应的五行属性是阴土。
9.壬申:壬申是六十甲子的第九个甲子,由天干壬和地支申组成。
壬申对应的五行属性是阳水。
10.癸酉:癸酉是六十甲子的第十个甲子,由天干癸和地支酉组成。
癸酉对应的五行属性是阴金。
11.甲戌:甲戌是六十甲子的第十一个甲子,由天干甲和地支戌组成。
甲戌对应的五行属性是阳木。
12.乙亥:乙亥是六十甲子的第十二个甲子,由天干乙和地支亥组成。
乙亥对应的五行属性是阴水。
13.丙子:丙子是六十甲子的第十三个甲子,由天干丙和地支子组成。
丙子对应的五行属性是阳火。
SAP ABAP 通过字段信息查找表
18 Techniques for Locating the Underlying Data of a Screen Field 18种根据屏幕字段查找潜在数据的技巧 Dennis Barrett / 翻译:强晟 qiangsheng@Picture this. An OperationsManager wants a specialreport of her service orders.She gives you a sketch ofwhat she wants it to looklike (columns, rows,headings, grouping,subtotals, totals, and thelike), and points to fieldson the ServiceManagement transactionscreens that have the datashe wants you to show inthe report.想象一下这样的情景。
一个业务经理希望得到一个关于她的服务订单的专用报表,她给了你一个报表的草图(包括列、行、标题、分组、小计、合计等等),而“服务管理”事务屏幕中的字段就包含了她希望你在报表中显示的数据。
Dennis Barrett is an applications consultant with SAP America whofocuses on Service Management/ Customer Service and the ServiceProvider solution.He has been consulting in computers for over 15 years, alwaysblending applications and programming. He is a certified ABAPprogrammer, and is also the author of “SAP R/3 ABAP/4 CommandReference.”丹尼斯·巴雷特是SAP美国的应用顾问,致力于服务管理/客户服务和服务提供解决方案。
日历查询表(自动查询)
2019年1月1日元旦201911 2019年2月2日世界湿地日201922 2019年2月14日情人节2019214 2019年3月8日国际劳动妇女节201938 2019年3月15日国际消费者权益日2019315 2019年3月21日国际消除种族歧视日2019321 2019年3月21日世界睡眠日2019321 2019年3月22日世界水日2019322 2019年3月23日世界气象日2019323 2019年3月24日世界防治结核病日2019324 2019年4月1日国际愚人节201941 2019年4月5日清明节201945 2019年4月7日世界卫生日201947 2019年4月22日世界地球日2019422 2019年4月26日世界知识产权日2019426 2007年4月20日受难节复活节前的星期五2007年4月22日复活节春分月圆后第一个星期日2019年4月28日世界儿童日4月第四个星期日2019年5月1日国际劳动节201951 2019年5月4日中国青年节201954 2019年5月8日世界红十字日201958 2019年5月14日世界哮喘日5月第二个星期二2019年5月12日国际护士节2019512 2019年5月12日母亲节5月第二个星期日2019年5月15日国际家庭日2019515 2019年5月17日世界电信日2019517 2019年5月18日国际博物馆日2019518 2019年5月31日世界无烟日2019531 2019年6月1日国际儿童节201961 2019年6月5日世界环境日201965 2019年6月17日世界防治荒漠化和干旱日2019617 2019年6月20日世界难民日2019620 2019年6月23日国际奥林匹克日2019623 2019年6月26日国际禁毒日2019626 2019年6月26日联合国宪章日2019626 2019年6月16日父亲节6月第三个星期日2019年7月6日国际合作社日7月第一个星期六2019年7月6日世界人口日2019711 2019年9月8日国际扫盲日201998 2019年9月10日中国教师节2019910 2019年9月16日国际臭氧层保护日2019916 2019年9月20日全国爱牙日2019920 2019年9月27日世界旅游日2019927 2019年9月18日国际和平日9月第三个星期二2019年7月11日世界海事日、船舶日9月最后一周某一日2019年10月1日国庆节2019101 2019年10月1日国际老人节20191012019年10月4日世界动物日2019104 2019年10月9日世界邮政日2019109 2019年10月14日世界标准日20191014 2019年10月15日国际盲人节20191015 2019年10月16日世界粮食日20191016 2019年10月17日国际消除贫困日20191017 2019年10月31日万圣节20191031 2019年11月14日世界糖尿病日20191114 2019年11月28日感恩节11月最后一个星期四2019年12月1日世界艾滋病日2019121 2019年12月3日国际残疾人日2019123 2019年12月4日中国法制宣传日2019124 2019年12月5日国际志愿人员日2019125 2019年12月7日国际民航日2019127 2019年12月10日世界人权日20191210 2019年12月25日圣诞节20191225 2019年2月4日除夕2019年2月5日春节正月初一11 2019年2月19日元宵节正月十五115 2019年3月8日龙抬头节二月初二22 2019年4月19日大理三月街三月十五315 2019年6月7日端午节五月初五55 2019年7月27日火把节六月廿五625 2019年8月7日七夕情人节七月初七77 2019年8月15日鬼节七月十五715 2019年9月13日中秋节八月十五815 2019年10月7日重阳节九月初九99 2019年1月13日腊八节腊八节128 2020年1月2日腊八节腊八节128 #NUM!小年小年1223 #NUM!小年小年1223 2019年1月6日小寒2019年1月21日大寒2019年2月5日立春2019年2月20日雨水2019年3月7日惊蛰2019年3月22日春分2019年4月6日清明2019年4月21日谷雨2019年5月7日立夏2019年5月22日小满2019年6月7日芒种2019年6月23日夏至2019年7月8日小暑2019年7月24日大暑2019年8月9日立秋2019年8月24日处暑2019年9月9日白露2019年9月24日秋分2019年10月9日寒露2019年10月25日霜降2019年11月9日立冬2019年11月23日小雪2019年12月8日大雪2019年12月23日冬至2019年7月1日香港回归日2019712019年8月1日建军节201981在西方计算复活节日期的方法:首先将当年的年份加一,然后把答案除以十九,找出余数,并在下面的表格里查看这余数的相对日的日子了例如今年是二零零零年,把二零零零加一便是二零零一,把二零零一除以十九,答案便是一零五余六,在下面的表格里,六的相对日期是4月18日,那么4月18日之后的第一个星期日,余数:日子:039168327391901391864143917423917543339164323439183411539172331639190418739180488391693289391884161039177451139166325123918541313391744214391633221539182410163917133017391894171839179472009年10月17日“=IF(ISERROR(MATCH(DATE(,MONTH(E1),DAY(E1)),DATE(,MON 小寒1043471.97655大寒214.7215277843486.69808立春314.7645833343501.46266雨水414.8256944443516.28836惊蛰514.9256944443531.21405春分615.0333333343546.24738清明715.1673611143561.41475谷雨815.2937543576.7085立夏915.4277777843592.13627小满1015.537543607.67377芒种1115.6354166743623.30919夏至1215.6972222243639.00641小暑1315.7298611143654.73627大暑1415.72543670.46127立秋1515.6819444443686.14322处暑1615.612543701.75572白露1715.5083333343717.26405秋分1815.3930555643732.65711寒露1915.2569444443747.91405霜降2015.1312543763.0453立冬211543778.0453小雪2214.8979166743792.94322大雪2314.8041666743807.74738冬至2414.7513888943822.49877系统误差2节气初始时刻 6.154861111 6.1375自转周期0.997268519公转周期365.2421991速度108000节气跨度43465.82169的第一个星期日,即是4月23日便是复活节339194(,MONTH(A1:A73),DAY(A1:A73)),)),"","今天是:"&INDEX(A1:B73,MATCH(DATE(,MONTH(E1),DAY(E1)),DATE(,MONTH1),DAY(E1)),DATE(,MONTH(A1:A73),DAY(A1:A73)),),2))。
日历查询表(自动查询)
2 6.1375
3
39173
1
0 44202.46095
2 14.72152778 44217.18248
3 14.76458333 44231.94706
4 14.82569444 44246.77275
5 14.92569444 44261.69845
6 15.03333333 44276.73178
7 15.16736111 44291.89914
8 15.29375 44307.19289
9 15.42777778 44322.62067
10
15.5375 44338.15817
11 15.63541667 44353.79359 12 15.69722222 44369.49081 13 15.72986111 44385.22067
14
2021年11月25日 感恩节
2021年12月1日 世界艾滋病日 2021年12月3日 国际残疾人日 2021年12月4日 中国法制宣传日 2021年12月5日 国际志愿人员日 2021年12月7日 国际民航日 2021年12月10日 世界人权日 2021年12月25日 圣诞节 2021年2月11日 除夕 2021年2月12日 春节 2021年2月26日 元宵节 2021年3月14日 龙抬头节 2021年4月26日 大理三月街
2021年1月1日 元旦 2021年2月2日 世界湿地日 2021年2月14日 情人节 2021年3月8日 国际劳动妇女节
2021 1
1
2021 2
2
2021 2
14
2021 3
8
2021年3月15日 国际消费者权益日
数据结构 查找
生成二叉排序树过程。
10 3 2 7 8 18 12
注:二叉排序树与关键字排列顺序有关,排列顺 序不一样,得到的二叉排序树也不一样。
二叉排序树的建立的算法
反复调用二叉排序树的插入算法即可 Bitree Creat (int n) { //建立含有n个结点的二叉排序树
Bitree T= NULL;
for ( int i=1; i<=n; i++) {
else if LT(key,p->key) p->lchild=s;
else p->rchild=s
return TRUE; }
//被插结点*s为右孩子
else return FALSE;
}// Insert BST
//树中已有关键字相同的结点,不再插入
4)二叉排序树的建立
例:关键字序列{ 10、18、3、8、12、2、7、3 }
5)二叉排序树上的删除
对于二叉排序树,删去树上一个结点相当于删去有序 序列中的一个记录,在删除某个结点之后依旧要保持二叉 排序树的特性。
如何在二叉排序树上删去一个结点呢?
设在二叉排序树上被删结点为*p(指向结点的指针为 p),其双亲结点为*f,设*p是*f的左孩子。 f F p P c PR C q Q s CL S QL SL
low
( 08,
( 08,
mid
14,
14,
high
55, 68, 79,
79,
23,
23,
37,
37,
46,
46,
91 )
low
55,
mid
68,
high
91 )
low mid
SAP系统18种查询标的方法
18种根据屏幕字段查找数据库表数据的技巧帮助18种根据屏幕字段查找潜在数据的技巧Dennis Barrett / 翻译:强晟********************想象一下这样的情景。
一个业务经理希望得到一个关于她的服务订单的专用报表,她给了你一个报表的草图(包括列、行、标题、分组、小计、合计等等),而“服务管理”事务屏幕中的字段就包含了她希望你在报表中显示的数据。
你该怎么做?通常的,你会检查系统中运行的,能够提供这个业务经理所需信息的现存报表(或者是已经为这个client写过的),或者可以复制和修改后能符合需要的报表。
如果没有找到,你也许会在适当的报表系统——例如,工厂维护信息系统(PMIS)——中看看是否能找到合适的。
即使这样,你仍然无法找到报表,或者无法从现存报表中找到可修改的,那只能写一个报表或者一个ABAP查询来实现这个需求。
现在,设想一下业务经理问你是否以某种方式在《创建计量单位文档事务》中增加一个小小的功能:向MDoc文本字段中粘贴相关销售订单号。
这个要求需要你创建一个增强功能。
在前面两个情形中,你都需要访问数据库表中的特定数据。
你怎么以屏幕字段做指导来找到这些数据?我们都知道与一个事务关联的信息都存储在几个(偶尔还会是很多个)相关的表里。
这样,当你需要在报表或增强功能中使用一个事务中的几个字段时,你需要找出许多事务的表并在它们之间建立关联。
这些关联通常都不会很明显。
我曾经在众多场合遇到这些情况,有时需要同时在SD、MM、IM、WM和服务管理(现在叫客户服务)等模块对多个client进行工作。
随着时间推移,我收集了同事和自己在开发中寻找需要数据的建议。
我现在来跟你分享这些技巧——共18种。
起跑线和终点线我将会介绍达成本练习“终点线”的各种各样的技巧——也就是说,定位那些在屏幕字段中存储潜在数据的表和字段。
你未必需要所有这些方法,一般来说,前四种技巧已经足够了。
我之所以写其他的技巧是因为有些字段非常难以追踪,而这些工具或许可以解决问题。
vlookup函数的18使用方法
vlookup函数的18使用方法【原创实用版3篇】目录(篇1)1.引言2.vlookup 函数的基本概念3.vlookup 函数的参数详解4.vlookup 函数的使用方法5.vlookup 函数的示例6.结论正文(篇1)1.引言vlookup 函数是 Microsoft Excel 中的一种纵向查找函数,它可以在给定的数据范围中查找某个特定值,并返回该值对应的其他列的数据。
vlookup 函数在日常工作中有广泛的应用,如数据核对、数据填充等。
本文将为大家详细介绍 vlookup 函数的使用方法和实例。
2.vlookup 函数的基本概念vlookup 函数是一种在 Excel 中使用的函数,它的主要作用是在一个给定的数据范围中查找某个特定值,并返回该值对应的其他列的数据。
vlookup 函数的语法结构为:vlookup(要查找的值,数据范围,返回列数,[匹配类型])。
3.vlookup 函数的参数详解vlookup 函数一共有四个参数,分别是:- 要查找的值:需要在数据范围中查找的值。
- 数据范围:包含要查找的值的表格范围。
- 返回列数:表示要返回的数据所在列的相对位置。
如果返回列数为1,则表示返回的是数据范围中与要查找的值相同的行的第一列数据。
- 匹配类型:可选参数,表示查找的匹配方式。
如果匹配类型为 1,表示近似匹配;如果匹配类型为 0,表示精确匹配。
4.vlookup 函数的使用方法要在 Excel 中使用 vlookup 函数,首先需要打开 Excel 表格,然后按照以下步骤操作:1.选中需要查找的对象对应的单元格;2.在公式栏中输入“vlookup”以及查找值、数据表、序列数和匹配条件;3.单击回车键即可得到查找对象。
5.vlookup 函数的示例下面举一个例子来说明 vlookup 函数的使用方法:假设有一个表格,其中包含员工的姓名、电话号码、部门等信息。
现在需要根据员工的姓名查找对应的电话号码。
java中query方法
Java中的query方法在Java中,query方法是一种常用的数据查询方法。
它用于从数据库或其他数据源中检索数据,并根据指定的条件返回结果集。
query方法可以执行各种类型的查询,包括简单的选择查询、聚合查询、连接查询等。
1. 查询语句的构建在Java中执行查询操作通常需要使用SQL语句。
SQL(Structured Query Language)是一种用于管理关系型数据库的语言。
通过使用SQL语句,我们可以指定查询的条件、返回的字段以及排序等。
例如,下面是一个简单的查询语句示例:String sql = "SELECT * FROM users WHERE age > 18";上述语句表示查询名为”users”的表中年龄大于18的所有记录。
在实际应用中,我们可以根据需要构建不同的查询语句。
2. 使用Java的query方法执行查询Java提供了各种数据库访问API,如JDBC(Java Database Connectivity),可以用于执行查询操作。
在使用JDBC执行查询之前,我们需要先建立数据库连接。
下面是一个使用JDBC执行查询的示例代码:import java.sql.*;public class QueryExample {public static void main(String[] args) {String url = "jdbc:mysql://localhost:3306/mydatabase";String username = "root";String password = "123456";try(Connection conn = DriverManager.getConnection(url, username, passw ord);Statement stmt = conn.createStatement();ResultSet rs = stmt.executeQuery("SELECT * FROM users")) {while(rs.next()) {int id = rs.getInt("id");String name = rs.getString("name");int age = rs.getInt("age");System.out.println("ID: " + id + ", Name: " + name + ", Age: "+ age);}} catch(SQLException e) {e.printStackTrace();}}}上述代码中,我们首先建立了与数据库的连接,然后创建了一个Statement对象,用于执行SQL语句。
终于找全了书法落款时间写法及查询表
终于找全了!书法落款时间写法及查询表落款,是书法创作一个要点,很多朋友在章法和准确性方面容易出现纰漏,尤其表现在落款内容硬伤颇多。
建议大家仔细阅读,下面关于书法落款时间写法。
书法作品署款中的记时有人主张用新历即公元阳历注时,强调的是笔墨书写当随时代,还有人主张沿用旧历即阴历注时,强调保持民族特色和传统习惯,其实这两种方法可以同时并用。
如果用新历记时,方法很简单,照日常应用文书写就行了。
假如用旧历记时法,那么其中讲究很多,特别是有许许多多的别称需下面我们按照落款年份、季节、月份、日期四大分类来详尽阐述落款时间的写法。
一、记年份书法作品记年采用的“干支”记年法。
“干”是“天干” ,“支”是“地支” 。
所谓“干支”是天干地支的简称。
十天干就是甲、乙、丙、丁、戊、己、庚、辛、壬、癸。
十二地支就是子、丑、寅、卯、辰、巳、午、未、申、酉、戌、亥。
以十天干与十二地支搭配记年,就成了甲子、乙丑、丙寅,, 辛酉、壬戌、癸亥,六十年一个循环,俗称“六十年花甲子” ,参加下表:1、甲子,2、乙丑,3 、丙寅,4、丁卯,5 、戊辰,6、己巳,7、庚午,8、辛未,9、壬申,10、癸酉,11、甲戌,12、乙亥,13、丙子,14、丁丑,15、戊寅,16、己卯,17、庚辰,18、辛巳,19、壬午,20、癸未,21、甲申,22、乙酉,23、丙戌,24、丁亥,25、戊子,26、己丑,27、庚寅,28、辛卯,29、壬辰,30、癸巳,31、甲午,32、乙未,33、丙申,34、丁酉,35、戊戌,36、己亥,37、庚子,38、辛丑,39、壬寅,40、癸卯,41、甲辰,42、乙巳,43、丙午,44、丁未,45、戊申,46、己酉,47、庚戌,48、辛亥,49、壬子,50、癸丑,51、甲寅,52、乙卯,53、丙辰,54、丁巳,55、戊午,56、巳末,57、庚申,58、辛酉,59、壬戊,60、癸亥二、记季节旧历分春、夏、秋、冬四个季节,即旧历正、二、三月为春季,四、五、六月为夏季,七、八、九月为秋季,十、十一、十二月为冬季。
查看建表时间
PostgreSQL: 如何查询表的创建时间?经常有人问这么个问题," 在PostgreSQL 中如何查找表的创建时间?" ,因为在其它关系型数据库中这个信息很容易得到,例如在oracel中,可以通过查询dba_objects 数据字典得到表的创建时间,如下所示。
那么在PostgreSQL 中如何查找表的创建时间呢?GOOGLE 了不少网页,大致的说法是在PostgreSQL中没有系统表存储表的创建时间信息,因此不能直接在PostgreSQL 库中找到这方面的信息,然而可以通过其它方法实现,我这里总结了两种方法。
方法一:通过查找表数据文件方式这种方法通过查找表的数据文件的方式从而确定表的创建时间,但是这种方法并不能准备查询表的创建时间,而且有时候,这种方法得到的信息还有可能是错误的,下面大致演示下。
上,面表空间对应系统上一个文件目录,每个表由一个或者多个文件组成;根据上面的结果,表test_ctime 的reltablespace值为0,表示位于所属数据库的默认表空间,注意relfilenode 值为24650。
备注:上面查出数据库francs 的默认表空间的oid 为16385。
这里之所以饶这么大圈,是为了展示postgresql 中的一些逻辑结构关系,如果自己对环境比较熟悉,可以直接定位到哪个表空间。
目录为/database/1922/pgdata1/pg_tbs/tbs_francs。
的oid。
再根据步骤1.2 的信息知道表test_ctime 的relfilenode 值为24650。
但这种方法并不准确,因为表上的操作可能导致表重新生成文件,接着演示。
的24650 变成了24655这里配置postgresql.conf 配置文件,通过记录表的DDL 信息,从而确定表的创建时间。
DDL 操作,其它的参数为日志格式的控制参数。
--2.3 查看csv 数据库日志2012-06-26 19:31:10.657 CST,"francs","francs",13753,"[local]",4fe99d61.35b9,2,"idle",2012-06-26 19:30:41 CST,3/580,0,LOG,00000,"statement: create table test_ctime_bak as select * From test_ctime;",,,,,,,,,"psql"备注:上面的信息有两个时间,第一个为log_time ,表示当前动作的执行时间,第二个时间为session_start_time 表示会话开始时间,当然也可以将整个csv 日志导到对应表中。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
18 T echniques for Locating the Underlying Data of a Screen Field Dennis BarrettDennis Barrett is an applications consultant with SAP America who focuses on Service Management/ Customer Service and the Picture this. An Operations Manager wants a special report of her service orders. She gives you a sketch of what she wants it to look like (columns, rows, headings, grouping, subtotals, totals, and the like), and points to fields on the Service Management transaction screens that have the data she wants you to show in the report.What do you do? Most likely, you would check to find any existing reports delivered with the system (or already written for this client) that provide the information the Operations Manager wants, or that can be copied and revised to fit her needs. If you don’t find any, you might then look into the appropriate reporting system — in this case, the Plant Maintenance Information System (PMIS) — to see if you can adapt it. In this case, however, you can’t find the report, and you can’t cobble one together from existing ones. You must write a report or an ABAP Query to fulfill the requirements.Now, suppose the Operations Manager asks if you can somehow add just one more little function to her Create Measurement Docu-ments transaction: paste the associated sales order number into the MDoc text field. This scenario requires you to create an enhance-ment. In both the first and second scenario, you’ll need access to specific data from the database tables. How do you find that data with just the screen fields as your guide? We all know the information associated with a transaction is stored in several (sometimes many) related tables. So, when you need several fields from a transaction for a report or an enhancement, you may need to find many of the transaction’s tables and establish the links among them. Those links are often not obvious.(complete bio appears on page 18)HomeI’ve come across these very situations on numer-ous occasions while working for several clients with the SD, MM, IM, WM, and Service Management (now called Customer Service) modules. Over time I have gathered suggestions from colleagues and developed some techniques myself to find the data I needed. I will share these techniques — 18 of them in all — with you now.The Starting Gate and Finish Line I will be presenting a wide variety of techniques for reaching the “finish line” of this exercise — namely, locating the table and field that stores the underlying data of a screen field. You’re unlikely to need all of them; you’ll probably be successful within the first four techniques. I include the remaining techniques because some fields can be very hard to chase down, and any one of these other tools just might do the trick.The Starting PointThe starting point for this set of techniques is always the Technical Information screen, because it is here that you learn the screen field’s name, and can dis-cern whether or not the underlying data object is a structure, view, or table.If the underlying data object is a table, your search is over. The field name shown on the Technical Information screen, plus this table name,arm you with the details you need. If the data object is a view, just one more click and you’ve got that table name. If the data object is a structure, you still have to unearth the name of the table. Technique #1:Check the Technical Information ScreenI always start my search for the underlying data object by getting the names of the field and Data Dictionary object from the transaction screen. Call up the Technical Information screen by positioning your cursor in the target screen field and then press-ing F1 or clicking on the ? button. This will bring up the initial Help screen. From within the Help screen, press F9 or click on the Technical info button.Take a look now at Figure 1. It shows the Technical Information screen for the Sold-to party field in the Create Standard (Sales) Order screen for Release 4.0B. You see in the “Field data” block that the Table name is KUAGV and the Field name is KUNNR.1 In Releases 4.0B and below, this screen calls the associated object a “table,” whether it’s a table, view, or structure. Notice in Figure 2 that the 4.5B release (and above) informs you that KUAGV is actually a structure.1The examples herein mention names of tables, structures, and fields that I found in my searches. You may find a different name in the same search — particularly a different structure’s name. For example, the Sold-to party field in the Sales Order initial screen may beKUAGV-KUNNR or RV45S-KUNNR (or maybe something else).I’ll show one name in this article; don’t worry if you find another.It’s a reflection of the continual enhancement of R/3, not (I hope) anerror in the article.In Releases 4.0B and below, to ascertain whether or not an object is a structure you must take one more step. Drill into the Table name field in the Technical Information screen to see the Data Dictionary screen for the object.Figure 3 shows those screens for the table VBAK, the view VIVEDA, and the structure KUAGV. Corresponding screens in Releases 4.5 and 4.6 look very similar. As you can see, the object type is easy to recognize in these screens.If the underlying object is a table, you’re home free. The information is stored in that table in the field with the same name as the one shown on the Technical Information screen. Success! When you write your report or ABAP Query, or when you program your enhancement, you can refer to the data using these table and field names.If the object is a view, then scroll to the View field in the view with the same name as the one shown in the Technical Information screen. See Figure 4; the Table and Field name associated with the View field is your goal. Success again!Figure 3The Release 4.0B Data Dictionary Screens forTable “VBAK,” View “VIVEDA,” and Structure“KUAGV”StructureStructures are Data Dictionary objects that have fields but do not carry data. A structure is Figure 4Locating the “Table” and “Field name” Associated with the “View field”TableTables store data. If your screen field points to a table,or you are able to drill down toTables, Views, and StructuresViewViews used in screens are linked groups of tables. If the field is in a view, you can drill A screen field is associated with a table, view, or structure. While each of these is a Data Dictionary object, only the table actually stores data. This is why the goal of all these techniques is to find the table that actually stores the information that you can see displayed in the screen.Figure 5The Suggested Sequence of TechniquesIf the object is a structure, then you have more digging to do, and you must proceed to one or more of the remaining 17 techniques described here. These techiques follow an order that should get you to the finish line in the fewest number of steps. Remember, as soon as you find the associated table, you’re done with the search. Look at the flowchart in Figure 5 to see my suggested sequence of techniques. Racing Toward the Finish Line: Techniques 2-13Remember, the finish line, or goal, of this exerciseis to locate the table and field names in which the underlying data for a screen field is stored. At this point, we know only that the underlying data object is a structure. Techniques 2-13, which I detailin this section, will most likely hold the answer. If techniques 2-13 do not hold the answer, try tech-niques 14-18 — the measures of last resort! I suggest you hold off trying these last five tactics until you’ve exhausted the other possibilities. If none of these 18 techniques work, you have an unusually difficult problem; I wish you good luck. I hope you find your table quickly and easily.Technique #2: Text FieldsIf the screen label is “Short text”, or the field name is STTXT, or its data element is CO_STTXT, then you are looking for the source of a text field. As Figure 6shows, the Short text field often has a “Maintain long text” icon stuck at the end that may look like a sheet of paper with a pencil. Click on that icon to get to the Long text screen.Texts are stored all over the place in R/3, but frequently in tables STXH and STXL, which are the text header and text line, respectively. Their texts are stored in raw (i.e., non-ASCII) form, so you must use function modules to get them. There are several function modules for processing these texts, including Read_Text, which reads text lines from the database. In the Long text screen, follow GoTo→Header (see Figure 7) to get the Text name, Text ID, and Text object parameters that you’ll need to execute the function module.If the field is not a text field, then you must con-tinue to search.Technique #3: “INCLUDE” TableA structure may contain one or more INCLUDEs. An INCLUDE may actually be a table or another structure. So, if the structure you are working with includes an INCLUDE, and that INCLUDE is a table that contains your field, then you have won again. For example, in a Sales Order Item Overview, the Condition Type is listed as KOMV-KSCHL, but KOMV is a structure. KOMV does contain the INCLUDE KONV, which is a table that contains the field KSCHL. That table and field are your goal, andFigure 7Retrieving the Text Name, Text ID, and Text Object Parameterswe need not go any further. If the structure doesn’t contain an INCLUDE, or if the INCLUDE is not a table, then we must keep searching. The next tech-nique you should apply is described in technique 4 because it’s easy and, quite likely, will get youyour answer.Technique #4: Reports, Queries, Infostructures If you know of any ABAP Queries, already-existing reports, or Infostructures that use the field you need, then you can dig into them to find the source table. Before you started this search, you may have found a report or query that didn’t provide the result that the Operations Manager needs, but that uses the field you are looking for. Now that you have the field name from the Technical Information screen, you can review those reports and queries to see if the search has already been done for you. If you find your field in one of those reports or queries, you can examine the code and find the table that it uses to pull that field; you will have successfully concluded your search.If you don’t find your table and field here, then you must continue searching. Technique 5 is a powerful one for those who know how to use it, and can very often find the result.You may have found a report or querythat uses the field you are looking for.Now that you have the field name, youcan review those reports and queries tosee if the search has already been donefor you. If you find your field in one ofthose reports or queries, you canexamine the code and find the tablethat it uses to pull that field, whichsuccessfully concludes your search.Technique #5: Debug WatchpointIf you are searching in Release 4.0B or above, and want to go to the heavy artillery immediately, then get the Program name (under “Screen data”) from the Technical Information dialog box and debug the program. Go to Tools→ABAP Workbench→ABAP Editor→Program=[the program name]→Debugging. Click on the Watchpoint button on the task bar and enter the program and field names into the Local watchpoint fields, then click on Enter and F8. Any change in the variable triggers the watchpoint, presenting you with the code immedi-ately below the line that changed the variable. Read the code above the watchpoint carefully, and you can probably find the name of the Data Dictionary object that the field is in. Again, it may be a table, view, or structure, but you are getting very close.Ken Greenwood (author of Teach Yourself ABAP/4 in 21 Days) says he always jumps immedi-ately to this technique if the Technical Information screen doesn’t produce the table. Ken further sug-gests that this technique finds the table right away —with the only exception being the IMPORT statement. If the watchpoint doesn’t trigger, then debug again using a breakpoint on IMPORT and you will find it in a maximum of three steps.If you can’t find the table reference you need in the code, then you must continue your search, and the next natural technique for you to use is described in technique 6.Technique #6: Value TableIf debugging didn’t give you what you need or you don’t want to debug a program, then back out to the Technical Information dialog box and double-click on the Data element field under “Field data”. This will show you the value table, if there is one. If you’re just looking for master data like customer name — whose field name is KUNNR — then a value table will probably be defined, and it will give you what you want. You’ll find that transactiondata like Order Quantity — whose field name is KWMENG — has no value table, and you get to keep looking. From here on, techniques 7-13 all have about the same likelihood of revealing your table name. Use them in any order you like. You’llprobably find that you like some more than others, so use those first.If debugging didn’t give you what youneed or you don’t want to debug aprogram, then back out to the TechicalInformation dialog box and double-clickon the Data element field under “Fielddata”. This will show you the value table,if there is one.Technique #7: “Where-Used” Data Element When R/3 moves data from one table (or structure) to another, it often (not always) moves it into a target field having the same data element as the source field. From the Technical Information dialog box, double-click on the Data element field under “Field data” and follow Utilities→Where-used List→ Table fields→Enter (see Figure 8). This will list the tables, views, and structures that use this data element. If your field is a commonly usedFigure 8“Where-used List Data element”Request Screen in Release 4.0Bone, this list may be so large that it’s hard to find your data storage location. For example, KUNNR shows up in 743 objects in Release 4.0B. An infre-quently used field may show up in fewer objects, and you can find your data source in the list.Note also that the list includes structures; some-times, lots of structures. When you drill into a field name in the list, you’ll see the table display that will identify it as a structure or a transparent table. If it’s a structure, you’ll have to keep looking.Technique #8: “Z_DATA_ELEMENT”Since the “Where-used” list for a data element generally contains so many (non-data carrying) structures, the list is not terribly useful for our purpose. Take a look at Figure 9, for example. It has 77 hits.You can create the Data Dictionary viewZ_DATA_ELEMENT, which will show only the data tables that use your data element.Figure 9Data Element “Where-used”ListFigure 10 Components of a View for Searching Data ElementsCreate the view with Tools→ABAP Workbench→ Dictionary→Objectname=Z_DATA_ELEMENT →Views→Create, then enter the values shown in Figure 10.Use this tool with Tools→ABAP Workbench→ Dictionary→Object name=Z_DATA_ELEMENT→Views→Display →Utilities→[Display data or Table contents]→DATA_ELEM=[the name of the data element you are searching for]→[Execute or F8].This view will give you a list of only the tables that use your data element.Technique #9: ViewsTransaction data is normally stored in several hierar-chically connected tables, and R/3 may have one or more views defined for the transaction you’re dealing with. You can search through those views to find other associated tables. Any one of those might store your data. For example, assume you want the Order Quantity data from the Sales order: Single-Line Overview screen. It’s listed as RV45A-KWMENG, but you find that RV45A is a structure. You already know that Order is VBAK-VBELN, so you lookfor views in the Where-used list for VBAK. View VIVEDA connects VBAK, VBUK, and VBAP, and you find KWMENG in the VBAP table. Technique #10: Logical DatabasesTables that are related in a business processare frequently connected in logical databases.The VBAK “Where-used” list for logical databases, for example, includes AAV, which also shows the connection to VBAP.Technique #11: Other Screen FieldsOne or more of the other fields in the same transac-tion may be directly connected to their database tables. If you can discover the Header table of the transaction, it may include the field you want. For example, assume you want the Sold to data from the Sales Order initial screen. It’s listed as RV45S-KUNNR, but you find that RV45S is a structure. Its data element is KUNAG, but Release 4.0B uses that data element in 276 tables, so it would be tough to find it there. On the same screen, the Order or Standard Order is listed as VBAK-VBELN. When you look up the VBAK table, you find that it also includes KUNNR.Technique #12: Application HierarchyIn 4.0B or above, go to Tools→ABAP Workbench →Overview→Data Browser. Press F4 in the empty Table name field, then click on SAP Applica-tions→Application Hierarchy. Drill down through the menu tree to find the tables associated withyour application. Your field may well be in one of those tables.Technique #13: GraphicsIn 4.0B or above, go to Tools→ABAP Workbench → Dictionary, then type in the name of a table you believe is related to your field. Follow the path Display →[Extras or Utilities]→Graphics. You’ll see a graphical representation of the selected table and its links to other tables. You can use this to see the entire family of tables related to a business object, and you may be able to find where your field is located.The Last Resort:Techniques 14-18These are the techniques of last resort, which you should turn to only if you’ve exhausted all other possibilities.Technique #14: Change RecordsR/3 allows for changes that are made to many documents to be recorded in change records, and frequently the change information includes the name of the table and field affected. If change recording is turned on, you can change the field you’re looking for in such a document, and then read the change record to find the table and field name. Depending on theR/3 release, here are some examples of menu paths to change records:•In Plant Maintenance or Service Management Technical Objects: Extras→[Display Changes or Environment]→Display ChangesOrder: Extras→Order documents→[Changes or Extras]→Display ChangesNotification: Extras→Notification documents→ChangesContracts & Planning: Environment→Changes•In Sales and DistributionOrder: Environment→ChangesDelivery: Environment→ChangesIf more than one change is shown, drill into the change you’re interested in (generally the most recent). Tables TCDOB and TCDOBT list allthe available object classes for change document creation. You can get clues there about whether your application supports change documents. Technique #15: Change DocumentsIf you can’t find the change record in your transac-tion, have a look in the change document tables CDHDR and CDPOS (now there’s a mix of English and German naming conventions: “Change Document Header” and “Change Document Position”!) as fol-lows. After you have changed and saved the field you’re searching for, open CDHDR in the ABAP Workbench dictionary, then follow Utilities→Table contents to find the change record. In the selection screen enter today’s date, time range, and your user name. It should pull the one matching record.Ctrl+C (copy) the value of CHANGENR, and use it to pull the appropriate record from CDPOS (Figure 11). This record contains the names of the table and field affected, as well as the new and old values, so you can ensure that you’re looking at the right record.Figure 11Change Table Illustration in Release 4.0BTechnique #16: SQL TraceIf all else fails, it’s time for some serious archeology. In one session, go to your transaction but don’t run it yet. In another session, go into Tools→ABAP Workbench→Test→SQL Trace→Trace On→Ok. Switch to your transaction session and run your transaction. Switch back to the trace session and click Trace off→List trace→[Execute or Ok]. You’ll have a list of all the SQL calls to the tables with their parameters. It may be easier to download it into a word processor document for searching. Use System → List→Save→Local file→unconverted→Enter→Filename=[c:\mypath\filename.doc]→Transfer. Open “filename.doc” in Word, search for your field name, and notice the tables it is associated with. It may involve detective work to determine which table actually stores the data. This approach requires an understanding of SQL commands and principles. Technique #17: Runtime Analysis Alternatively, use runtime analysis withSystem→Utilities→Runtime Analysis→Execute→[Transaction=your_transcode or Program=your_program_name]→F8. Afteryou post the transaction or complete the program, the system will return you to the Runtime Analysis screen. Choose Analyze, then Tables or Table Hit List (F6) to see all the transparent and pool tables that were accessed during the transaction. Hit List (F5) will show you all the program calls and specify the ABAP program that was running. Sometimes the Where-used list from the “Structure” display with Programs checked will list a program in which the field is associated with the database. Compare the programs in that list to those you found in the Runtime Analysis Hit List to narrow your search. Technique #18: Data ContentsFinally, extract some data from the set of tables asso-ciated with your transaction, and copy those records into a text file. Use the “Search” function in your word processor to find data flows by content where the source and destination fields may have different names and data elements. R/3 often uses internal numbers that you’d never think of, such as Object ID and Object Type, to link records. Their values, how-ever, can be quite distinctive, and you may be able to find the path of data flow by searching for the values (ignoring the field names) when you have pulled data from several transactions.For example, to find Measurement documents associated with a service order, we needed to trace the connections shown in Figure 12. There was nothing obvious about which fields linked the data.We created a service order and several Measure-ment documents in R/3. Then we pulled out the records starting with the service order numbers, and chased through the various joins to pull all the associ-ated records. While displaying each table in SE11 we used Utilities→Table contents to extract the data.Figure 12Data Path from Service Order to Measurement DocumentWe exported the records as text documents using System→List→Save→Local file and merged them all into a single Word document. We then used Word’s “Find” function to follow the data through the tables by following the value of the contents. OBJID, OBJNR, and MPOBJ contain internal numbers that “mean” nothing to the transaction, yet they linkedthe records.Helpful Hints✔ Many transactions have header informationand detail or item lines in separate linked tables. Remember that R/3 is a German product. “Kopf” is German for “head,” and “position” can be interpreted in German as “detail” or “item.” You’ll often find header/item table pairs with “K” and “P” in their names, such as VBAK and VBAP. When you are looking for linked tables containing the data for a transaction, this tip may help you identify one ifyou have the other.✔ There are small differences between R/3 Releases 3.1I, 4.0B, 4.5B, and 4.6B for the menu paths and directions used in this article. For example, Release 3.1I menus refer to the ABAP/4 (Workbench, Editor, etc.) whereas higher releases refer to ABAP. The Release 4.0B ABAP Workbench→ABAP Editor menu path shows up in Release 4.6B with the extra step ABAP Workbench→Development→ABAP Editor. The figures in this article were taken from a 4.0B system unless there was an important difference in appearance on another release. Many installations today are still using Release 3.1, and most are running 4.0 or below, so those images are important. The corresponding 4.5 and 4.6 screens are virtually identical to Release 4.0B except for Figure 2, so there’s no need to show the other figures in those releases as well.✔ Release 3.1I and below can’t execute technique 5 because they don’t have the watchpoint functionality in their debuggers, or techniques 12 and 13 because they don’t have the application hierarchy or graphics functions.ConclusionSAP’s three-tiered architecture is the backbone of an R/3 infrastructure. It’s what makes an R/3 system flexible, reliable, and open, all at the same time. It’s also what makes locating underlying data, at times, so inherently difficult. Hopefully the techniques presented here will help. Opt for the ones that you find easiest and most convenient to use. Leave the others as techniques of last resort. Some fields may still resist these techniques; there are no doubt other ways yet to chase them down. If you know of other techniques (or corrections to these techniques), please e-mail me at dennis.barrett@. AcknowledgementsThank you to the many SAP and partner consultants who gave me suggestions and feedback, and to those who reviewed this article.Dennis Barrett is an applications consultantwith SAP America who focuses on Service Management/Customer Service and the Service Provider solution. He has been consulting in computers for over 15 years, always blending applications and programming. He’s a certified ABAP programmer and often facilitates communications between business process owners and programmers. Dennis is the author of “SAP R/3 ABAP/4 Command Reference,” published by Que/MacMillan, and wrote “Customer Service ABAP Tables for Programmers,” published this spring in the PM/CS e-Newsletter, which is sent to all SAP consultants in Plant Maintenance and Customer Service. Dennis maintains a personal Web site at ~dennis.barrett, which includes copies of the PM/CS articles as well as white papers and other items of interest to ABAP programmers and CS consultants. You can reach him at dennis.barrett@.Home。