How to use union statement with declare & set function?

Hi Experts,
        i  have small query about how to use union statement with declare & set function?
Example as below :
DECLARE @name AS date
Declare @name2  AS date
/* SELECT FROM [2013].[dbo].[OINV] T0 */
/* WHERE */
SET @name = /* T0.DocDate */ '[%1]'
SET @name2 = /* T0.DocDate */ '[%2]'
select  '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2013.dbo.orct t1
inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2013.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]
Union
/* SELECT FROM [2014].[dbo].[OINV] T0 */
/* WHERE */
SET @name = /* T0.DocDate */ '[%1]'
SET @name2 = /* T0.DocDate */ '[%2]'
select  '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2014.dbo.orct t1
inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2014.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]

You have to create stored procedure in SQL only .
Like u must have create for Crystal .
You can execute procedure in query manager but you have to enter parameter manually..
example
Exec @Test '20140101' '20140501'
Every time user has to enter it manually in yyyymmdd format in case of date parameters.
Example
Create Proc [@Test]
as begin
DECLARE @name AS date
Declare @name2  AS date
/* SELECT FROM [2013].[dbo].[OINV] T0 */
/* WHERE */
select  '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2013.dbo.orct t1
inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2013.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between @Name and @Name2
Union
/* SELECT FROM [2014].[dbo].[OINV] T0 */
/* WHERE */
select  '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2014.dbo.orct t1
inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2014.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between
between @Name and @Name2
end

Similar Messages

  • How to use " PERFORM ", STATEMENT WITH OFFSET

    hI,
    How we use Perform statement with offset, like
      Example:   " PERFORM READ_SEGRELEASE USING INT_EDIDC+11."
    My requirement is to use Perform with Automatic length declaration.
    Automatic length declaration in PERFORM statement
    Kindly Explain and Provide some Example programm written in this situation.
    Thanks,
    P.N.Kumar

    Hiere is an example of what you probably require:
    DATA:
    lv_offset        TYPE syoffi,
    lv_length        TYPE flength,
    lv_field          TYPE string.
    lv_field  = 'This is my value: hello world'.
    lv_length = 5.
    lv_offset = 18.
    PERFORM read_segrelease USING lv_field
                                                            lv_length
                                                            lv_offset.
    *&      Form  READ_SEGRELEASE
    *       text
    *      -->P_LV_FIELD  text
    *      -->P_LV_LENGTH  text
    *      -->P_LV_OFFSET  text
    FORM read_segrelease USING    p_lv_field         TYPE string
                                                         p_lv_length      TYPE flength
                                                         p_lv_offset      TYPE syoffi.
      DATA:
      lv_result    TYPE string.
      lv_result = p_lv_field+p_lv_offset(p_lv_length).
      WRITE: / lv_result.
    ENDFORM.                    " READ_SEGRELEASE

  • How to use parameterized statements with labSQL?

    Hi everybody,
    I have a big problem with labSQL. Every statement or query I have to use in my program works correctly, but I have a performance problem when writing my data to the database. The problem is the handling of the SQL statements by the DB. The solution will be the use of parameterized statements with labSQL.
    The manual for NI Labview Database Connectivity Toolkit provides such information, but there are large differences to labSQL, and I don't get the clue. Is anybody able and would be so kind to help me? If someone has an example for using parameterized SQL statements with labSQL or the ADO methods for such stuff, please be so kind to share it with me.
    Thank you for reading all of this
    Best regards,
    Matthias

    Thank you very much for your help. I already had set up the correct SQL statement and created the parameters but got errors when executing the command object. After some tries I found that neither the SQL statement nor the parameters were the source of the error, as I had expected first.
    The problem was that I was sending the wrong data type to the execute method of the command object. It expected some variant input for the parameters. I send an array of strings, which caused an error. I casted that array to variant with the same result. But a single string to variant worked well (with only one parameter in the SQL statement). The easy solution was to cast all strings to variants, and then build an array out of them. The execute method worked with that. Now the transaction is 4 times faster than before 
    Thanks again!
    Edit:
    If someone is interested in some example VI, please let me know. I should have some time next week to build one.
    Message Edited by manicnobody on 02-26-2009 10:19 AM

  • How to Use Switch Statement with Exclusion Group (radio buttons)?

    Wouldn't you know, just when I though I'd really be making progress, I've come across another problem I can't solve. In a homeowners insurance application I am building, there is an exclusion group that needs to set the value of several variables
    I have setup in the form properties/variables. These variables take on different values depending on the users choice.  For the exclusion group, in the object pallet, I have set the binding to normal, and have checked the "Specify Item Values" check box. Also the values for the choices have been assigned 1,2,3,4,5.
    Here is my code for the change event fir the exclusion group (This is exactly what I have tried). For now, the values for the variables to take on in the different cases, are completely arbitrary.
    switch (this.change.rawValue)              // I have tried so many things here
        case "1":                                        // I have tried the caption, single quotes in all combinations
            addLivingExp = "1";
            damageOthersProperty = "2";
            liabilityIncl = "3";
            maxCoverage = "4";
            minCoverage = "5";
            persProperty = "6";
            relatedPrivateStruct = "7";
            break;
        case "2":    
            addLivingExp = "10";
            damageOthersProperty = "20";
            liabilityIncl = "30";
            maxCoverage = "40";
            minCoverage = "50";
            persProperty = "60"
            relatedPrivateStruct = "70";
            break;
        case "3":    
            addLivingExp = "100";
            damageOthersProperty = "200";
            liabilityIncl = "300";
            maxCoverage = "400";
            minCoverage = "500";
            persProperty = "600"
            relatedPrivateStruct = "700";
            break;
        case "4":    
            addLivingExp = "1000";
            damageOthersProperty = "2000";
            liabilityIncl = "3000";
            maxCoverage = "4000";
            minCoverage = "5000";
            persProperty = "6000"
            relatedPrivateStruct = "7000";
            break;   
        case "5":    
            addLivingExp = "10000";
            damageOthersProperty = "20000";
            liabilityIncl = "30000";
            maxCoverage = "40000";
            minCoverage = "50000";
            persProperty = "60000"
            relatedPrivateStruct = "70000";
            break;   
        default:   
            minCoverage= 5;   
            break;
    There must be something obvious I am missing? Eternally grateful for advice on this.
    Stephen

    There are two issues in this script:
    1. You are not using the accessor 'value' to set form variables
    2. You are not correctly getting the value of the radio button list in the switch clause
    Please see the working script below.
    Ben Walsh
    www.avoka.com
    switch (this.rawValue) 
        case "1":                                       
            addLivingExp.value                  = "1";
            damageOthersProperty.value   = "2";
            liabilityIncl.value                      = "3";
            maxCoverage.value                 = "4";
            minCoverage.value                  = "5";
            persProperty.value                  = "6";
            relatedPrivateStruct.value        = "7";
            break;
        case "2":   
            addLivingExp.value                  = "10";
            damageOthersProperty.value   = "20";
            liabilityIncl.value                     = "30";
            maxCoverage.value                 = "40";
            minCoverage.value                  = "50";
            persProperty.value                  = "60"
            relatedPrivateStruct.value        = "70";
            break;
        case "3":   
            addLivingExp.value                 = "100";
            damageOthersProperty.value   = "200";
            liabilityIncl.value                     = "300";
            maxCoverage.value                 = "400";
            minCoverage.value                  = "500";
            persProperty.value                  = "600"
            relatedPrivateStruct.value        = "700";
            break;
        case "4":   
            addLivingExp.value                  = "1000";
            damageOthersProperty.value   = "2000";
            liabilityIncl.value                      = "3000";
            maxCoverage.value                 = "4000";
            minCoverage.value                  = "5000";
            persProperty.value                  = "6000"
            relatedPrivateStruct.value        = "7000";
            break; 
        case "5":   
            addLivingExp.value                  = "10000";
            damageOthersProperty.value   = "20000";
            liabilityIncl.value                      = "30000";
            maxCoverage.value                 = "40000";
            minCoverage.value                  = "50000";
            persProperty.value                  = "60000"
            relatedPrivateStruct.value        = "70000";
            break; 
        default:  
            minCoverage.value                 = 5;  
            break;

  • How to use prepared statements with a single id

    Here is the code I am having trouble with:
    String sqlb = "INSERT INTO books.book(title)" +
                             "VALUES(?)";
                   String sqla = "INSERT INTO books.author(name,date_of_birth)" +
                             "VALUES(?,?)";
                   PreparedStatement psb = c.prepareStatement(sqlb);
                   PreparedStatement psa = c.prepareStatement(sqla);
                   psb.setString(1,book.getTitle());
                   psa.setString(1,author.getName());
                   psa.setString(2,author.getDate());
                   m = psb.executeUpdate();
                   n = psa.executeUpdate();
    After placing two book/Author objects into the database I get a table that looks something like this:
    0 AGreatBook Joe Bloggs 08-10-83
    1 BGreatBook Joe Bloggs 08-10-83
    2 AGreatBook John Smith 12-12-65
    3 BGreatBook JohnSmith 12-12-65
    Clearly this is not correct I want this:
    0 AGreatBook Joe Bloggs 08-10-83
    1 BGreatBook John Smith 12-12-65
    By the way I have placed a foreign key in book table
    Anyone know how to do this? (I am using postgres)
    regards

    http://forum.java.sun.com/thread.jspa?threadID=726820&tstart=0
    http://forum.java.sun.com/thread.jspa?threadID=726823&tstart=0

  • How to use structure pointer with « Call Library Function node » in LabVIEW

    I use GetTimeZoneInformation from kernel32.dll. It definition is :
    DWORD GetTimeZoneInformation( LPTIME_ZONE_INFORMATION lpTimeZoneInformation );
    Where
    lpTimeZoneInformation
    [out] Pointer to a TIME_ZONE_INFORMATION structure to receive the current time-zone parameters.
    http://msdn.microsoft.com/library/default.asp?url=​/library/en-us/sysinfo/base/gettimezoneinformation​...
    I don't know how to set this parameter with my cluster based on the TIME_ZONE_INFORMATION structure.
    Your help will be appreciate
    Thanks
    INKSPEC

    INKSPEC wrote:
    I use GetTimeZoneInformation from kernel32.dll. It definition is :
    DWORD GetTimeZoneInformation( LPTIME_ZONE_INFORMATION lpTimeZoneInformation );
    Where
    lpTimeZoneInformation
    [out] Pointer to a TIME_ZONE_INFORMATION structure to receive the current time-zone parameters.
    http://msdn.microsoft.com/library/default.asp?url=​/library/en-us/sysinfo/base/gettimezoneinformation​...
    I don't know how to set this parameter with my cluster based on the TIME_ZONE_INFORMATION structure.
    Your help will be appreciate
    Thanks
    INKSPEC
    If creating a wrapper DLL which does the conversion for you is not an option (I think it won't since that would require C programming and if you knew C programming you wouldn't ask this here) then you will have to create a byte array of appropriate length and just configure the Call Library Node to pass this array as an Array of unsigned bytes and as C pointer.
    On return you will have to copy out the interesting data at the right position.
    First the length of this structure would be:
    typedef struct _TIME_ZONE_INFORMATION {
    LONG Bias; 4
    WCHAR StandardName[32]; 32 * 2
    SYSTEMTIME StandardDate; 8 * 2
    LONG StandardBias; 4
    WCHAR DaylightName[32]; 32 * 2
    SYSTEMTIME DaylightDate; 8 * 2
    LONG DaylightBias; 4
    } TIME_ZONE_INFORMATION
    Total 172 bytes
    Now the fun part will be to actually get out the information. There are a number of difficulties.
    First the strings are 16 bit Unicode so if you are interested in them you will have to call a different Windows API function WideCharToMultiByte function to convert the 16bit Unicode string into an ASCII string. For this part there has been a post here:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=123821&requireLogin=False
    For the LONG values you would pick 4 bytes at the appropriate offset from the array through the Array Subset function and then typecast it into an int32 and pass that through the Swap Bytes and Swap Words functions to reverse the LabVIEW Big Endian byte swapping in the Typecast function.
    The SYSTEMTIME is a structure with eight 2 byte integers so it would be best to use Array Subset again to extract 16 bytes at the correct offset, typecast this into a cluster with eight int16 numerics and pass it through Swap Bytes too.
    You see accessing such API functions in LabVIEW directly can get easily quite a mess and that is the reason why creating a wrapper DLL to convert properly between LabVIEW datatypes and C datatypes gets soon the easier solution if you need to interface with more than one or two functions taking such complicated data structures.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to avoid data repetation when using select statements with innerjoin

    how to avoid data repetation when using select statements with innerjoin.
    thanks in advance,
    satheesh

    you can use a query like this...
      SELECT DISTINCT
             frg~prc_group1                  "Product Group 1
             frg~prc_group2                  "Product Group 2
             frg~prc_group3                  "Product Group 3
             frg~prc_group4                  "Product Group 4
             frg~prc_group5                  "Product Group 5
             prc~product_id                  "Product ID
             txt~short_text                  "Product Description
    UP TO 10 ROWS
    INTO TABLE l_i_data
    FROM
    Joining CRMM_PR_SALESG and
    COMM_PR_FRG_ROD
    crmm_pr_salesg AS frg
    INNER JOIN comm_pr_frg_rod AS prd
    ON frgfrg_guid = prdfragment_guid
    Joining COMM_PRODUCT and
    COMM_PR_FRG_ROD
    INNER JOIN comm_product AS prc
    ON prdproduct_guid = prcproduct_guid
    Joining COMM_PRSHTEXT and
    COMM_PR_FRG_ROD
    INNER JOIN comm_prshtext AS txt
    ON prdproduct_guid = txtproduct_guid
    WHERE frg~prc_group1 IN r_zprc_group1
       AND frg~prc_group2 IN r_zprc_group2
       AND frg~prc_group3 IN r_zprc_group3
       AND frg~prc_group4 IN r_zprc_group4
       AND frg~prc_group5 IN r_zprc_group5.
    reward it it helps
    Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM

  • How to use multiple statements inside the "THEN" block of CASE statement?

    Below is the code:
    SET @strTempString = case @strKeyMode
    WHEN 'AUTO/CYCLE'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'CYCLE'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'COMMERCIAL'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'ISNAP'
    THEN  set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + '  ', 2) + '  ', 2))))
    '' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType
    WHEN 'ASNAP'
    THEN  @strRefID + '|' + @strRetID
    WHEN 'MOAT'
    THEN  @strRefID + '|' + @strRetID
    else '0'
    end 
    The first 3 conditions are understandable. How to use multiple statements in 4th case?
    Here I first want to set the value as:
    set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + '  ', 2) + '  ', 2))))
    and then return the string '' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType to @strTempString. 
    Please help me remove the syntax errors.
    Thanks in advance.

    Try below SQL
    DECLARE @strKeyMode varchar(20) = 'ISNAP'
    DECLARE @SQL VARCHAR(MAX)
    DECLARE @strRefID int=1
    DECLARE @strRetID INT=2
    --FIRST WAY
    IF @strKeyMode ='AUTO/CYCLE'
    SELECT CAST(@strRefID as varchar(10))
    ELSE IF @strKeyMode ='CYCLE'
    SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
    ELSE IF @strKeyMode='ISNAP'
    SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
    ELSE
    SELECT @SQL='ABC'
    print @sql
    ----SECOND WAY
    SELECT @SQL = CASE @strKeyMode
    WHEN 'AUTO/CYCLE' THEN CAST(@strRefID as varchar(10))
    WHEN 'CYCLE' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
    WHEN 'ISNAP' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
    ELSE 'No Record'
    END
    PRINT (@SQL)
    --Prashanth

  • How to use 'UNION' between two different databaseservers

    Hello,
    Could someone help me out. I am trying to find out if and how to use 'UNION' between two different databaseservers.
    We have 2 different queries, each queries on a different database; one MySQL the other MSSQL.
    Could someone tell me how to use 'UNION' between thes 2 queries?
    Thanks in advance,
    Samir Benalla

    Hello
    You may use openrowset statement, (OPENROWSET (Transact-SQL))., but before you use this, you must configure your server
    sample:
    SELECT a.*
    FROM OPENROWSET('SQLNCLI', 'Server=Seattle1;Trusted_Connection=yes;',
         'SELECT GroupName, Name, DepartmentID
          FROM AdventureWorks2012.HumanResources.Department
          ORDER BY GroupName, Name') AS a
    UNION
         SELECT GroupName, Name, DepartmentID
          FROM AdventureWorks2012.HumanResources.Department
          ORDER BY GroupName, Name
    With this you can define a connection using native client to server Seattle1, and execute a query there, The results will be spooled on your server.
    Connectionstring
    Server=[SERVER_NAME];datasource=[YOUR DATABASE NAME];user_id=sa;password=sapassword'
    if you use FQDN on your Query, than the datasource parameter in connection string can be letf out.
    Regards
    János.
    take care of performance, it can be very slow,

  • How to use my itunes with a new pc

    how to use my itunes with a new pc?

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
    tt2

  • How to use perform statements in sap scripts

    how to use perform statements in sap scripts . and pls send me one progam for this
    thnaks
    raja

    Hi Raja,
    <b>PERFORM</b> key work is used to include subroutine in sapscript form...
    But the processing is lttle bit different form the one we use in ABAP.
    Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
    Check out the example below to see how this is used..
    <b>Definition in the SAPscript form:</b>
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    <b>Coding of the calling ABAP program:</b>
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this is clear to understand...
    Enjoy SAP.
    Pankaj Singh.

  • How to use the namespace with a parser?

    I want to use the namespace in my project. For this reason, I use a sample
    from
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
    to test my understanding.
    The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
    two files, they all use the 'title' as the element names. To solve these
    conflicts, The namespace is used to qualified the one in slideshow2.dtd.
    But the parser still complain that the 'title' in slideshow2.dtd is declared
    more than once.
    I use apache's Xerces.
    I want to know if Xereces realy support namespace spec. now, or how to use
    the namespace with a parser. Can anyone kindly tell me where to find some
    material that demo the use of namespace in Java program.
    Thanks for any help!!!
    #############FILE: slideshow2.dtd ###############
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT slideshow (slide+)>
    <!ELEMENT slide (title?, item*)>
    <!ENTITY % xhtml SYSTEM "xhtml.dtd">
    %xhtml;
    <!ELEMENT title (#PCDATA)*>
    <!ATTLIST title
    xmlns CDATA #FIXED "http://www.example.com/slideshow"
    >
    <!ELEMENT item (#PCDATA)>
    ##############FILE: xhtml.dtd #########################
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT html (head)>
    <!ATTLIST html
    xmlns CDATA #FIXED "http://www.example.com/xhtml"
    >
    <!ELEMENT head (title,style*)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT style (#PCDATA)>
    #############FILE: slideshow.xml ####################
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
    <slideshow>
    <slide>
    <title xmlns="http://www.example.com/slideshow">Wake up to
    products!</title>
    </slide>
    </slideshow>

    I want to use the namespace in my project. For this reason, I use a sample
    from
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
    to test my understanding.
    The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
    two files, they all use the 'title' as the element names. To solve these
    conflicts, The namespace is used to qualified the one in slideshow2.dtd.
    But the parser still complain that the 'title' in slideshow2.dtd is declared
    more than once.
    I use apache's Xerces.
    I want to know if Xereces realy support namespace spec. now, or how to use
    the namespace with a parser. Can anyone kindly tell me where to find some
    material that demo the use of namespace in Java program.
    Thanks for any help!!!
    #############FILE: slideshow2.dtd ###############
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT slideshow (slide+)>
    <!ELEMENT slide (title?, item*)>
    <!ENTITY % xhtml SYSTEM "xhtml.dtd">
    %xhtml;
    <!ELEMENT title (#PCDATA)*>
    <!ATTLIST title
    xmlns CDATA #FIXED "http://www.example.com/slideshow"
    >
    <!ELEMENT item (#PCDATA)>
    ##############FILE: xhtml.dtd #########################
    <?xml version='1.0' encoding='us-ascii'?>
    <!ELEMENT html (head)>
    <!ATTLIST html
    xmlns CDATA #FIXED "http://www.example.com/xhtml"
    >
    <!ELEMENT head (title,style*)>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT style (#PCDATA)>
    #############FILE: slideshow.xml ####################
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
    <slideshow>
    <slide>
    <title xmlns="http://www.example.com/slideshow">Wake up to
    products!</title>
    </slide>
    </slideshow>

  • Does anyone know step by step how to use a PC with an AppleTV?

    Does anyone know how to use a PC with an AppleTV and can this be done and if so, how?

    Welcome to the Apple Community.
    How far have you got into the set up process please.

  • How to use shared parameter on request set

    Hi
    I have a request set with two stages
    First stage contains From Date and To date where i have named the shared parameter as StartSP and EndSP
    i have to use these shared parameter in one of the query in next stage where my Type is SQL Statment and i have these two date fields From date and To date in next stage as well where i am able to retirve the values from previous stage
    based on these values i need to get the name in next parameter where my Type is SQL Statment
    select name from tablename where '02-MAR-09' > =start_Date and '29-MAR-09' <=end_Date
    I have written SQL as
    select name from tablename where StartSP > =start_Date and EndSP <=end_Date but it throws an error.
    I need the values of 02-Mar-09 and 29-Mar-09 from StartSP and EndSP
    Appreciate if any one has idea about this.

    hi user;
    please check:
    http://download-west.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/repset04.htm
    http://download-east.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/10gch609.htm
    Also you can check this search:http://www.google.com.tr/search?hl=tr&source=hp&q=How+to+use+shared+parameter+on+request+set+&meta=&aq=f&oq=
    Hope it helps
    Regard
    Helios

  • How to use track effects with new version of GarageBand

    In the version of GarageBand before this one, you could access different effects that you could manage and apply to the different tracks.  Each track had an area containing its set of effects that were either activated or deactivated.  With this removed, i am not sure how to add those same kind of effects.  I am aware of the new nobs that are provided in order to mix and edit trebles, bass, mid, etc., but i want to be able to add different effects such as voice transformer, flanger, chorus, speech enhancer, bit crusher, bass amp, track echo, track reverb, amplifier, etc.  I desperately need help finding out how to do this, as this was a major part of my mixing and producing with GarageBand, and without these given effects, i do not feel as comfortable using GarageBand.

    zachseiden wrote:
    How to use track effects with new version of GarageBand
    this may help:
    http://www.bulletsandbones.com/GB/GBFAQ.html#replacemissingtrackeffectsgbv10
    This FAQ entry offers a Minute GarageBand video tutorial
    (Let the page FULLY load. The link to your answer is at the top of your screen)

Maybe you are looking for