Can i create aggrecate functions

hi,
can we create aggrecate functions like max().
pl. give me the steps to do it.
thanks in advance.
regards,
kathir

When u mean create, u mean re-write the
whole function ? please elaborate

Similar Messages

  • Can't create a function in SQL windows of PL/SQL Developer.

    The function is :
    create or replace function Xgyh
    (pvc2Czy in varchar2,
    pnumYhid in number,
    pvc2Lfid in varchar2,
    pvc2Grzid in varchar2,
    pvc2Zbmid in varchar2,
    pvc2Bmid in varchar2)
    return number is
    intZxbz integer:=1;--返回值(1:正确,0:错误);
    numDxlb number;
    numGx number;
    begin
    --判断指定用户是否合法
    if pvc2Czy is null then
    intZxbz:=0;
    end if;
    if pnumYhid is not null then
    if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Lfid is not null then
    if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Grzid is not null then
    if pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Zbmid is not null then
    if pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Bmid is null then
    intZxbz:=0;
    end if;
    --取当前登陆操作员在数据权限表中权限并判断是否允许更新当前用户
    if intZxbz=1 then
    select t.更新,
    decode(t.对象类别,'用户',0,'楼房',1,'供热站',2,'子部门',3,'部门',4,'集团',5)
    into numGx,numDxlb
    from 系统_数据权限_表 t
    where t.用户=pvc2Czy
    and (t.对象类别,t.对象识别码) in
    (('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))
    and rownum=1
    order by 2,1;
    end if;
    --返回信息
    return(numGx);
    end Xgyh;
    If get rid of the where condition
    'and (t.对象类别,t.对象识别码) in
    (('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))',
    this function can be created fast.
    Thanks for you help!

    This is duplicated question.
    Can't create a function in database
    William Robertson and I have described some advices for you.
    Is my English poor?
    If you couldn't get theirs (mikerault, William Robertson et al.) and my advices,
    You can ask that on ITPUB (this is Chinese site).
    Here it is. http://www.itpub.net/
    And this site is not only for Oracle.
    I think they can help you in Chinese words.
    PS.
    I learn that
    'Gongrezhan' means the center of supplying heating to building,
    and this center is the characteristic systems in Beijing or more cold district.
    PS.2
    Your script includes simplified Chinese character-set.
    Even if you were not Chinese person,
    we all think you can understand Chinese words.

  • Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?

    If you haven't come across the workarounds thread you may find helpful tips there on this and other ways to work with Numbers 3.
    ronniefromcalifornia discovered how to bring contacts into Numbers 3. As described in this post:
    "Open Contacts
    Select all the cards you want
    Copy
    In Numbers, in a table, select cell A1
    Paste
    Boom. Works great. Even brought in the pictures. Cool."
    So instead of drag and drop, just select in Contacts, copy, and paste into Numbers
    SG

  • Can i create 23 functions in one proc

    Hi,
    Can I create 23 functions in one proc. In that functions data is manipulating at a time 6000 to 50000 records.
    Eg: 6000 time taking 2 minutes
    Will get any performance issue when I manipulate 20000- 50000 records at a time.
    There's no performance issue.
    Pls suggest me,
    -Thanks,

    Well from Pl/sql perspective you can declare any number of functions within a procedure.
    But Ennisb is right: you should be more cleare in what you try to achieve.
    AQ is really, really fast. So if these 5000, 6000 records are enqueued on a queueu you can create a job that dequeues and processes these a message at a time until the queue is empty. This job you could schedule several times using dbms_job in parallel. Then you'll find that the processing is really fast.
    Regards,
    Martien

  • How can I create a function of sound volue from time using AudioQueueBufferRef??

    I have a question how can I analyze class AudioQueueBufferRef, for creating a function of sound volue from time?? Here is what I get . there is AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex]; volume height is 2000 elements from SInt16* coreAudioBuffer = (SInt16*)fillBuf->mAudioData. so function looks like H(t*i)=coreAudioBuffer[i] where t = 1/sampleRate = 1/22050 but here is a problem. my program gets sound and uses a class AudioStreamer for this. AudioStreamer has 3000 lines when I play music from Free Internet Radio - SHOUTcast Radio - Thousands of Free Online Radio Stations. internet radio - my problem is as follows either I dont know where 85 % of sound information is or I dont know how I can analyze class AudioQueueBufferRef
    Here is the code where I analyze Buffer.
    {@synchronized(self)
    if ([self isFinishing] || stream == 0)
    return;
    inuse[fillBufferIndex] = true; // set in use flag
    buffersUsed++;
    // enqueue buffer
    AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex];
    fillBuf->mAudioDataByteSize = bytesFilled;
    // ======>in this place I analyze Buffer
    if (packetsFilled)
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, packetsFilled, packetDescs);
    else
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, 0, NULL);
    when bitRate = 24 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 1,5 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.15 so it is 15 % of all information
    as a result If buffer comes at 0.0 seconds he lasts up to 0.1 seconds.farther in my function there is no volume. second buffer comes in 0.7 seconds and lasts up to 0.8 seconds. but in reality the sound doesnt breaks. Maybe I'm doing something wrong .please tell me.
    just for comparison
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 2 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 1660 double sampleRate=asbd.mSampleRate == 44100 numberOfChannels = asbd.mChannelsPerFrame == 2 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.02 number of buffers per second float numBuffersInOneSeconds == 10 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information

    You cannot write custom commands for expressions.
    That being said, there are a couple of options:
    Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
    Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
    Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
    Norbert

  • Can't create a function into database

    The function is :
    create or replace function Xgyh
    (pvc2Czy in varchar2,
    pnumYhid in number,
    pvc2Lfid in varchar2,
    pvc2Grzid in varchar2,
    pvc2Zbmid in varchar2,
    pvc2Bmid in varchar2)
    return number is
    intZxbz integer:=1;--返回值(1:正确,0:错误);
    numDxlb number;
    numGx number;
    begin
    --判断指定用户是否合法
    if pvc2Czy is null then
    intZxbz:=0;
    end if;
    if pnumYhid is not null then
    if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Lfid is not null then
    if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Grzid is not null then
    if pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Zbmid is not null then
    if pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Bmid is null then
    intZxbz:=0;
    end if;
    --取当前登陆操作员在数据权限表中权限并判断是否允许更新当前用户
    if intZxbz=1 then
    select t.更新,
    decode(t.对象类别,'用户',0,'楼房',1,'供热站',2,'子部门',3,'部门',4,'集团',5)
    into numGx,numDxlb
    from 系统_数据权限_表 t
    where t.用户=pvc2Czy
    and (t.对象类别,t.对象识别码) in
    (('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))
    and rownum=1
    order by 2,1;
    end if;
    --返回信息
    return(numGx);
    end Xgyh;
    If get rid of the where condition
    'and (t.对象类别,t.对象识别码) in
    (('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))',
    this function can be created immediately.
    Thanks for you help!

    I read ITPUB, and understand detailed situation a little.
    The problem is not that any error occur on compiling,
    but that compiling slows down with some conditional clause(*1).
    It takes half a day or more(*2) to compile.
    I think that must hung up.
    Really? Is it really happen?
    If that is true, You had better contact Oracle Support.
    (*1)
    The additional condition is like as follows.
    and (t.MB_named_column1,t.MB_named_column2) in
    (('MB_data1',0),('MB_data2',pvc2Bmid),('MB_data3',pvc2Zbmid),('MB_data4',pvc2Grzid),('MB_data5',pvc2Lfid),('MB_data6',pnumYhid))
    Here, MB means MultiBytes.
    (*2)
    'half a day or more' is my literal translation.
    It may mean only 'very long time'.
    Message was edited by:
    ushitaki
    Added the more detailed explanation.

  • Can't create a function in database

    The function is :
    create or replace function Xgyh
    (pvc2Czy in varchar2,
    pnumYhid in number,
    pvc2Lfid in varchar2,
    pvc2Grzid in varchar2,
    pvc2Zbmid in varchar2,
    pvc2Bmid in varchar2)
    return number is
    intZxbz integer:=1;--返回值(1:正确,0:错误);
    numDxlb number;
    numGx number;
    begin
    --判断指定用户是否合法
    if pvc2Czy is null then
    intZxbz:=0;
    end if;
    if pnumYhid is not null then
    if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Lfid is not null then
    if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Grzid is not null then
    if pvc2Zbmid+pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Zbmid is not null then
    if pvc2Bmid is null then
    intZxbz:=0;
    end if;
    elsif pvc2Bmid is null then
    intZxbz:=0;
    end if;
    --取当前登陆操作员在数据权限表中权限并判断是否允许更新当前用户
    if intZxbz=1 then
    select t.更新,
    decode(t.对象类别,'用户',0,'楼房',1,'供热站',2,'子部门',3,'部门',4,'集团',5)
    into numGx,numDxlb
    from 系统_数据权限_表 t
    where t.用户=pvc2Czy
    and (t.对象类别,t.对象识别码) in
    (('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))
    and rownum=1
    order by 2,1;
    end if;
    --返回信息
    return(numGx);
    end Xgyh;
    If get rid of the where condition
    'and (t.对象类别,t.对象识别码) in
    (('集团',0),('部门',pvc2Bmid),('子部门',pvc2Zbmid),('供热站',pvc2Grzid),('楼房',pvc2Lfid),('用户',pnumYhid))',
    this function can be created immediately.
    Thanks for you help!

    I try translating from Chinese to English words including column name and data.
    But, I can't understand the Chinese word Gongrezhan, so this is Pinyin.
    And, I have not analyzed your function, yet.
    Because, I just now must go to Chinese conversation class.
    By the way, it should be that tables and columns named by multibytes is enclosed by double quotation.
    For example,
    select t.更新, -> select t."更新"
    from 系统_数据权限_表 t -> from "系统_数据权限_表" t
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements008.htm#i27561
    create or replace function Xgyh
    (pvc2Czy in varchar2,
      pnumYhid in number,
      pvc2Lfid in varchar2,
      pvc2Grzid in varchar2,
      pvc2Zbmid in varchar2,
      pvc2Bmid in varchar2)
      return number is
      intZxbz integer:=1;-- return value (1:Success, 0:Error)
      numDxlb number;
      numGx number;
    begin
      -- Check whether the assigned user is correct or not
      if pvc2Czy is null then
        intZxbz:=0;
      end if;
      if pnumYhid is not null then
        if pvc2Lfid+pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
          intZxbz:=0;
        end if;
      elsif pvc2Lfid is not null then
        if pvc2Grzid+pvc2Zbmid+pvc2Bmid is null then
          intZxbz:=0;
        end if;
      elsif pvc2Grzid is not null then
        if pvc2Zbmid+pvc2Bmid is null then
          intZxbz:=0;
        end if;
      elsif pvc2Zbmid is not null then
        if pvc2Bmid is null then
          intZxbz:=0;
        end if;
      elsif pvc2Bmid is null then
        intZxbz:=0;
      end if;
      --Check whether current database entry operator  has priviledge of updating current user. 
      if intZxbz=1 then
        select t."Update",
          decode(t."TargetClass",'User',0,'Bilding',1,'Gongrezhan',2,'Department',3,'Division',4,'Group',5)
          into numGx,numDxlb
          from "System_DatabasePriviledge_Table" t
        where t."User"=pvc2Czy
          and (t."TargetClass",t."TargetID") in
          (('Group',0),('Division',pvc2Bmid),('Department',pvc2Zbmid),('Gongrezhan',pvc2Grzid),('Bilding',pvc2Lfid),('User',pnumYhid))
          and rownum=1
        order by 2,1;
    end if;
      --Return Informations
      return(numGx);
    end Xgyh;

  • How can I create a function using TestStand variables and call it from a step's Pre-Expression?

    In one sequence I have dozens of Pre-Expressions which are almost the same thing, like this...
    Locals.tagID = (Parameters.singlePhaseEnabled ? "L" : "D") & Str(Locals.phase) & "006"
    ...and the only thing different is that three digit string at the end ("006" will vary). How can I write a function that I can call from a step's Pre-Expression so it would look something like this? ...
    Locals.tagID = MyNewFunction("006")

    You cannot write custom commands for expressions.
    That being said, there are a couple of options:
    Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
    Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
    Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
    Norbert

  • Can i create a function which can take infinite parameter.

    Can i make a function which get infinite parameter.
    like avg.

    Kamran Riaz wrote:
    Can i make a function which get infinite parameter.
    like avg.I think you'll have trouble finding anything to take infinite parameters cos that would be bigger than the universe itself.
    User defined aggregate functions example...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:335287534824285::::P11_QUESTION_ID:229614022562
    [email protected]> create or replace type StringAggType as object
      2  (
      3     theString varchar2(4000),
      4 
      5     static function
      6          ODCIAggregateInitialize(sctx IN OUT StringAggType )
      7          return number,
      8 
      9     member function
    10          ODCIAggregateIterate(self IN OUT StringAggType ,
    11                               value IN varchar2 )
    12          return number,
    13 
    14     member function
    15          ODCIAggregateTerminate(self IN StringAggType,
    16                                 returnValue OUT  varchar2,
    17                                 flags IN number)
    18          return number,
    19 
    20     member function
    21          ODCIAggregateMerge(self IN OUT StringAggType,
    22                             ctx2 IN StringAggType)
    23          return number
    24  );
    25  /
    Type created.
    [email protected]>
    [email protected]> create or replace type body StringAggType
      2  is
      3 
      4  static function ODCIAggregateInitialize(sctx IN OUT StringAggType)
      5  return number
      6  is
      7  begin
      8      sctx := StringAggType( null );
      9      return ODCIConst.Success;
    10  end;
    11 
    12  member function ODCIAggregateIterate(self IN OUT StringAggType,
    13                                       value IN varchar2 )
    14  return number
    15  is
    16  begin
    17      self.theString := self.theString || ',' || value;
    18      return ODCIConst.Success;
    19  end;
    20 
    21  member function ODCIAggregateTerminate(self IN StringAggType,
    22                                         returnValue OUT varchar2,
    23                                         flags IN number)
    24  return number
    25  is
    26  begin
    27      returnValue := rtrim( ltrim( self.theString, ',' ), ',' );
    28      return ODCIConst.Success;
    29  end;
    30 
    31  member function ODCIAggregateMerge(self IN OUT StringAggType,
    32                                     ctx2 IN StringAggType)
    33  return number
    34  is
    35  begin
    36      self.theString := self.theString || ',' || ctx2.theString;
    37      return ODCIConst.Success;
    38  end;
    39 
    40 
    41  end;
    42  /
    Type body created.
    [email protected]>
    [email protected]> CREATE or replace
      2  FUNCTION stringAgg(input varchar2 )
      3  RETURN varchar2
      4  PARALLEL_ENABLE AGGREGATE USING StringAggType;
      5  /
    Function created.
    [email protected]>
    [email protected]> column enames format a30
    [email protected]> select deptno, stringAgg(ename) enames
      2    from emp
      3   group by deptno
      4  /
        DEPTNO ENAMES
            10 CLARK,KING,MILLER
            20 SMITH,FORD,ADAMS,SCOTT,JONES
            30 ALLEN,BLAKE,MARTIN,TURNER,JAME
               S,WARD
    [email protected]>

  • How Can I Create a Function to Return to a Specific Menu on DVD Studio Pro?

    Hello, I am currently building a DVD for a TV series I created while in college, and I'm having trouble figuring out how to create a function within the DVD that lets the user select the title or menu buttons on their remotes and have that return them either to a) the main menu or b) the menu they were just at, ie episode select or chapter select. Any help is appreciated! Thanks!

    Thanks for the help. I'm still a little confused on how to get it select which menu that I would like to return to.

  • How can i create f4 functionality

    Hi frds,
    My requirement is diff plant create diff report no , but all the plant are see all the report no.
    I want to prevent for every one plant that is one plant created report no not see other plant.
    Is it possible ,Pls suggest me.
    Thanks in advance.

    HI ,
    r u using the Module Pool Program?
    If so u can add functionality in  the POV of the field.
    Other wise use the below function module.
    DATA: BEGIN OF lt_table OCCURS 0,
              dappl TYPE dappl,
              cvtext TYPE cvtext,
            END  OF lt_table,
            lt_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
      SELECT dappl cvtext FROM tdwp INTO TABLE lt_table.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield               = 'DAPPL'
        DYNPPROG               = 'SAPLIQS0'
        DYNPNR                 = '7200'
       DYNPROFIELD            = ' '
       STEPL                  = 0
       WINDOW_TITLE           =
       VALUE                  = ' '
          value_org              = 'S'
       MULTIPLE_CHOICE        = ' '
       DISPLAY                = ' '
       CALLBACK_PROGRAM       = ' '
       CALLBACK_FORM          = ' '
       MARK_TAB               =
    IMPORTING
       USER_RESET             =
        TABLES
          value_tab              = lt_table
       FIELD_TAB              =
          return_tab             = lt_return
       DYNPFLD_MAPPING        =
      EXCEPTIONS
        PARAMETER_ERROR        = 1
        NO_VALUES_FOUND        = 2
        OTHERS                 = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE lt_return INDEX 1.
      MOVE lt_return-fieldval TO p_dappl.
    With Regards,
    Sumodh.P
    Edited by: Sumodh P on Apr 21, 2010 8:06 AM

  • Acorbat Professional can not create fully functional pdf?

    This was working fine for months, until i just installed an update and now the "save as pdf" button in word 07 does not do anything (after i select i want to do a fully functional pdf). When i open professional and try and create a pdf by browsing to the word file, it says it has failed "PDF Convsersion process failed, please correct the error and retry", the message then disappears and nothing happens? The quick and simple pdf seems to work when i do it from word 07.
    I have Vista, anyone have a solution?
    O and i tried to repair it etc nothing worked.
    Word 2007, Adobe Professional 8.1.4 and Windows Vista.

    Did you try the print options I mentioned. You need to trouble shoot at the base level of the PDF creation and work your way up until the problem is found. That is why I asked about using the printer. PDF Maker (create PDF) is just a front end for the printer, thus the printer is the basic operation. Using the print-to-file just takes one more part of the process out of the picture to get to the most fundamental process. Work your way backward until things do not work and then we can possibly solve the issue.

  • Can not create planning function types (for process empty records)

    Hi! SAP Experts,
         I want to copy 0RSPL_FORMULA to another function types for processing empty records, ZRSPL_FORMULA. I checked this function type via RSPLAN, there is no error!.   But when i try to use it in planning modeler. We found the error message "Infoobject 1FORMULA is does not available in version A". Do we need to create this infoobject?... Anyone know, please let me know.
    Thanks,
    Sake

    Hi!,
    Thanks for your help but I've already put that parameter,HIDDENFORMULAVARTAB->1FORMULA, in my planning function, ZRSPL_FORMULA. I validated it and no error found. But when I go to planning modeler, in web browser, and try to create a new planning function based on ZRSPL_FORMULA. I found the problem as I mention in previous message, "infoobject 1FORMULA is not available in version A". I try to search this infoobject in my system. The result is there is no this infoobject in my system. So, my question is do i need to create it with myself? What kind of infoobject i have to create? Key Figures or Characteristics?
    Anyway, If I have to do this, why 0RSPL_FORMULA still used as normal.
    Brgds,
    Sake

  • Can I create a XSL function and use it in the Word Template

    I have a complicated logic (complicated if i have to repeat it 400 to 500 times) for determining if I should show a null expression. If the value is null or equal to 0 show N/A else show the value.
    If I have to repeat this over and over again and it turns out to need an update this would be a nightmare. But I don't have time to waste on a wild goose chase either. If I have to do something a couple thousand times i better get started basically.
    Can I create a function in the word template then call it throughout the word template for each field I have to check?
    Have a link to a tutorial that is doing this?

    If you really want to have a function, you have choice of using subtemplates (either RTF or XSL)
    You can check for steps here
    http://www.oracle.com/technetwork/middleware/bi-publisher/overview/bip-subtemplate-1-132933.pdf
    But if you have functions or use the code directly you anyway need to modify your 400-500 fields.
    i.e. either
    <?xdoxslt:ifelse(COLUMN='','NA',COLUMN)?>
    or <?call:template_name?>

  • Error while creating sql function

    I am getting the following error when i execute the below query for creatin sql function. Please let me know waht is the problem
    Major Error 0x80040E14, Minor Error 25501
    > create FUNCTION fantastic ( @deal_id , @as_of_date)
    returns @funtab table
    (issue_id int not null,
    par_amount money not null)
    as
    begin
    insert @funtab
    select a.issue_id,a.par_amount 
    from asserts as a, issue as i, issuer_rating_history h, deal d
    where h.as_of_date = @as_of_date and
     d.deal_id = @deal_id and 
    d.deal_id = a.deal_id
    a.issue_id=i.issue_id 
    return
    end
    There was an error parsing the query. [ Token line number = 1,Token line offset = 8,Token in error = FUNCTION ]
    create FUNCTION fantastic ( @deal_id , @as_of_date)
    returns @funtab table
    (issue_id int not null,
    par_amount money not null)
    as
    begin
    insert @funtab
    select a.issue_id,a.par_amount 
    from asserts as a, issue as i, issuer_rating_history h, deal d
    where h.as_of_date = @as_of_date and
     d.deal_id = @deal_id and 
    d.deal_id = a.deal_id
    a.issue_id=i.issue_id 
    return
    end

    Hello,
    See MSDN
    Differences Between SQL Server Compact and SQL Server => "User-defined functions and full text:
    Not supported" in SQL CE, so you can not create a function as in SQL Server.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

Maybe you are looking for