Insert query for insert all data into table in vb6 but it insert 1 row in table

This is My insert query in vb6 but it insert 1 row in table
But i want insert all data in the table which contain the id =1.
Note that billtabsuport is blank
i want solution for this
strSQL = " select * from billtabsuport1 where StockID=" & lblid.Caption
Set DBrecordset = DBConnection.Execute(strSQL)
strSQL = " Insert into billtabsuport values('" & DBrecordset("StockID") & "','" & DBrecordset("C_Name") & "','" & DBrecordset("C_Add") & "','" & DBrecordset("C_Mobile") & "','" & DBrecordset("Invoice_No") & "','" & DBrecordset("Date") & "','" & DBrecordset("Order_No") & "','" & DBrecordset("T_Name") & "','" & DBrecordset("Dest") & "','" & DBrecordset("D_Date") & "','" & DBrecordset("Tyres_Serial_No") & "','" & DBrecordset("P_Desc") & "','" & DBrecordset("PR") & "','" & DBrecordset("Branded_NonBranded") & "','" & DBrecordset("Claim_No") & "','" & DBrecordset("Qty") & "','" & DBrecordset("U_Price") & "','" & DBrecordset("I_Value") & "','" & DBrecordset("V_Rate") & "','" & DBrecordset("V_Amt") & "','" & DBrecordset("Size") & "','" & DBrecordset("Pattern") & "','" & DBrecordset("TypesOfStock") & "','" & DBrecordset("TypesOfTube_Flap") & "','" & DBrecordset("VatAmount") & "')"
DBConnection.Execute (strSQL)

The syntax for inserting from one set of tables to a new table is:
insert into newtable
(field1, field2, etc)
select somefield1, somefield2, etc
from some other tables
where whatever

Similar Messages

  • Want to insert a XSL file's data into a column of type SYS.XMLTYPE??

    Hello Friends
    I want to insert a XSL file's data into a column of a table of type SYS.XMLTYPE. Following is the XSL which i want to add into a table please help in.....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:fn="http://www.w3.org/2005/xpath-functions">
         <xsl:output method="html" encoding="UTF-8" />
         <xsl:template match="clinical_study">
         <xsl:variable name="status">
              <xsl:apply-templates select='overall_status' />
         </xsl:variable>
    <html>
    <head>
    <title>Summary</title>
    <link href="merckcancer.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
         <div id="trialtop" class="trialtop">
              <div id="trialtophead" class="trialtophead">
                   <H1>Summary</H1>
              </div>
    <!-- start of trial body-->
         <div id="trialmiddle" class="trialmiddle">
                             <span class="trialtitle1"><xsl:apply-templates select='brief_title'/></span>
                   <span class="tealbold">Official Title: </span><xsl:apply-templates select='official_title' />
                   <span class="tealbold" title="ClinicalTrials.gov Identifier">NCT Id: </span><xsl:apply-templates select='//nct_id'/>
    <span class="tealbold">Conditions: </span><xsl:for-each select="//condition[position()!=last()]"><xsl:value-of select="normalize-space(.)" /><xsl:text>, </xsl:text></xsl:for-each>
    <xsl:for-each select="//condition[position()=last()]"><xsl:value-of select="normalize-space(.)" /></xsl:for-each>
    <span class="tealbold">Phase: </span><xsl:apply-templates select='phase' />
    <span class="tealbold">Status: </span><xsl:value-of select="$status" />
    <span class="tealbold">Interventions: </span><xsl:for-each select="//intervention[position()!=last()]"><xsl:value-of select="normalize-space(intervention_type)" />: <xsl:value-of select="normalize-space(intervention_name)" /><xsl:text>, </xsl:text></xsl:for-each><xsl:for-each select="//intervention[position()=last()]"><xsl:value-of select="normalize-space(intervention_type)" />: <xsl:value-of select="normalize-space(intervention_name)" /></xsl:for-each>
    <xsl:apply-templates select='eligibility'><xsl:with-param name="type">short</xsl:with-param></xsl:apply-templates>
    </div><!-- end of middle -->
    </div><!-- end of top-->                         
    <div id="detail" class="detail">
         <div id="detailtophead" class="detailtophead">
              <H1>Details</H1>
         </div>
    <!-- end of detailtop-->
    <!-- start of detail body-->
    <div id="detailmiddle" class="detailmiddle">
    <span class="trialtitle2">Trial Description:</span>
         <span class="trialtitle4"><xsl:apply-templates select='brief_summary/textblock' /></span>
         <span class="trialtitle1">Eligibility: </span>
              <xsl:apply-templates select='eligibility'><xsl:with-param name="type">long</xsl:with-param></xsl:apply-templates>
    </div><!--end of detail middle-->
    </div><!-- end of detail top-->
    <div id="enroll" class="enroll">
    <div id="enrolltophead" class="enrolltophead">
    <H1>Enrollment</H1>
    </div>
    <!-- end of enroll top head-->
    <!-- start of enroll body-->
    <div id="enrollmiddle" class="enrollmiddle">
    <xsl:choose>
                                       <xsl:when test="$status = 'Recruiting'">
         This study has participating centers in a number of locations.
         To take the next step in learning more about participating in this clinical study please call one of these trial contacts.<p/>
         The trial contacts will know this study as <span class="tealbold"><xsl:apply-templates select='//org_study_id'/></span>
         or may know the study under the ClinicalTrials.gov identifier <span class="tealbold"><xsl:apply-templates select='//nct_id'/></span>.<p/>
         <p/>
                                       <xsl:apply-templates select='overall_contact'/>
                                       <xsl:for-each select="location">
                                            <xsl:call-template name='location'/><p/>
                                       </xsl:for-each>
                                       </xsl:when>
                                       <xsl:otherwise>
         This study is not currently Recruiting, it is <xsl:value-of select="$status" />.
                                       </xsl:otherwise>
                                       </xsl:choose>
    </div><!--end of enroll middle-->
    </div><!-- end of enroll -->
    <div id="credit" class="credit">
    <div id="credittophead" class="credittophead">
    <H1>Credits</H1>
    </div>
    <!-- end of credit top head-->
    <!-- start of credit body-->
    <div id="creditmiddle" class="creditmiddle">
                                  Information about this trial has been gathered from ClinicalTrials.gov. Please see
                                  <a>
                                       <xsl:attribute name="href" >
                                            /ctcpub/redirect.jsp?redirectURL=http://ClinicalTrials.gov
                                       </xsl:attribute>
                                       ClinicalTrials.gov
                                  </a> for more complete information.<p/>
                                  <xsl:apply-templates select='required_header/download_date'/><p/>
                                  <a>
                                       <xsl:attribute name="href" >
                                            /ctcpub/redirect.jsp?redirectURL=<xsl:apply-templates select='required_header/url'/>
                                       </xsl:attribute>
                                       <xsl:apply-templates select='required_header/link_text'/>
                                  </a> <p/>
                                  This trial data was last updated on <xsl:apply-templates select='//lastchanged_date'/><p/>
    </div><!--end of credit body-->
    </div><!--end of credit-->
    </body>
    </html>
    </xsl:template>
    <xsl:template match="brief_title">
              <span class="trialtitle"><xsl:value-of select="normalize-space(.)" /></span>
         </xsl:template>
         <xsl:template match="official_title">
              <span class="tealbold">Official Title: </span>     <xsl:value-of select="normalize-space(.)" />
         </xsl:template>
         <xsl:template match="phase">
              <span class="tealbold">Phase: </span> <xsl:value-of select="normalize-space(.)" />
         </xsl:template>
         <xsl:template match="overall_status">
              <xsl:value-of select="normalize-space(.)" />
         </xsl:template>
         <xsl:template match="eligibility">
              <xsl:param name="type" />
              <xsl:choose>
                   <xsl:when test="$type = 'short'">
                        <span class="tealbold">Eligibility: </span> <xsl:call-template name="ages">
                             <xsl:with-param name="min"><xsl:value-of select="normalize-space(minimum_age)" /></xsl:with-param>
                             <xsl:with-param name="max"><xsl:value-of select="normalize-space(maximum_age)" /></xsl:with-param>
                        </xsl:call-template>, <xsl:apply-templates select='gender' />
                   </xsl:when>
                   <xsl:when test="$type = 'long'">
                        <span class="trialtitle">Eligibility: </span>
                             <span class="tealbold">Age: </span> <xsl:call-template name="ages">
                                       <xsl:with-param name="min"><xsl:value-of select="normalize-space(minimum_age)" /></xsl:with-param>
                                       <xsl:with-param name="max"><xsl:value-of select="normalize-space(maximum_age)" /></xsl:with-param>
                                  </xsl:call-template>
                             <span class="tealbold">Genders Eligible for Study: </span> <xsl:apply-templates select='gender' />
                             <xsl:text>
                             </xsl:text>
                             <span class="tealbold">Eligibility Criteria: </span>
    <xsl:apply-templates select='criteria/textblock' />
                   </xsl:when>
                   <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
         </xsl:template>
         <xsl:template match="gender">
              <xsl:choose>
                   <xsl:when test=". = 'Both'">Male or Female</xsl:when>
                   <xsl:otherwise>
                        <xsl:value-of select="normalize-space(.)" />
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:template>
         <xsl:template match="overall_contact">
         <span class="trialtitle">Central Contact: </span>
              <xsl:apply-templates select='./first_name' /><xsl:text> </xsl:text>
              <xsl:apply-templates select='./middle_name' /><xsl:text> </xsl:text>
              <xsl:apply-templates select='./last_name' />
              <xsl:apply-templates select='./phone' />
              <xsl:apply-templates select='./email' />
         </xsl:template>
         <xsl:template name="ages">
              <xsl:param name="min" />
              <xsl:param name="max" />
              <xsl:choose>
                   <xsl:when test="($min != '') and ($max != '')">Between <xsl:value-of select="$min" /> and <xsl:value-of select="$max" /></xsl:when>
                   <xsl:when test="($min != '') and ($max = '')"><xsl:value-of select="$min" /> and Above</xsl:when>
                   <xsl:when test="($min = '') and ($max != '')">Under <xsl:value-of select="$max" /></xsl:when>
                   <xsl:otherwise></xsl:otherwise>
              </xsl:choose>
         </xsl:template>
         <xsl:template match="brief_summary/textblock">
              <span class="trialtitle">Trial Description: </span> <xsl:call-template name="substitute">
    <xsl:with-param name="string" select="." />
    </xsl:call-template>
         </xsl:template>
         <xsl:template name="location">
              <span class="trialtitle"><xsl:apply-templates select='.//country' /><xsl:apply-templates select='.//state' /></span>
              <xsl:apply-templates select='./facility/name' /><xsl:apply-templates select='.//city' /><xsl:apply-templates select='.//zip' /><xsl:apply-templates select='.//status' />
              <xsl:apply-templates select='./contact' />
         </xsl:template>
         <xsl:template match="contact">
              <span class="tealbold">Site Contact: </span>
              <xsl:apply-templates select='first_name' />
              <xsl:apply-templates select='middle_name' />
              <xsl:apply-templates select='last_name' />
              <xsl:apply-templates select='phone' />
              <xsl:apply-templates select='email' />
         </xsl:template>
         <xsl:template match="criteria/textblock">
              <xsl:call-template name="substitute">
         <xsl:with-param name="string" select="." />
         </xsl:call-template>     
    </xsl:template>     
         <xsl:template match="facility/name"><xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="country"><xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="city">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="zip">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="state">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="status">, <xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="first_name"><xsl:value-of select="normalize-space(.)" />&#160;</xsl:template>     
         <xsl:template match="middle_name"><xsl:value-of select="normalize-space(.)" />&#160;</xsl:template>     
         <xsl:template match="last_name"><xsl:value-of select="normalize-space(.)" /></xsl:template>     
         <xsl:template match="phone">Phone: <xsl:value-of select="normalize-space(.)" />
    </xsl:template>     
         <xsl:template match="email"><xsl:if test='. != ""'>EMail: <xsl:value-of select="normalize-space(.)" />
    </xsl:if></xsl:template>     
    <xsl:template name="substitute">
    <xsl:param name="string" />
    <xsl:param name="from" select="'&#xA;'" />
    <xsl:param name="to">
    </xsl:param>
    <xsl:choose>
    <xsl:when test="contains($string, $from)">
    <xsl:value-of select="substring-before($string, $from)" />
    <xsl:copy-of select="$to" />
    <xsl:call-template name="substitute">
    <xsl:with-param name="string"
    select="substring-after($string, $from)" />
    <xsl:with-param name="from" select="$from" />
    <xsl:with-param name="to" select="$to" />
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$string" />
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    Please do as early as possible..
    thanks in advance

    Hi I tried with below querry but iam getting an error message?
    SQL> Insert into temp_clob_tab
    2 SELECT XMLELEMENT("soap:Envelope",
    3 XMLATTRIBUTES ('http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi",
    4 'http://www.w3.org/2001/XMLSchema' as "xmlns:xsd",
    5 'http://schemas.xmlsoap.org/soap/envelope/' as "xmlns:soap"),
    6 XMLELEMENT("soap:Body"),XMLELEMENT("AddListing",
    7 XMLATTRIBUTES ('http://www.christielites.com' as "xmlns" )),
    8 XMLELEMENT ( "SCOMCODE",a.SCOMCODE), XMLELEMENT ( "SLOCCODE",SLOCCODE),
    9 XMLELEMENT ( "DSTART",DSTART),XMLELEMENT ( "DEND",DEND),XMLELEMENT ( "SECODE",SECODE),
    10 XMLELEMENT ( "IAVAIL",IAVAIL),XMLELEMENT ("IOWNED",IOWNED),XMLELEMENT ("SPOSTTRANS",SPOSTTRANS))
    11 from LiteExchangeAvailablity a;
    SELECT XMLELEMENT("soap:Envelope",
    ERROR at line 2:
    ORA-00932: inconsistent datatypes: expected CLOB got -

  • How to insert more than 32k xml data into oracle clob column

    how to insert more than 32k xml data into oracle clob column.
    xml data is coming from java front end
    if we cannot use clob than what are the different options available

    Are you facing any issue with my code?
    String lateral size error will come when you try to insert the full xml in string format.
    public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
      boolean isUpdated = true;
      Connection connection = null;
      try {
      connection = ConnectionManager.getConnection ();
      //connection.setAutoCommit ( false );
      PreparedStatement PREPARE_STATEMENT = null;
      String sqlQuery = "UPDATE " + tableName + " SET " + columnName + "  = ?  WHERE ID =" + id;
      PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
      // converting string to reader stream
      Reader reader = new StringReader ( strContents );
      PREPARE_STATEMENT.setClob ( 1, reader );
      // return false after updating the clob data to DB
      isUpdated = PREPARE_STATEMENT.execute ();
      PREPARE_STATEMENT.close ();
      } catch ( SQLException e ) {
      e.printStackTrace ();
      finally{
      return isUpdated;
    Try this JAVA code.

  • Can anyone confirm the date used for pushing the data into AR interface table? Is it abse don Actual ship date or scheduled ship date?

    Can anyone confirm the date used for pushing the data into AR interface table? Is it abse don Actual ship date or scheduled ship date? We are facing a scenario where trx date is lower than the actual ship to which logically sounds incorrect.
    Appreciate any quick response around this.

    Hi,
    Transaction date  will be your autoinvoice master program submission level date (If you haven't setup any logic.
    Please check the program level default date, if user enter old date ststem will pick the same.
    Customer is trying to set the value of the profile OM:Set receivables transaction date as current date for non-shippable lines at the responsiblity level. System does not set the transaction date to current date in ra_interface_lines_all.
    CAUSE
    Customer has used the functionality in R11i. But after the upgrade to R12, the system functions differently than R11i.
    SOLUTION
    1.Ensure that there are no scheduled workflow background process run.
    2.Set the profile "OM: Set Receivables Transaction Date as Current Date for Non-Shippable Lines"  at Responsibility level only as Yes.
    3.Now switch the responsibility to which the profile is set.
    4.Create order for Non-Shippable Lines and progress it to invoicing.
    5.Ensure that the 'workflow background process' concurrent program is run in the same responsibility and this line is considered in it.
    6.Now check if the 'SHIP_DATE_ACTUAL' is populated to ra_interface_lines_all

  • Query for getting all function and procedure inside the packages

    hi All
    Please provide me Query for getting all function and procedure inside the packages
    thanks

    As Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
    If you are looking for the packaged procedures and functions source then use user_source data dictionary
    select a.object_name,a.procedure_name from user_procedures a,
                  user_objects b
    where a.object_name is not null
    and a.procedure_name is not null
    and b.object_type='PACKAGE'        
    and a.object_name=b.object_name

  • Are there any standard Idocs or Bapis for posting the data into transaction

    Hi,
    Are there any standard Idocs or Bapis for posting the data into transactions ME42N and IK11?
    Thank You.

    Thank you.
    Any idea of the other one?

  • What is the,  iPad2 VPN setting for "transmit ALL data stream" equivalent in PC VPN?

    What is the,
    iPad2  VPN setting for "transmit ALL data stream" equivalent setting in PC VPN?
    Thanks.
    Or there is not equivalent part?
    -namlow

    Great question, Aerogoob.
    The XY graph can be bound to a 1d array of "points", where each point is a cluster of two numerics (X and Y). To create a shared variable of this type, you can set the data type to "From Custom Control..." in the shared variable properties dialog. Of course, first you'll have to build the custom control of the correct type: array of cluster of two numerics.
    If any of that doesn't make sense, please post back and we can walk you through it in more detail.
    Also, just for completeness, the chart indicator can be bound to a scalar numeric or to an array of numerics. The graph indicator can only be bound to an array of numerics.

  • I purchased iPhone 4 factory unlocked and used for 15 months . I removed the sim but when inserted again it says no sim

    I purchased iPhone 4 factory unlocked and used for 15 months . I removed the sim but when inserted again it says no sim

    JayleneC wrote:
    Wait.. Everything on iTunes worked, but when I insert my sim it brings me to the start were I have to choose my language, etc... Then it says activation error.. Are you sure it's the sim card?
    As you addressed me that is exactly what I said
    Dodgy trimming ??   get a new micro sim from T-Mobile

  • LR 4.4 on pc with Win7. Catalog is loading with all data and text and metadata but no images

    LR 4.4 on pc with Win7. Catalog is loading with all data and text and metadata but no images and no previews.

    LR 4.4 on pc with Win7. Catalog is loading with all data and text and metadata but no images and no previews.

  • I can insert data into an access database, but I need to querry the database for specific information. How do I do it?

    I can insert data into an access database, now I need to do some simple querries such as selecting all records that are greater than a certain value or = a certain value. How can I return only the selected records?

    If you don't want to spend any money, then instead of ActiveX, I would recomend LabSQL from Jeffrey Travis. I use it instead of the Connectivity toolkit and have had no problems. Besides being free, you have the advantage of being able to use it with any database. ActiveX ties you to Access and you upgrade your version of Access and find the properties and methods are different, you've got a lot of reprogramming to do.

  • Query for Getting previous date in oracle in specifc scenario

    I have the below data in a table A which i need to insert into table B along with one compute column.
    TABLE A:
    Account_No | Balance | As_on_date
    1001 |-100 | 1-Jan-2013
    1001 |-150 | 2-Jan-2013
    1001 | 200 | 3-Jan-2013
    1001 |-250 | 4-Jan-2013
    1001 |-300 | 5-Jan-2013
    1001 |-310 | 6-Jan-2013
    Table B:
    In table B,there should be no of days to be shown when balance is negative and the date one which it has gone into negative.
    So,for 6-Jan-2013,this table should show below data:
    Account_No | Balance | As_on_date | Days_passed | Start_date
    1001 | -310 | 6-Jan-2013 | 3 | 4-Jan-2013
    Here,no of days should be the days when the balance has gone negative in recent time and not from the old entry.
    I need to write a sql query to get the no of days passed and the start date from when the balance has gone negative.
    I tried to formulate a query using Lag analytical function,but i am not getting how should i check the first instance of negative balance by traversing back using LAG function. Even the first_value function was given a try but not getting how to partition in it based on negative value.
    Any help or direction on this will be really helpful.
    Thanks

    I think you can apply the Tabibitoshan method here. The query is more complex but performs better than other methods. For an explanation, see Tabibitosan method tutorial by Aketi Jyuuzou
    The idea behind the method is to identify "continuous" records without gaps. Here I identify records that are "continuous" because they contain an uninterrupted series of negative balances.
    drop table t;
    CREATE TABLE t (Account_No , Balance , As_on_date) AS SELECT
    1001 ,-100 , to_date('1-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-150 , to_date('2-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 , 200 , to_date('3-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-250 , to_date('4-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-300 , to_date('5-Jan-13', 'DD-MON-YY') FROM dual UNION ALL SELECT
    1001 ,-310 , to_date('6-Jan-13', 'DD-MON-YY') FROM dual;
    SELECT Account_No, Balance, to_char(As_on_date, 'DD-MON-YYYY') as_on_date,
    CASE
      WHEN balance < 0
      THEN row_number() OVER(PARTITION BY account_no, grp ORDER BY as_on_date)
    END days_passed,
    CASE
      WHEN balance < 0
      THEN to_char(
        first_value(as_on_date) OVER(PARTITION BY account_no, grp ORDER BY as_on_date),
        'DD-MON-YYYY'
    end start_date
    from (
      SELECT Account_No, Balance, As_on_date,
      CASE WHEN balance >= 0 THEN NULL ELSE
        row_number() OVER(PARTITION BY account_no ORDER BY as_on_date) -
        sum(CASE WHEN balance < 0 THEN 1 ELSE 0 END) OVER(PARTITION BY account_no ORDER BY as_on_date)
      end grp
      FROM t
    order by account_no, As_on_date;
    ACCOUNT_NO
    BALANCE
    AS_ON_DATE
    DAYS_PASSED
    START_DATE
    1001
    -100
    01-JAN-2013
    1
    01-JAN-2013
    1001
    -150
    02-JAN-2013
    2
    01-JAN-2013
    1001
    200
    03-JAN-2013
    1001
    -250
    04-JAN-2013
    1
    04-JAN-2013
    1001
    -300
    05-JAN-2013
    2
    04-JAN-2013
    1001
    -310
    06-JAN-2013
    3
    04-JAN-2013

  • SQL Query for SSRS has data but fields don't show that data

    I am having a strange issue here with my new report;
    First off, this report is an availability report for employees. If they are busy then a 0 should be displayed for that Hour and if they are free then a 1 is to be displayed. There are 2 parameters setup for use in this query, one is a Date/Time parameter
    and the other is a Text parameter where another Dataset Query is grabbing the data for (Departments)
    I have 2 Parameters, 1 is for a Department and the other is to select the date.
                           Hour1     Hour2    Hour3     Hour4    Hour5   
    Hour6    Hour7
    Smith, John     |     1     |     0     |     0     |     0     |   
    1     |     1     |     1     |
    Som, One        |     1     |     1     |     1     |     0
        |    0     |     1     |     1     |
    When I run the query in the Query Designer for the Dataset the information is displayed correctly and as I would expect it, however, when I run the Report and choose the same information for the 2 parameters then the report only ever shows all 1's;
    Smith, John     |     1     |     1     |     1     |     1     |   
    1     |     1     |     1     |
    Som, One        |     1     |     1     |     1     |     1    
    |    1     |     1     |     1     |
    I've tried searching but didn't know what term to use that describes what is going on.
    Like I said, this works if ran in SSMS and works when ran in the Query Builder of SSRS but when it comes to displaying the data on the report the incorrect information is displayed.
    Any help would be appreciated.
    EDIT
    I have also ran the Report Table Wizard with the same query and chosen Names as the row and Hours as the columns and the same thing happens - just all 1's are displayed even thought the query in Query Builder shows correct information.

    The difference running the query directly in query designer and when the report runs is that you manually type in values for the parameters when running query designer. It is likely that the parameter values from the report have a different syntax than you
    expect. This will happen especially when setting the available values of a parameter from a data cube query. A value from an analysis cube may be displayed in the query designer as "\Project\Iteration Node" while the actual value is "[Work Item].[Iteration
    Hierarchy].[Iteration2].&[-7189901615194941888]&[-8272609059741292246]". Very different as you can see. This example is from the TFS analysis server.
    The best way to validate that your parameters are passing the values (and syntax) you expect is to add text boxes to your report for each parameter and set them to display Parameters!ParameterName.Value.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Query for item master data

    hi all,
    i want to create a query for items in the item master data that shows the changed field, the old value, the new value, user name and the date it was changed .
    can anyone help please.
    ciao

    thanks for the reply
    my clients internal auditors require that they have Exception Reports in SAP , i.e reports that can show changes made, date and by which user etc...
    1. changes made to item master data
    2. changes made to business partner master data
    3. changes made to invoices, purchase orders etc..
    this reports can be set in query form or xl reporter..
    i tried but couldent find the tables ....
    any sugestion will be appriciated..

  • Query for getting Workcenter data

    Dear Professionals,
    I got an issue where user needs the data from the work center. So i made a query joining the table CRHD, CRCO, CRCA & CRTX here for all the Tables OBJID & OBJTY is available, but the query results in "no data found". Am i doing some mistake else is there any other way i could get the data.
    Thanks in advance
    Regards
    Prashant.Pillai

    Hi there,
    try the following:
    1. link CRHD- CRCO with left outer join - do You have the data in both table? if yes
    2. change CRHD-CRCO to inner join and add CRCA with left outer join - do You have the data?
    (No need the text tabe You can find it in add fields in query)
    Br

  • SCCM 2007 SQL Query for Advertisement Creation Date

    I have been asked if I can create a Query to list all advertisements that have been created in a 60 day period and the User that created them.
    I have tried a couple of SQL codes but I cant quite get the syntax to work.
    Here is what I have so far, but I still don't know if any of it is usable:
    v_Advertisement.AdvertisementName AS ‘Advertisement Name’,
    v_Advertisement.AdvertisementID AS ‘Advertisement ID’
    FROM v_Advertisement
    INNER JOIN v_Package ON v_Advertisement.PackageID = v_Package.PackageID
    INNER JOIN v_Collection ON v_Advertisement.CollectionID = v_Collection.CollectionID
    INNER JOIN v_ClientAdvertisementStatus ON v_Advertisement.AdvertisementID = v_ClientAdvertisementStatus.AdvertisementID
    AND v_Advertisement.AdvertisementID in(SELECT advertisementid FROM V_advertisement WHERE DATEDIFF(D, V_advertisement.presenttime,GETDATE())<=365)
    ORDER BY v_Advertisement.AdvertisementName
    Any help with this would be greatly appreciated.
    Regards
    AntonSK

    I saw you're missing select statement.
    Also, you need to know which table & column for these:
    - Advertisement Creation date?
    - User that created the Advertisement
    a sample of working query as below, but it's still missing the 2 items above
    select
    Adv.AdvertisementName as 'Advertisement Name',
    Adv.AdvertisementID as 'Advertisement ID'
    from
    v_Advertisement as Adv
    inner join v_Package as Pkg on Adv.PackageID = Pkg.PackageID
    inner join v_Collection as Col on Adv.CollectionID = Col.CollectionID
    inner join v_ClientAdvertisementStatus as AdsStatus on Adv.AdvertisementID = AdsStatus.AdvertisementID
    and Adv.AdvertisementID in(select Adv.AdvertisementID from v_Advertisement where datediff(d, Adv.PresentTime, getdate())<=365)
    order by 'Advertisement Name'
    ---Pat

Maybe you are looking for

  • I am getting the following error messages:

    I am getting the following error messages: May 29 15:31:42.404 utc: %SFF8472-5-THRESHOLD_VIOLATION: Gi1/1: Rx power high warning; Operating value:  -2.0 dBm, Threshold value:  -3.0 dBm. May 29 15:41:42.974 utc: %SFF8472-5-THRESHOLD_VIOLATION: Gi1/1:

  • MacBook vs. MacBook with retina

    I can't decide between The MacBook Pro or The MacBook Pro with retina display. I love the retina but I really would live to be able to use CDs on it. Is there anyway to get a CD user thing on The MacBook with retina?

  • TS2755 Can't send texts

    I can receive text messages and iMessages but when I open them they say they haven't been opened and I cannot reply to them my phone just freezes. I have reset my phone back to the basic settings but haven't restored it can someone tell me what to do

  • SEM_BW_BCS 603 RUNTIME ERROR: TSV_TNEW(BTR)_PAGE_ALLOC_FAILED

    hi everyone, When i run the transcation:ucwb, execute the SEM_BCS workbench/monitor ,an runtime error occured. My BW dev system and qas system have came across the same situation My environment is: AIX5300 64b memory8G swap space20G Oracle10g Netweav

  • Newbie connectingti Internet

    I am travelling with my new macbook pro and am unable to connect to the internet. I use DSL with wireless at home and have a cable modem / ethernet connection here. Following the setup as directed by Mac101 tutorial I get the warning: "Built-in Ether