18种查询表的方法_中文版

合集下载

SAP系统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@.。

SAP查询操作手册

SAP查询操作手册

SAP培训教材(报表查询)目录一、查询分类 (5)二、查询的一般技巧 (5)(一)选择界面的查询技巧 (5)单项选择 (5)多项选择 (6)动态选择 (11)保存、选择变式 (12)(二)显示内容界面的查询技巧 (14)排序 (14)筛选 (15)小计 (16)选择、保存格式 (19)三、详细方法 (21)凭证查询 (21)已记帐凭证 (21)未记帐凭证 (25)总账查询 (27)应收查询 (30)应付查询 (35)成本中心查询 (36)订单查询 (41)工号查询 (41)合同号查询 (45)主数据查询 (46)FI主数据查询 (46)CO主数据查询 (47)四、报表的导出与打印 (49)五、SAP其他小技巧 (51)显示系统信息 (51)添加到收藏夹 (52)修改字体、快速剪贴 (53)设置个人设置 (54)一、查询分类1、凭证查询2、总帐查询3、应收、应付查询4、成本中心查询(费用查询)5、订单查询(收入、成本查询)6、开发报表查询7、主数据查询二、查询的一般技巧(一)选择界面的查询技巧单项选择双击需选择的字段出现如下图所示:多项选择多项选择是查询中最常用的技巧;图标为。

1、在多项选择时如果不选任何选项则系统默认为全部选择;2、进入到多项选择内部后会有红、绿,单值、范围共四种选项;其中绿色的代表包含;红色代表不包含;A、在绿色单值输入200000则只显示客户200000B、如想查询多个客户则可以在绿色单值处多次输入C、如要查询的是一个范围在绿色范围处输入所要的范围D、在红色单值处输入20000则显示200000以外的所有客户,红色的范围也是这种选择E、高级:单击画红圈的地方会有等于、不等于、大于、小于等选项。

(在绿色单值和红色单值)F、多项选择中相关按钮的使用技巧插入行、删除选择标准、删除全部选择行、从文本文件中导入3、多项选择有两种模式A、本身包含范围:一般用于日期、科目等。

因为本身包含范围所以如要查询一个范围,不必要点选多项选择,直接输入既可。

手机IMEI码地区速查表

手机IMEI码地区速查表

手机IMEI码地区速查表来源:优机网更新时间:2012-5-6IMEI (即INTERNATIONAL MOBILE EQUIPMENT IDENTITY),中文译做「国际移动设备身分码」,它的最大功能是用来协助辨别手机身分真伪。

不过这种方法现在并不能完全起作用,因为现在有些手机完全可以自己改动IMEI,所以此篇只能做为参考手机真伪IMEI寻IMEI包含手机型号核准码同出厂序号,同型号手机核准号码一定一样,但出厂序号就永远不会一样。

如果见到两台同型号手机核准号码不一样,又或者见到两台手机出厂序号一样,各位PHONE迷就要打醒十二分精神啦,事关其中一部肯定是假的。

各PHONE迷千万不要搞错呀!IMEI大解构IMEI由15个数目字组成,响手机按「*#06#」就会弹出来,格式系123456-78-901234-5。

123456=TYPE APPROV AL CODE,即设备型号核准号码。

78=FINAL ASSEMBLY CODE,即最後装配号码。

901234=SERIAL NUMBER,即出厂序号。

5=SPARE NUMBER,即备用号码。

以下就用诺记8850,摩记V3688\\+,爱记GF768同大家示范。

Nokia 8850按下「*#06#」後,屏幕出现448901-30-233588-9,响呢度448901代表手机核准型号系8850,30代表最後装配地系响韩国,233588代表手机出厂序号,9代表备用号码。

Motorola V3688\\+按下「*#06#」後,屏幕出现448835-80-545659-6,响呢度448835代表手机核准型号系V3688\\+,80代表最後装配地系响中国,与5659代表手机出厂序号,6代表备用号码。

ERICSSON GF788按下「*#06#」後,屏幕出现490514-51-636354-0,响呢度490514代表手机核准型号系GF788,51代表最後装配地系响瑞典,636354代表手机出厂序号,0代表备用号码。

vlookup18种用法

vlookup18种用法

vlookup18种用法VLOOKUP 函数是 Excel 中最常用的函数之一,在处理大量数据时非常有用。

它可以帮助我们在一个数据表中查找指定的值,并返回相应的结果。

这个函数的用法非常灵活,可以根据不同的需求进行调整。

在本文中,我们将介绍 VLOOKUP 函数的18 种用法,希望可以帮助读者更好地理解和应用这个功能强大的函数。

1. 在单个数据表中查找指定值最常见的用法是在一个数据表中查找指定的值。

使用VLOOKUP 函数可以轻松地找到相应的结果,并将其显示在另一个单元格中。

这对于查找特定的数据行非常有用。

2. 在不同的数据表中查找指定值VLOOKUP 函数不仅适用于单个数据表,还适用于多个数据表。

我们可以使用函数将不同的数据表关联起来,并在其中查找指定的值。

这样可以大大简化数据查询和分析的过程。

3. 使用范围名称进行查找除了使用单元格引用,我们还可以使用定义的范围名称进行查找。

范围名称可以帮助我们快速识别和引用特定的数据范围,并提高公式的可读性和可维护性。

4. 查找最接近的匹配项有时候我们需要在一个数据表中查找与给定值最接近的匹配项。

VLOOKUP 函数也可以帮助我们实现这个目标。

通过指定“最接近的”参数,我们可以找到与给定值最接近的匹配项,并返回相应的结果。

5. 查找具有多个匹配项的值除了查找单个匹配项外,VLOOKUP 函数还可以查找具有多个匹配项的值。

这在处理复杂数据集时非常有用,可以让我们更好地理解和分析数据。

6. 使用多个条件进行查找在实际的数据分析中,往往需要根据多个条件进行数据查找。

VLOOKUP 函数同样可以处理这种情况。

通过使用多个参数,我们可以在一个数据表中根据多个条件进行查找,并返回满足条件的结果。

7. 忽略大小写进行查找有时候我们需要在一个数据表中进行不区分大小写的查找。

VLOOKUP 函数可以帮助我们实现这一目标。

通过指定“忽略大小写”参数,我们可以在查找时忽略文本的大小写,从而找到相应的结果。

关煞查询表

关煞查询表

关煞查询表小儿关煞,古已有之,虽历代命理学家有斥其非者,但仍能兴而不衰,深植民间,流传久远,恐亦有其存在之理;今备存于下,仅供研究者参考之;一、小儿童关煞16个:1、雷公打脑关:指遭雷击,电触,为烧伤等;2、铁蛇关:指遭蛇咬,金属撞伤等,尤其防三岁以前;3、急脚关:指患小儿麻弊,内外八字脚,腿伤及残疾;4、鬼门关:指易生疾病;5、短命关:可望文取义;6、白虎关:指腹血之疾,即腹部或血液类疾病;7、继桥关:指水厄,水患;8、夜啼关:指哭吵不停,多动症;9、四柱关:指防六亲,尤其对父母不利,主分离;10、血盆关:指水溺,凡水有“血盆照镜”之谓,可能是源于此而借指;11、阎王关:可望文取义;12、将军箭:指易遭惊吓及刺激;13、主丘关:指灾疾,即顽固疾病;14、坐命关:也指灾疾,重于多种疾病;15、百日关:指小儿在一百天以内难带养;16、落井关:指水厄、水溺;二、小儿36关煞:千日关生下来一千日以内,勿往外婆家之神明厅,并勿坐车走远方,主惊风吐殃乳之患,勿犯以免生灾,保平安;雷公关在响雷时,勿近水井边,或铁器边,防高空跌倒,小孩喜欢爬高,爬高终失危险,勿抱高空或高处弄跳等,保平安;落井关勿近井边、河边、水边、渡舟、有坑洞穴的地方去玩必险、有水厄之灾、勿近为要;鸡飞关怕看杀生,防鸡飞过头鸡啄等惊风,防之为要,以免不吉;取命关须防高空险处,勿看凶亡人,新建庙宫,建蘸,中元普渡,中元坛内皆不可接近,可保平安;白虎关一生多血光之灾,须防失跌,高空险处小心,尤其女命,生产时要特别小心,以免母子丧亡;出麻疹小心;现有预防针种,多注意可保平安;铁蛇关马路须小心谨慎,不可接近,以免危险,出疹痘小心,现有预防针可保平安;断肠关忌看杀猪羊之恐怖,保平安;短命关防夜吵闹、保平安;和尚关勿入齌坛、休入丧孝家、勿入僧寺庙见和尚,如不注意者,灾疾难免一生怕犯麻衣煞,须多注意为吉,随母入庙行香多惊;须避之,保平安;天吊关不利过山过河、行夜路不安、同时多有急难灾祸,须注意可保平安;夜啼关夜间不可出外游玩、日落西山时见天不利、夜间不可见灯光、以免小儿多啼哭、多灾病;须避之可保平安;埋儿关忌看出殡丧葬,保平安;五鬼关普渡打蘸不可近前,近前会带刑、生灾疾;忌见棺木板可保安;天狗关犯者天狗食日,皆不可看,出生四十日内,不利外出远行,也不可行夜路,以保一年四季平安;防血光破相灾可保平安;鬼门关不可远行,所有阴宫庙,勿入为吉,以免灾刑,同时勿入凶孝家为吉;撞命关难养宜过房可保平安;汤火关要时常注意火、滚汤、油、厨房内勿近为吉;容易受伤之患、应注意可保平安;直难关限内刀器利器小心可保平安;深水关勿近河边、水池边;水灾注意;犯前世父母,清明、七夕不拜,可保平安;断桥关勿过长桥,浅舟、竹笺也勿渡,勿渡舟过竹桥;摇篮车轿小心,保平安;四柱关所有修造动土、不可近前、远离为吉、俗忌坐儿童车,须小心可保平安;金锁关不可拜神契,也不利带圈,必主不安,金银铁片钱带恐入口内,或生疾病夭亡;注意可保安;百日关生下百日内,不可去外婆家,以色灾刑;生日起对百日之日勿出门,忌远行恐惊风;避之可保平安;无情关童限少去外婆家,生父母偏呼或重拜父母,保平安;急脚关勿行远方,勿看上梁、修造、动土、保平安;浴盆关三朝忌洗身沐浴,沐浴时小心保平安;将军箭必伤骨肉亲,不射他人也射自己,勿入将军爷庙入者借弓开箭,须先行制化可保平安;深水关勿近河边、水池边、水灾注意,犯前世父母、清明、七夕不拜保平安;水火关要时常注意水火滚汤、厨房内勿近、水边、火边勿近可保平安;阎王关在未上运时,所有阴宫庙、不利近前;尤其是城隍宫、俗忌做佛事功果,切不可接近可保平安; 四季关一生多病,在四季节气前,远方勿去,以免灾殃;子平论小儿关煞小儿之命,当论时辰为主;先看关煞,次看格局;日主强,财官旺,有关无煞;日干弱,财官少,常病可养;日干弱,财官多,有关有煞;又有三合,聚煞者难养;不带刑冲者,声音响亮,夜啼急性;八字有财官,生于富贵之家;偏官生于平常之家;伤官劫财,生于贫贱之家;偏官偏印偏财,主偏生庶出,不然第三四胎; 子平之法,偏官为关,偏财为煞,取生辰之数断之;水一、火二、木三、金四、土五;且如甲日庚杀,乃四、九岁;如丙见壬杀,一、六岁;如戊日甲杀,三、八岁;庚日丙杀,二、七岁;壬见戊杀,五、十岁见之;至于阴干,亦如此;无不验矣化解之法榔梅道秘制治「小儿童关百煞符」可解以上各小儿关煞;淘运阁给大家讲解小儿关煞的查询和化解方法,如有疑问请咨询淘运阁;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、下情关:春生寅酉子,夏生戌亥巳,秋生申丑亡,冬生子午推;莫让小孩看人磨刀,宜拜神明为契父,俗云:称父母为叔叔、阿姨;39、劫煞关:申、子、辰年生于四月,巳、酉、丑年生于正月,寅、午、戌年生于十月,亥、卯、未年生于七月是;小心提防钱财损失;40、血刃关:血光关凡正月生于丑时,二月生于未时,三月生于寅时,四月生于申时,五月生于卯时,六月生于酉时,七月生于辰时,八月生于戌时,九月生于巳时,十月生于亥时,十一月生于午时,十二月生于子时是;易有意外血光之灾,或车祸及撞伤,用本命钱或车厄钱制化;41、基败关:凡正、二、三月生于未、戌、亥时,四、五、六月生于子、辰、巳时,七、八、九月生于丑、申、酉时,十、十一、十二月生于寅、卯、午时是;出生后身体状况差、容易营养不良,忌看盖房子、打地基,宜拜神明为契子、或注意肠胃方面的治疗便能转危为安;黄历解秘※捉拿夜啼鬼:以烧过火之柴头削平,用朱砂写字于柴上;拨火杖、拨火杖、天上五雷公、差来作神将,捉拿夜啼鬼,打杀不许放,急急如律令敕,将柴书就、晚间放在小儿床头,男左女右、勿惊扬、恐不灵,明早宝烛送出门外;二、下面简略介绍: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、埋儿关:勿看出山凶丧,保平安;年支见时支小儿关煞表月支见时支小儿关煞表日干见时支小儿关煞表。

18个查找函数

18个查找函数

18个查找函数查找函数是计算机编程中常用的工具之一,用于在给定数据集中快速找到目标元素。

这些函数广泛应用于各种编程语言和领域,包括数据处理、数据库查询、图形算法等。

本文将介绍18个常见的查找函数,并逐步回答与之相关的问题。

1. 线性查找(Linear Search)线性查找是最简单的一种查找方法,它逐个地比较目标元素与数据集中的每个元素,直到找到目标或遍历完整个数据集。

但是,线性查找的时间复杂度较高,适用于小规模数据集或未排序的数据。

问题1:线性查找的时间复杂度是多少?答:线性查找的时间复杂度为O(n),其中n是数据集的大小。

2. 二分查找(Binary Search)二分查找是一种高效的查找算法,要求数据集必须是有序的。

它通过将数据集分成两半,并与目标元素进行比较,从而逐步缩小查找范围。

每次比较都可以将查找范围缩小一半,因此该算法的时间复杂度较低。

问题2:二分查找要求数据集必须是有序的吗?答:是的,二分查找要求数据集必须是有序的,这是保证算法正确性的前提。

3. 插值查找(Interpolation Search)插值查找是对二分查找的改进,它根据目标元素与数据集中最大和最小元素的关系,估算目标所在位置,并逐步逼近目标。

这种方法在被查找的数据集分布较为均匀时能够显著提高查找效率。

问题3:何时应该使用插值查找而不是二分查找?答:当被查找的数据集分布较为均匀时,插值查找能够提供更好的性能。

而对于分布不均匀的数据集,二分查找可能更适用。

4. 斐波那契查找(Fibonacci Search)斐波那契查找是一种利用斐波那契数列的性质进行查找的算法。

它类似于二分查找,但将查找范围按照斐波那契数列进行划分。

这种方法在数据集较大时能够降低比较次数,提高查找效率。

问题4:为什么使用斐波那契数列进行划分?答:斐波那契数列具有递增的性质,能够将查找范围按照黄金分割比例进行划分,使得划分后的两部分大小接近,提高了查找的效率。

sql从所有表中查询关键字的方法

sql从所有表中查询关键字的方法

sql从所有表中查询关键字的方法(原创版4篇)目录(篇1)1.SQL 简介2.查询关键字的方法3.示例正文(篇1)1.SQL 简介SQL(Structured Query Language,结构化查询语言)是一种用于管理关系型数据库的编程语言。

它可以用于查询、插入、更新和删除数据库中的数据,还可以用于创建和修改数据库表结构。

SQL 具有丰富的功能和高度的灵活性,广泛应用于各种数据库管理系统,如 MySQL、Oracle、SQL Server 等。

2.查询关键字的方法在 SQL 中,查询关键字的方法主要是使用 SELECT 语句。

SELECT 语句可以从数据库表中检索出满足条件的数据。

下面是一个简单的 SELECT 语句的语法:```SELECT column1, column2,...FROM table_nameWHERE condition;```其中,column1、column2 等表示要查询的列名,table_name 表示要查询的表名,condition 表示查询条件。

3.示例假设我们有一个名为“students”的数据表,表中有以下列:id(学生 ID)、name(学生姓名)、gender(学生性别)和 age(学生年龄)。

现在,我们想要查询所有年龄大于等于 18 岁的学生的姓名和年龄。

可以使用以下 SQL 语句:```SELECT name, ageFROM studentsWHERE age >= 18;```这条语句表示:从“students”表中选择“name”和“age”两列,并且年龄大于等于 18 的所有学生的数据。

查询结果将显示满足条件的学生的姓名和年龄。

需要注意的是,在编写 SQL 查询时,要根据实际情况选择合适的表名、列名和条件,以获得准确的查询结果。

目录(篇2)1.SQL 简介2.查询关键字的方法3.实例演示正文(篇2)【1.SQL 简介】SQL(Structured Query Language,结构化查询语言)是一种用于管理关系型数据库的编程语言。

vlookup函数的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 函数的使用方法:假设有一个表格,其中包含员工的姓名、电话号码、部门等信息。

现在需要根据员工的姓名查找对应的电话号码。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

(sap-abap)18种根据屏幕字段(2009-06-05 17:22:43)想象一下这样的情景。

一个业务经理希望得到一个关于她的服务订单的专用报表,她给了你一个报表的草图(包括列、行、标题、分组、小计、合计等等),而“服务管理”事务屏幕中的字段就包含了她希望你在报表中显示的数据。

你该怎么做?通常的,你会检查系统中运行的,能够提供这个业务经理所需信息的现存报表(或者是已经为这个client写过的),或者可以复制和修改后能符合需要的报表。

如果没有找到,你也许会在适当的报表系统——例如,工厂维护信息系统(PMIS)——中看看是否能找到合适的。

即使这样,你仍然无法找到报表,或者无法从现存报表中找到可修改的,那只能写一个报表或者一个ABAP查询来实现这个需求。

现在,设想一下业务经理问你是否以某种方式在《创建计量单位文档事务》中增加一个小小的功能:向MDoc文本字段中粘贴相关销售订单号。

这个要求需要你创建一个增强功能。

在前面两个情形中,你都需要访问数据库表中的特定数据。

你怎么以屏幕字段做指导来找到这些数据?我们都知道与一个事务关联的信息都存储在几个(偶尔还会是很多个)相关的表里。

这样,当你需要在报表或增强功能中使用一个事务中的几个字段时,你需要找出许多事务的表并在它们之间建立关联。

这些关联通常都不会很明显。

我曾经在众多场合遇到这些情况,有时需要同时在SD、MM、IM、WM和服务管理(现在叫客户服务)等模块对多个client进行工作。

随着时间推移,我收集了同事和自己在开发中寻找需要数据的建议。

我现在来跟你分享这些技巧——共18种。

起跑线和终点线我将会介绍达成本练习“终点线”的各种各样的技巧——也就是说,定位那些在屏幕字段中存储潜在数据的表和字段。

你未必需要所有这些方法,一般来说,前四种技巧已经足够了。

我之所以写其他的技巧是因为有些字段非常难以追踪,而这些工具或许可以解决问题。

起点这套技巧的起点通常是技术信息屏幕,因为你可以从这里知道屏幕字段的名字,并且辨别出这个潜在数据对象是不是一个结构、视图或者表。

如果潜在数据对象是一个表,你的查找就结束了。

字段名称显示在技术信息屏幕中,还包括了表名称,都是你需要的细节。

如果数据对象是一个视图,只需要再点击一下就能得到表名称。

如果数据对象是个结构,你还不得不需要继续发掘表的名称。

技巧一:检查技术信息屏幕我通常从事务屏幕中开始搜寻潜在数据对象——如字段和数据字典对象的名字。

如果想调出技术信息屏幕,首先将光标定位在目标屏幕字段上,然后按F1或者点击?按钮图标,这将打开初始帮助屏幕,在这个帮助屏幕中,按F9或者点击技术信息按钮。

Figure 1 The Release 4.0B Technical Information Screen for the “Sold-to party” Field图1 在发行版4.0B中关于“售达方”字段的技术信息屏幕现在看一下图一,它显示了在发行版4.0B中,创建标准(销售)订单屏幕的售达方字段的技术信息屏幕。

你可以看到,在“字段数据”块中,表名称是KUAGV、字段名称是KUNNR注1。

在发行版4.0B和以前的版本中,这个屏幕把相关对象都称为“表”,而不管它是个表、视图还是结构。

注意图二中,在4.5B (及以后版本)中,提示你KUAGV实际上是个结构(译注:在我们用的ECC5版中没有区分,SAP又退化了,直到双击查看对象时才显示出来它是表、结构还是视图)。

Figure 2 The Release 4.5B Technical Info rmation Screen for the “Sold-to party” Field图二在发行版4.5B中关于“售达方”字段的技术信息屏幕注1 这里的例子提及了在我的研究中找到的表、结构和字段的名字。

你可能在相同的研究中发现一个不同的名字——尤其是不同的结构名称。

例如,在销售订单初始屏幕中售达方字段可能是KUAGV-KUNNR或者RV45S-KUNNR(还可能是其他名字)。

我在文章中只写其中一个,但是如果你发现了另外的名字也不必担心。

它是R/3系统持续改进的一个反映,并不是(至少我希望不是)文档中的错误。

在发行版4.0B和以前的版本中,为了确定一个对象是否是一个结构,你必须多经过几步。

深入技术信息屏幕的表名字段,到数据字典屏幕查看对象(译注:ECC5也是这样)。

Figure 3 The Release 4.0B Data Dictionary Screens for Table “VBAK,” View “VIVEDA,” andStructure “KUAGV”图三发行版4.0B中数据字典屏幕显示的表“VBAK”,视图“VIVEDA”和结构“KUAGV”.图三显示了表VBAK、视图VIVEDA、结构KUAGV的屏幕,在发行版4.5和4.6中,相应的屏幕也非常类似。

就像你看到的,对象类型在这些屏幕中非常容易辨认。

如果潜在对象是一个表,你就相当轻松了。

存储在那个表的字段的信息跟在技术信息屏幕中显示的名字完全相同。

成功!当你写报表、ABAP查询或者增强功能程序的时候,你可以直接使用这些表和字段名来获取数据。

如果对象是一个视图,在字段信息列表中找到与技术信息屏幕显示相同名字的视图字段。

看图四,与视图字段关联的表和字段名就是你的目标。

又成功了!图四定位与“视图字段”关联的“表”和“字段名”如果对象是个结构,你还有许多挖掘工作要做,你必须执行下面描述的17个技巧中的一个或多个,这些技巧的排列顺序有助于你以最少的步骤到达重点。

记住,当你发现关联表的时候就完成了查找。

打开图五中画的流程图,看看我对这些技巧使用顺序的建议。

图五建议的技巧使用顺序向终点冲刺:技巧 2-13记住,本练习的终点或者说目标,是定位屏幕字段中对应的存储了潜在数据的表和字段名。

从这一点来说,我们只知道潜在数据对象是一个结构。

我在这一节中详细描述的技巧2至13,很可能包含了答案。

如果技巧2至13仍未找到结果,尝试技巧14至18——这是最后的手段了!我建议你在完全排除了其他可能性之后再去尝试这五种策略。

如果这18种技巧都不奏效,你就是遇到了一个不同寻常的困难问题,我只能祝你好运。

我希望你快速而轻松的找到你的表。

技巧二:文本字段图六点击“维护长文本”按钮到达长文本屏幕如果屏幕标签是“短文本”,或者字段名是STTXT,或者它的数据元素是CO_STTXT,你就按图六所示去找文本字段的源头,短文本字段的后面通常紧接着一个“维护长文本”按钮,看上去象一张纸和一支笔,点击这个按钮打开长文本屏幕。

在R/3中文本存在各种地方,但是通常是表STXH和STXL中,分别是文本标题和文本行。

它们的文本都以raw(例如,非ASCII码)形态存储,所以你必须使用功能模块来取得它们。

有几个功能模块来处理这些文本,包括Read_Text,从数据库读文本行。

在长文本屏幕,通过转到→表头(看图七)来访问你在执行功能模块时需要的文本名称,文本ID和文本对象参数。

图七获得文本名称,文本ID和文本对象参数如果这个字段不是一个文本字段,你必须继续查找。

技巧三:“INCLUDE”表一个结构可能包含一个或多个INCLUDEs。

一个INCLUDE可能是一个实际的表或其他结构。

所以如果你的工作结构包含了INCLUDE,而这个INCLUDE是一个包含了你所需字段的表,就又胜利了。

例如,在销售订单项目概览中,条件类型列出的是KOMV-KSCHL,但是KOMV是一个结构。

KOMV包含了INCLUDE KONV,它是一个包含了KSCHL字段的表。

这个表和字段是你的目标,我们就不需要再做其他的了。

如果这个结构并不包含INCLUDE,或者INCLUDE不是一个表,我们必须继续查找。

你应该使用的下一个技巧在技巧四中说明,因为它简单,并且很可能,将获得你的结果。

技巧四:报表,查询,信息结构如果你知道ABAP查询,现存报表或者信息结构使用了你需要的字段,你可以挖掘它们来找到源表。

在你开始查找以前,你可能发现一个报表或查询没有提供那位业务经历所需的结果,但是它使用了你要找的字段。

现在你可以从技术信息屏幕中获得字段名,你可以看看这些报表和查询是否已经替你找到了所需的字段。

如果你在这些报表或查询中找到你的字段,你可以研究代码找到列出那个字段所使用的表,你将成功的结束查找。

如果在这里还没有找到表和字段,你必须继续查找。

技巧五在我们所知的这些方法中是一个强有力的工具,经常可以找到结果。

你可能发现一个报表或查询包含了你要找的字段。

现在已经有了字段名,你可以看看这些报表或查询看看是否已经替你找到了所需的字段。

如果你在这些报表或查询中找到了字段,你可以检查代码找到列出那个字段的表,你将成功的结束查找。

技巧五调试观察点如果你在4.0B及以上版本中,想要立刻深入了解,不妨直接从技术信息对话框中获取程序名称(在ABAP 工作台 “屏幕数据”下),然后进行调试。

到工具→ → ABAP 编辑器→ 程序=[输入程序名称] → 调试。

点击人物栏上的观察点按钮,在本地观察点字段中输入程序和字段名称,然后按回车或F8。

这些变量的变化都会触发观察点,立即把你引导到改变变量的下一行代码。

仔细读观察点上面的代码,你也许会发现数据字典对象所在字段的名字。

或许它仍然可能是表、视图或者结构,不过你已经非常接近了。

(译注:在ECC5中,已经不必这么麻烦了,程序运行到任何时候在事务码栏输入/h就可以启动调试,不过对于标准程序来说,用此方法找到所需表和字段基本上是MissionImpossible,标准程序的层次嵌套实在太多了,而且读写数据库基本上都是在函数中,要一层一层的追踪到函数,需要极大的耐心和毅力。

)Ken Greenwood(《21天自学ABAP/4》的作者)说,他经常在技术信息屏幕不显示表名称的时候立即使用此技巧。

Ken还提到这个技巧总能找到表——只有使用IMPORT语句时是个例外。

如果观察点没有被触发,就在IMPORT上再次用断点调试,这样最多只需要三步就能找到它。

如果你无法在代码中找到你需要的表,还必须继续查找,下一个简单的方法就在技巧六中说明。

技巧六值表如果调试无法给你想要的,或者你不想调试一个程序,就返回技术信息对话框,双击“字段数据”下的数据元素字段。

如果有值表的话,这样就会把值表显示出来。

如果你只想找主数据,例如客户名称——字段名是KUNNR——值表通常都会被定义,它会给你想要的。

你会发现事务数据如订单数量——字段名是KWMENG——没有值表,你得继续找。

从下面开始,技巧7至13对你找到表名都有类似的启迪作用,可以按任意顺序使用它们。

你可能发现自己比较喜欢某些方法胜过其他的,那就优先使用它们。

相关文档
最新文档