Len function and nvarchar

Hi we run 2012 enterprise and to be proactive i thought i'd ask the community what the len function will return on our nvarchar(30) col when our foreign partners start populating with chars that really need to occupy 2 bytes per visible char. 
I already see that len does an rtrim.   That's interesting but let's say they send a col value that occupies all 30 display positions with characters that require 2 bytes each?
Why do i ask?  First of all I see that our unicode data that contains chars that otherwise only require 1 byte count a fully populate column as len 30.  But I see max length in sql's meta data = 60.  And I will be applying the len function
to this column in some of our etl and need to anticipate correctly the behavior that i will see under any condition including a mix of chars that would otherwise occupy 1 byte together with chars that require two bytes in storage.
Depending on the answer i may need to know from the community what function I would use to count visible chars instead of used bytes?  Its the visible chars I really want to count.

As other have said: len() returns the number of characters and there is no difference between characters from Latin or Chinese scripts.
What I like to add is that is not that simple that varchar = 1 byte per character and nvarchar = 2 byte per character. In varchar characters from East Asian scripts typically take up two bytes per character; obviously you need the right collation for that.
And with nvarchar, if you use any of the new _SC collations that were added in SQL 2012, a character can take up two or four bytes. However an nvarchar(30) is not 30 characters - it's 60 bytes.
In case you use _SC collations, I should add that the characters that take up four bytes are fairly exotic. I believe that all living languages are well served by the base plane in Unicode.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems n

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

  • In the latest verision of ITunes (downloaded yesterday) I can no longer see how large (in GB's) my music library or playlists are.  This is a very valuable function and it seems to have disappeared.  Anyone know where it is?

    In the latest verision of ITunes (downloaded yesterday) I can no longer see how large (in GB's) my music library or playlists are.  This is a very valuable function and it seems to have disappeared.  Anyone know where it is?

    Go to the View menu and turn on the Status Bar. If you don't see the menus, go to the small icon with the arrow at the extreme upper left and select "Show Menu Bar":
    Regards.

  • I have just sought  to update my lightroom and am now unable to access the develop function and get a note stating that I have reduced functionality what it this about and how do I get my product back

    I have just sought  to update my lightroom and am now unable to access the develop function and get a note stating that I have reduced functionality what it this about and how do I get my product back

    Hi there
    I have version 5.7 and every time I opened it I was told that updates are available and to click on the icon to access these.  Instead it just took me to the
    adobe page with nowhere visible to update.  I then  sought to download lightroom cc and this is when I could not access the 'develop' section due to reduced
    functionality  It was apparent that my photos had been put in cc but no way to access them unless I wanted to subscribe. 
    I have since remedied the problem as  my original lightroom 5.7 icon is still available on the desktop and have gone back to that.  I do feel that this is a bit
    of a rip off and an unnecessary waste of my time though.
    Thank you for your prompt reply by the way.
    Carlo
    Message Received: May 04 2015, 04:52 PM
    From: "dj_paige" <[email protected]>
    To: "Carlo Bragagnolo" <[email protected]>
    Cc:
    Subject:  I have just sought  to update my lightroom and am now unable to access the develop function and get a note stating that I have
    reduced functionality what it this about and how do I get my product back
    dj_paige  created the discussion
    "I have just sought  to update my lightroom and am now unable to access the develop function and get a note stating that I have reduced functionality what it
    this about and how do I get my product back"
    To view the discussion, visit: https://forums.adobe.com/message/7510559#7510559
    >

  • HT4913 i am trying to get my computer and my wifes computer on my itunes match.  i did the add a computer function and it says that this computer is already associated with an apple id...if you use itunes match with your apple id etc for 90 days...please

    i did the add a computer function and it says that this computer is already associated with an apple id...if you use itunes match with your apple id etc for 90 days...please explain.  is this going to screw my wifes account up? 

    If you both have seperate iTunes Store accounts then basically, yes, it is going "screw up" your wife's account.
    iTunes Match is designed as a single-user service which is associated with one and only one iTunes Store account ID. If you have subscribed on your account and want to activate the service on another computer that is already signed in with an account the present account must be signed out and then iTunes signed into your account. This means the other computer will have complete access to your account and will only be able to make purchases on your account. iTM is not designed to be signed in and out at will. If she has apps purchased with her iTunes Store account they will not be able to be updated.

  • I would like to put Dreamweaver 8 on a new computer.  There is no "deactivate" function and the technical support person I chatted with recommended I come here.  Can I just use the serial number again?  How can I deactive?  Has anyone else run into this?

      There is no "deactivate" function and the technical support person I chatted with recommended I come here.  Can I just use the serial number again?  How can I deactive?  Has anyone else run into this?  How can I get Dreamweaver 8, which is no longer being activated by Adobe, on a new computer?  Is it even worth doing or do I need to get a new version.  What are the killer features I'm missing?

    If you manage to get it installed on your current OS, don't forget to install the 8.02 update.
    Adobe - Dreamweaver Support Center : Updaters
    Nancy O.

  • Error While uploading the Function and Function_BP

    Hello,
    I am getting the following error while uploading the Functions and Funtions_BP using the Rule Upload functions.
    com.virsa.cc.comp.Function_upload.onActionUploadFunc(Function_upload.java:302) com.virsa.cc.comp.wdp.InternalFunction_upload.wdInvokeEventHandler(InternalFunction_upload.java:150) com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420) com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132) com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335) com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143) com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321) com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713) com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666) com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250) com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149) com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62) com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53) javax.servlet.http.HttpServlet.service(HttpServlet.java:760) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386) com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364) com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039) com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265) com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) java.security.AccessController.doPrivileged(Native Method) com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104) com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    The files which i am uploading the file from the Best practises only.
    What is the reason for this error?
    Did any one get this error?
    Regards,
    Kumar Rayudu
    Edited by: Kumar Rayudu on Aug 4, 2009 12:32 PM

    Hello Kumar,
    Have you uploaded the SAP text and object files? Upload them first and then try to upload functions.
    Harleen
    SAP GRC RIG

  • How to use, Case function and Filter in Column Formula?

    Hello All,
    I am using case function and also would like to filter value to populate.
    Below is showing error :
    case
    when '@{Time}' = 'Year' then "Time"."Fiscal Year"
    when '@{Time}' = 'Quarter' then "Time"."Fiscal Quarter"
    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')
    else ifnull('@{Time}','Selection Failed') end
    Thanks, AK

    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')I dont think Filter this works here or any other data types except number.
    Try to use option Column's->Filter->Advanced->Convert this filter to SQL
    If helps mark

  • HT1218 After a recent iTunes update attempt iTunes no longer functions and the airport extreme base station is not accessable on our computer.  We still have wifi but cannot access the base station software.

    After a recent iTunes update attempt iTunes no longer functions and the airport extreme base station is not accessable on our computer.  We still have wifi but cannot access the base station software.

    Thanks for the reply. I appreciate the response. I tried that approach this evening and it didn't work for me. (Technically it worked for me, when I was hardwired into my base station, but would not work for me wirelessly, which is my main issue.)
    Again, using the approach you recommended works only if I have my ethernet cable attached to the LAN port so my computer is communicating directly to the base station through the hard wire. I am able to scan for my base station and make setting adjustments normally this way too.
    As soon as I disconnect from the LAN port and try to go wireless is where I run into problems. The Base Station's wireless network I created is available to choose in the top right corner of the monitor with all of the other available wireless devices/networks -- but the network I created does not have access to the internet. I am also unable to configure my Base Station wirelessly. When my Airport Utility tries to scan for the Base Station and Network, it cannot find any Apple Wireless Device. It's like the Wireless Network in my base station is not sending out a signal.
    Is there a way to resolve this issue?

  • Windows says "device is not functioning" and "Windows does not recognize"

    I lost my USB dock connector cable for my ipod. I just went out today and bought a brand new "Cygnett GrooveLink Strech Retractable USB Cable for iPod". I was pumped when I came home to finally be able to add music to my ipod again, but alas when I plug the iPod in, Windows pops up saying that the device is not functional and that Windows does not recognize it. I tried everything from rebooting the iPod to re-downloading iTunes and iPod updater. After searching this site for the past few hours, I figured I'd try and possibly find some real answers here. Please Help!!

    Hey everyone,
    I had the same problems all of you are having. I
    just got a 5th generation video ipod. For a few
    days, my computer a) wouldn't recognize it; b) froze
    up when I connected it; c) mistook it for a mass
    storage device ("drive E"). I bought a USB 2.0
    notebook card which didn't work either and actually
    seemed to make the problem worse because when I
    connected the iPod to it my computer froze up.
    I was very confused because my new iPod worked on my
    brother's computer--which is much older than mine but
    still recognized the iPod and connected to it.
    Then I noticed that my brother's computer is running
    an older version of the ipod software. I used his
    disk to install "Ipod Updater 2005-06-26" rather than
    the new version of the software on the Apple Web
    site. Then I plugged my iPod into a USB 1.1 port.
    To my surprise, my computer finally recognized the
    iPod and is now loading music onto it. I cannot
    believe this worked. I wonder if the latest version
    of the software is faulty in some way.
    Try it! I hope it will work for you too. You will
    need an older version of the iPod updater software,
    so borrow it from a friend with an older ipod.
    I am having this problem also...It will work fine on the 1.1 but when i plug it into the 2.0 it has trouble recognizing it...

  • Few questions about sql2008 functions and commands

    hello,
    I am learning sql2008 implementation and maintenance,I am just 2 weeks bussy.there is some questions in my mind wich I can't answer it.
    1-when I can use  USE MASTER statement
    2-can a database for example (test) have many and unlimmited file groups?
    3-what is the diferrence between file and filegroup! is the term of file means  tables in filegroup?
    4-with boundary points does mean the data type when creating partition function!
    5`what is diferrence between full text index and index,where you have to use the index and wher you have to use full text index?
    6-each filegroup must have one partition or one partition can have many filegroups in partition scheme!
    7-do you have to partition every scheme or not! where do you have to partition a scheme and where not?
    8-can you give a little example with switch operator!
    9-again do you have to partition every table and index in the real world or not!
    thanks
    johan
    h.david

    Hi,
    Let me try to answer your questions:
    You need to use USE MASTER whenever you need to do some work in the MASTER database and the database context is not that.
    Yes, a database can have many filegroups. Please check this article:
    http://msdn.microsoft.com/en-us/library/ms179316.aspx
    Please check this article:
    http://msdn.microsoft.com/en-us/library/ms179316.aspx
    As per BOL:
    boundary_value is a constant expression that can reference variables. This includes user-defined type variables, or functions and user-defined functions. It cannot reference Transact-SQL expressions.
    boundary_value must either match or be implicitly convertible to the data type supplied in
    input_parameter_type, and cannot be truncated during implicit conversion in a way that the size and scale of the value does not match that of its corresponding
    input_parameter_type. For more details check
    http://msdn.microsoft.com/en-us/library/ms187802.aspx
    For simplicity: Full-Text index is used to search in a LOB/text data in a column, index is used to speed up your queries. Please check these articles:
    http://msdn.microsoft.com/en-us/library/ms142571.aspx,
    http://msdn.microsoft.com/en-us/library/ms189271.aspx
    As per BOL: When you create a partition scheme, you define the filegroups where the table partitions are mapped, based on the parameters of the partition function. You must specify enough filegroups to hold the number of partitions. You can specify that
    all partitions map to a different filegroup, that some partitions map to a single filegroup, or that all partitions map to a single filegroup. You can also specify additional, "unassigned" filegroups in the event you want to add more partitions later. For
    more info, please check
    http://msdn.microsoft.com/en-us/library/ms188730.aspx
    8. Please read the concept of partitioning here:
    http://msdn.microsoft.com/en-us/library/ms190199.aspx and for SWITCH operator, please check the sliding window example at here:
    http://msdn.microsoft.com/en-us/library/aa964122(SQL.90).aspx
    9. It depends :) but you always will have at least 1 partition!
    I hope it helps.
    J.
    There are 10 type of people. Those who understand binary and those who do not.

  • My battery reads that it is 100% charged. However, as soon as I unplug it, it dies instantly. The battery lights are still functional, and everything else is working fine! What's wrong with my battery?

    My battery reads that it is 100% charged. However, as soon as I unplug it, it dies instantly. The battery lights are still functional, and everything else is working fine! What's wrong with my battery?

    Sounds like it may need to be replaced. Contact Apple.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • User-Defined Function and Context Manipulation

    Hi Mapping Gurus, I need your help.
    I have a user-defined function and one of my input parameter (c) is in a loop (EDI segment).  So one, if I execute my function I get:
    Exception:[java.lang.ArrayIndexOutOfBoundsException: 0]
    If I change the context or use the remove context node function it’s working but it’s always taking the first row in consideration since I'm using c[0] .  Here is the logic:
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[0]"'";
    So since c is an array [], I have tried different logic to get to the right row.
    1- I tried using another parameter (e) to pass a counter or an index to my function.  So each time it's looping, it's passing a new value to the function but I’m still getting the first row and I’m not to sure why?
    int G = Integer.parseInt(e[0]);  // e[] = My counter field
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    2- I tried using a parameter stored in the container:
    String Num;
    Num = (String)getParameter(“counter”);
    if (Num == null)  G = 0;
    else
    G = Integer.parseInt(Num);
    G = G + 1;
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    Num = "" + G;
    setParameter(e[0], Num);
    and I’m still getting the first one, look like it’s using a different container each time it’s looping so the Value is always the same?
    4- I created a new user-defined function with the container logic, then it’s working but I’m back to the same problem in my main function, it’s only looking at e[0] for my counter all the time.
    5- I tried using the Seeburger Java Variables and guess what in the main fonction, as new UDF,... and guess what, same result!
    So anybody out there that was able to get UDF's working into a multiple context scenario?
    Am I missing something?
    I will reward points and beer for any help!

    This is one of the text with passing a counter to the function to try to go to the right row in the array since I'm doing a remove context and I'm getting all the d_234's:
    public void ReadTable(String[] a,String[] b,String[] c,String[] d,String[] e,ResultList result,Container container){
    int G = Integer.parseInt(e[0]); // My counter
    String var;
    String DBTABLE = a[0];
    String lookUpField = d[0];
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    Now this one was with the internal container logic:
    int G;
    String DBTABLE = a[0];
    String lookUpField = d[0];
    String Num;
    Num = (String)getParameter(e[0]);
    if (Num == null)  G = 0;
    else
    G = Integer.parseInt(Num);
    G = G + 1;
    Num = "" + G;
    setParameter(e[0], Num);
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    And now with the Seeburger Variables:
    int G;
    try {
    VariableBean be=VariableFactory.getVariableInstance("");
    G = Integer.parseInt(String.valueOf(be.getStringVariable("yves")));
    } catch (Exception f) {
    throw new RuntimeException(f);
    String DBTABLE = a[0];
    String lookUpField = d[0];
    String WHERE_CLAUSE = "A"" = ""'"b[0]"'"" and B = ""'"c[G]"'";
    try {
    G = G + 1;
    Num = "" + G;
    VariableBean be=VariableFactory.getVariableInstance("");
    be.setStringVariable("yves",Num);
    catch (Exception f) {
    throw new RuntimeException(f);
    All 3 logics were returning always the first row or a counter of 1 if the logic is in the main ReadTable function.

  • Numbers' Functions and Formulas in Multiple Cells, Tables, and Sheets

    Hello,
    I'm stuck with specifics that center around usage, and I get the funny feeling I'm overlooking a simple detail or two.
    If I may, here goes.
    I'm working with a single spreadsheet that has several sheets within it, and each sheet has an identical table. Each table is used to record various data, and I use an additional table in a separate sheet to consolidate some of the information, so that I can track results, at a glimpse, by looking at averages, totals, etc.
    Each data table is organized for consolidation by tracking wins, ties, or losses. It is important to know that each data table only records a single win, tie, or loss along with its other applicable data. And on the actual consolidation table I am trying to tally specific data fields by the use of Numbers' functions and formulas, yet I wish to keep these tallied results organized by the determining factor of whether or not they were gathered from a table that recorded a win, a table that recorded a tie, or a table with a loss.
    To illustrate, each table contains data fields that record start time, finish time, elapsed time, the day of the week, etc. Let's say I have eight tables, and the first two are winning tables, three more are tables that record a tie, and the last three are losing tables. For example, on my consolidated data table I wish to enter a function and formula capturing which of the eight tables are wins, ties, and losses so that I can, at a glance, see how much time elapsed to obtain the wins, ties, and losses. So then, in this example, for wins I want to determine which of those wins took 20 minutes, or which of them took 15 minutes, etc. So then, out of the two wins, let's say both of them took 20 minutes each. I need the numeral 2 to be counted and recorded on the consolidation table since only two tables match the criteria. And I would do the same for all remaining data fields (e.g., start time, finish time, etc.). Just so long as everything is determined by wins, ties, and losses, and then organized by the respective data fields. Simply put, this example determines a total of two wins that meet the data field requirement of 20 minutes. Out of the eight tables (one table per sheet) any other wins would then be organized according to the specific data in the elapsed time data field on it's data table (e.g., 5 minutes, 15 minutes, etc.).
    The exact syntax structure of the functions and formula I'm unsuccessfully using follows below. It only seems to return a result of 1, and I think it is returning this value from the IF Statements. By the way, the Win, Tie, or Loss cell in each data table is cell formatted as a pop-up so I can either select None or 1. But in this example I'm basing this on the time period of 20 minutes, and out of the eight data tables I have two wins which also record the time period as 20 minutes, so I should see 2 and not 1 in the 20 minutes column of the consolidated data table. Also, I tried changing the syntax where I would type "=1" in the IF Statements, but it returned a result of =1, and if I don't include the equals sign and quotation marks the result just shows up as 1.
    My Syntax:
    IF(Trade 1::'Data Recorded (1)' '* Win', 1, IF(Trade 2::'Data Recorded (1)' '* Win',1, IF(Trade 3::'Data Recorded (1)' '* Win',1, IF(Trade 4::'Data Recorded (1)' '* Win',1, IF(Trade 5::'Data Recorded (1)' '* Win',1, IF(Trade 6::'Data Recorded (1)' '* Win',1, IF(Trade 7::'Data Recorded (1)' '* Win',1, IF(Trade 8::'Data Recorded (1)' '* Win',1, IF(COUNTIFS(Trade 1::'Data Recorded (1)' '* Time in Trade (in minutes)', "=20m")+COUNTIFS(Trade 2::'Data Recorded (1)' '* Time in Trade (in minutes)', "=20m")+COUNTIFS(Trade 3::'Data Recorded (1)' '* Time in Trade (in minutes)', "=20m")+COUNTIFS(Trade 4::'Data Recorded (1)' '* Time in Trade (in minutes)', "=20m")+COUNTIFS(Trade 5::'Data Recorded (1)' '* Time in Trade (in minutes)', "=20m")+COUNTIFS(Trade 6::'Data Recorded (1)' '* Time in Trade (in minutes)', "=20m")+COUNTIFS(Trade 7::'Data Recorded (1)' '* Time in Trade (in minutes)', "=20m")+COUNTIFS(Trade 8::'Data Recorded (1)' '* Time in Trade (in minutes)'))))))))))
    Please bear in mind that the COUNTIFS portion of the above syntax structure is something I'm already successfully using to count the totals of other things not mentioned above, and I'm hesitant to delete it since it already works to my satisfaction when I want to, for example, determine the total number of overall wins. So, just for illustration purposes, I might have an overall wins column in my consolidation table that records how many wins there are, regardless of organization by elapsed time, or any other data field. In other words, the COUNTIFS syntax structure already works to my satisfaction. I'm not sure if it's possible to alter it so that it isn't so long, but what's there does work just when counting total numbers, as just mentioned.
    In summary, I'm wondering which function I can use with the COUNTIFS function to determine which of my eight data tables are winning tables, but break those wins down further based on criteria like elapsed time, and in the above example the time elapsed is 20 minutes. As you may see above, I'm unsuccessfully using the IF function. Finally, I've looked at the function browser descriptions of things like LOOKUP, HLOOKUP, VLOOKUP, INTERSECT.RANGES, and a few others. And so far I haven't made good use of any of them the way I've done when I use the COUNTIFS function by itself when only counting overall totals. But now I must determine totals that meet certain criteria, as explained above.
    Please help if you dare (smile). This is a huge project I'm undertaking, and so as not to cause confusion I have not included all of the details. But rather, I've taken a small sampling and set it to the side for experimentation. If this small sample works out to my satisfaction I can simply copy and paste the syntax in all other respective cells in the consolidation table, changing only reference locations, and perhaps conditions or values. One thing is certain, I don't intend on giving up on it.
    Thank you for your time and advice.
    Blessings!
    Message was edited by: solo68
    Added image.

    I'd like to edit the last paragraph of my second posting, but for some reason an entirely new posting is being created when I attempt to do this. So when reading this post, please use it to replace only the last paragraph of my second post containing the four inserted images.
    Last paragraph begins:
    In closing, I need each cell in each column of each row in my consolidation table to remain as is. I have my reasons for doing this, and they all serve a specific purpose. The only exception would be the formatting of the last three rows as footer rows. Most importantly, and I should have made this abundantly clear earlier, my apologies, I need a single function and formula in cell E7 of my consolidation table that will firstly determine which data tables are winning tables while secondly and simultaneously counting which of those winning tables have elapsed times of 20 minutes. Perhaps, now this better explains why my syntax is written the way it is written. In the example I provided, if the proper function and formula were written it would result as 2 in cell E7 in my consolidation table. If there is anything else specific you need of me in order to assist me, please request it. Thank you.
    Last paragraph ends:
    Additionally, to t quinn:
    First off, thank you for returning to assist me. I really do appreciate your efforts. Please be aware that I'm avoiding going into details about each and every portion of my spreadsheet because I wish to avoid discussion that is off topic. As I stated earlier, I'm new to using these features of Numbers. My spreadsheet encompasses a much larger amount of data than I'm referring to in the example in my first post. But in my example I'm isolating just the information concerning what I'm now trying to accomplish to finish my spreadsheet project. Moreover, most of what I've done up to this point I was able to figure out on my own, or get help from watching videos on YouTube, or simply using the application help menu. Please be aware that I consulted all of these, repeatedly. I even contacted AppleCare, and was told this sort of support is not available. In spite of this, I've accomplished a great deal in my first large spreadsheet project. Please be aware that when I wrote my second post and specifically responded to you, I didn't want to be rude or ungrateful, and I still don't, but maybe the suggestions you and Hiroto made about gathering the count of wins, ties, and losses are something I've already done. I think I've done that separately. These counts are already in separate cells, and they are working fine. In my first post where I inserted only one image you can see examples of this in my consolidation table image, in cells B3 and E6. I apologize for not making this abundantly clear earlier. Furthermore, the portion of my syntax that shows the COUNTIFS is the exact way I accomplished this, and it is written the way it is written because I need separate sheets, each with their own data tables. Again, in cell E7 I need to determine which of the eight data tables that record wins are also recording 20 minutes, but I need this in a single function and formula with the result appearing only in cell E7. Once this is figured out I will adjust the syntax to do the same thing with every column (these are not shown but they exist) in my consolidation table for the last three footer rows, named Win Column Totals, Tie Column Totals, and Loss Column Totals. The last three rows being footer rows may not be necessary, and if so, I can convert them back to normal rows. Nonetheless, my consolidation table is counting the totals of all data in all data tables. This much I've already accomplished. Now I have one last function and formula I'm working on in order to determine which of the eight data tables record wins, ties, or losses while it simultaneously counts which of the wins, ties, or losses fall within certain categories like elapsed time, and this will be shown on my consolidation table only in the last three rows. Yes, I've gotten the total wins counted, and separately counted the total number of times 20 minutes was the elapsed time used, but so far, just looking at my consolidation table I don't know if the total number of times 20 minutes was used was with a win, tie, or loss. That's what I need to know now. Everything else is already accomplished. So then my consolidation table will show the totals for all data fields in my eight data tables as illustrated in cells B3 and E6. The last three rows of my consolidation table will break this down in a single function and formula with one row for wins, a second for ties, and a third for losses. And each of these respective last three rows will in the same function and formula determine if the win, tie, or loss also is one of the data fields in my eight data tables. How? By the use of columns in my consolidation table. Remember, each of my eight data tables are identical. In the example in my first post I only used one data field, elapsed time (Time in Trade), to illustrate in one column on my consolidation table what I'm trying to accomplish with all of the columns not shown in my consolidation table. Once this is figured out I can adjust it to complete the remainder of the consolidation table. Thank you, t quinn.
    To all reading this and attempting to offer assistance, if for any reason I'm still not explaining myself clearly, please continue to ask me more specific questions. I realize it's hard to communicate this way, and if Apple allowed us to upload the actual spreadsheet it would make this entire forum a better place to communicate. But that's going off topic, so let's simply focus on the matter at hand. Thank you.
    Blessings!

  • Function and Department of contactpersons - how to read the texts

    Hello,
    we use at the level of contact person the fields FUNCTION and DEPARTMENT where codes represent a function or department.
    My question is how could we read the texts in users language for the codes in this fields?
    Are there function modules we could use?
    Thank you.
    Kind regards
    Manfred

    hi,
    Use FM BUPR_CONTP_GET_DETAIL to get the codes of Function and department.
    Read the language of the user
    Pass those codes along with language to TB911 --> Departments and TB913 --> functions to get the descriptions repectively
    Regds,
    Raghu

Maybe you are looking for