SQL Query returns question marks

I am seeing a SQL Query, executed via ADODB in VB, from a 10G client (don't know exact version) to a Sun Solaris based 9.2.0.5.0 Server return all question marks...Table queried consists of 3 columns, 2 varchar2, one long: Here query:
SELECT SETTINGVALUE FROM EWORKFLO.CONFIG WHERE SETTINGGROUP='New test' AND SETTINGNAME='Single Page'
The query results in 2576 question marks...(????? etc).
Any idea what may be going on here?
Thanks...
Leendert

Hello Tak,
Thanks for replying. When this query is run from SQLPLUS we get a proper result back, that is the actual values from the SETTINGVALUE column. This is the LONG column and contains data like this:
[Scan Section]
DeviceTimeout=15
Display=1
hDCCreate=0
Unit=0
DialogTitle=
IniFileName=c:\winnt\temp\kf.ini
IniSectionName=Scan Section
DeviceCache=1
etc....etc....
Depending on the settings created, the return string may vary in length.
Leen

Similar Messages

  • Creating a directory via a jsp page sql query return

    Is it possible to create a directory based on the results of a sql query?
    i.e.
    My sql query returns application number 1234 for a building application (BC for short).
    Is it possible to create a directory /BC/1234
    It is then proposed to use an iframe to look into the directory so users can place and access scanned documents which are captured during the approval process.
    If so how?
    An example would be great.
    Jason

    Sorry hope your still around I've been away for a while. We've created a samber share to the file server where the documents are stored and mounted it within the web file directory. It works ok if there is an existing directory but if there isn't we want it to be created when the page looks for the folder. I've done this with an asp page it basically did a directory exist test first then create folder if it didn't. The problem is can't find an example of how to do the directory exist test then directory create syntax so an example of both would be great

  • Fmt:message returns question marks instead of unicode

    well, pretty simple problem.
    When i'm using <fmt:message key="someunicode"/>, the tag returns question marks instead of hebrew unicode string.
    The page displays unicode that isn't coming from the tags.
    The resorues files is ok too.
    Anyone knows something about it?

    Have you set the bundle for the fmt tag before you use the <fmt:message> tag?
    <fmt:setBundle var="mybundle" basename="resources.application"/>
    Then :
    <fmt:message key="my.key.message" bundle="${mybundle}"/>You can also the the bundle in the <fmt:message> tag.

  • SQL query returns varchar - default value type!!!

    On a field in my portal form there is a default value type of 'SQL query returns varchar', where can I put this sql to get a default value from a table?

    Hi again
    I have this code in 'additional pl/sql code' - '...before displaying the page'. But it comes up with an error when I run the form.
    declare
    prop_v varchar2(20);
    group_v varchar2(3);
    el1_v varchar2(3);
    blk varchar2(10) := 'DEFAULT';
    begin
    prop_v := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'l_property_p');
    group_v := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'l_group_p');
    select element_code
    into el1_v
    from eh_risk_element_detail
    where property_ref = prop_v
    and group_code = group_v
    and line_no = 1;
    p_session.set_value(p_block_name => blk, p_attribute_name => 'L_ELEMENT1_P', p_value => el1_v);
    end;
    Rich

  • How to capture a parameter value in SQL QUERY of scale marker using GO URL

    Hi,
    Can any one please tell me how to capture the parameter value from go url inside Where clause of Scale Marker.
    I am trying to sift the position of scale marker based on SQL Query.
    Thanks-Bhaskar Gouda.
    Edited by: 961171 on Sep 25, 2012 12:33 AM

    Since this is a synchronous interface, where source is a soap(proxy) call and target is JDBC in the first mapping both of them are request scenarios.
    Source Structure:
    RootNode
        Request             1...unbounded
           No_of_Days   1.1 String
    Target Structure:
    RootNode
       Statement
         TableName
             Action mapped to SQL_QUERY
            Access -  SELECT DISTINCT AL.EC_NO,DP.DATE_TO_FORMAL FROM T_APPLICATION_LIST AL,(SELECT DE.EC_NO AS "EC_NO", DE.PACKAGE_NO AS "PACKAGE_NO",PC.DATE_TO_FORMAL AS "DATE_TO_FORMAL" FROM DAICYO_ECNO DE,PACKAGECTL PC WHERE DE.PACKAGE_NO = PC.PACKAGE_NO AND PC.DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$'))) DP WHERE AL.EC_NO IN  (SELECT EC_NO FROM DAICYO_ECNO WHERE PACKAGE_NO IN (SELECT PACKAGE_NO FROM PACKAGECTL WHERE DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$')))) AND (AL.FAMILY = ''  or  '' is null and AL.FAMILY is not null ) and DP.EC_NO = AL.EC_NO ORDER BY DATE_TO_FORMAL
         Key
          No_Of_Days   1..1 String
    In Return I am expecting a JDBC response from the Oracle Database as:
    Source Structure:
    RootNode
      STATEMENT_response   1...unbounded
         row                               0...undbounded
           EC_NO                        1..1   String
    Target Structure:
    RootNode
      RESPONSE
        row
         EC_NO                     1..1     String

  • APEX,PDF's, BI Publisher and SQL Query returning SQL code..

    I don't know if I should be posting this in this Forum or the BI Publisher forum, so I am posting in BOTH forums..
    I love APEX, let me say that first.. And appreciate the support offered here by the group, but am running int a confusing issue when BI Publisher tries to build a report from the above type APEX report..
    Here is my dilemma:
    I have a number of reports that are part of a Oracle package. They return an SQL Query back to a reports region on a page. I am having to deal with the column names returned are col01, col02..
    The issue I have is, when building the Application Level query to download the XML sample from in building RTF layouts in Word, you can not use this code, you MUST use a standard SQL Select.
    I have taken the sql from the function returning sql, and copied into the application query, supplying the required data values for bind variables being used in the query.
    An XML file is produced, and I use this to build the RTF format file that I load back into APEX and try to use it for the PDF rendering of the report. I can view the output as a PDF in the Word add on, but when I try using it with the report, it is returning an empty PDF file.
    Can anyone tell me what error log files on the bi publisher side I can look at to see what error is happening?
    Thank you,
    Tony Miller
    UTMB/EHN
    Title adjusted to allow people to know what I am talking about...
    Message was edited by:
    Tony Miller

    Tony,
    You can find the log as follows:
    - go to http://[yourserver]:[yourport]/em
    - logon to OC4J EM: oc4jadmin/[yourpassword]
    - click on "logs" at the bottom of the page
    - in the hgrid/tree, expand OC4J->home->Application
    xmlpserver
    - click on view log icon
    You can also observe what's going on in BI Publisher
    by going to the command prompt from where you started
    it.
    Or, as a third option, you can locate the file on
    your file system, depending on your setup, the path
    would be something similar to this:
    \oracle\product\10.2.0\bip\j2ee\home\application-deplo
    yments\xmlpserver\application.log
    With that said though, I don't expect you'll find
    much in there that would help with your particular
    problem. I suspect you either get no rows in your XML
    at runtime, due to some session state issues, or your
    XML structure does in fact not match your RTF
    template.
    I'm not quite following your problem description,
    i.e. when did you do what and are you associating
    your report layout with a report query or report
    region. So just some general notes, your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query. If you want to
    use your RTF template with a standard report region,
    you must export the XML file first using the advanced
    XML structure option. And of course the column names
    in your report query need to match the column names
    in your report region.
    Perhaps this helps you further diagnose what's going
    on, if you have additional information that could
    help, let me know. And if you could stage this on
    apex.oracle.com, I'd be happy to take a look.
    Regards,
    MarcMarc,
    Thanks for looking at this issue. Below find my remarks to your questions..
    Re: your query needs
    to be parseable at design-time, when exporting the
    XML, so that you get the XML file with the proper
    column names derived from your query.At the start of this process, the query code was a function in a package. The function was returning an SQL select statement, for a report region on a page. I took the select statement, built an application query to build a sample of the xml for BI Publisher desktop (Add-on for Word). The code was producing the usual Col01, Col02.. since at design time that is were the column names.
    When I then took the xml from this and built the rtf for loading into my APEX application.
    When testing the Application Query with this RTF report layout, I am getting PDF's. When using it with the report region sending an xml feed to BI Publisher I am getting nothing back.
    I have since taken the sql code and moved it back into the report region, and set the region to have a type of straight SQL Query. I have even tried to hard-code the parameters I was getting from the page to limit data returned.
    Is it possible to see the xml being produced by the APEX page?
    Re: Stage this on apex.oracle.com.. I would love to, but we would have HIPPA issues if I posted the data on a public website.
    Can I send you the RTF file and the xml file that the application query is creating to see if there something weird about them?
    Thank you,
    Tony Miller
    UTMB/EHN

  • SQL Query returns values like "---" and "NA"

    Hi
              When I execute a sql query in MII it returns values like "---" and "NA" for empty Char and numeric fields respectively.
    I have checked the database and made sure that these fields does not have any value. This happens only when I run the query through MII. Can any one know how can we get rid of these values?
    Thanks in advance
    Shaji

    Shaji,
    MII sets those values as a default if it discovers null values in a query result. You can change this default behaviour in several ways.
    First, have a look at the document [Setting custom null values in XML|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70628af0-8ec4-2c10-7da2-f451e412dd8f?quicklink=index&overridelayout=true]. Then you may also use SQL functions like [NVL|http://www.techonthenet.com/oracle/functions/nvl.php] to change the value directly in the SQL query. You can also change the value inside the MII BLT to whatever you need.
    Michael

  • Exists (SQL query returns at least one row) condition with MAX on 10.2.0.4

    I just wanted to note this on the forum..
    I'm using Apex 3.0.1.00.08
    My DEV environment has just been upgraded from 10g version 10.2.0.2.0 to 10.2.0.4.0.
    I created the following process to select some values into some items on my Form page.
    select  MAX(STAT_YEAR+1)
          , pcd.pct_id
          , pcd.stat_type_id
          , pcd.stat_period_type_id
          , pcd.measurement_id
    into    :P11_STAT_YEAR
          , :P11_PCT_ID
          , :P11_STAT_TYPE_ID
          , :P11_STAT_PERIOD_TYPE_ID
          , :P11_MEASUREMENT_ID
    from  plant_commodity_data pcd
        , stat_type stt
    where pcd.STAT_TYPE_ID = stt.STAT_TYPE_ID
      and pcd.pct_id = :P0_PCT_ID
      and stt.stat_type = 'PRD'
    group by pcd.pct_id
          , pcd.stat_type_id
          , pcd.stat_period_type_id
          , pcd.measurement_id;The process should run conditionally if there was at least one row to select...
    So I copied the SQL into the Process condition, removed the "into" section and set the condition type to be "Exists (SQL query retruns at least one row) ...
    select  MAX(STAT_YEAR+1)
          , pcd.pct_id
          , pcd.stat_type_id
          , pcd.stat_period_type_id
          , pcd.measurement_id
    from  plant_commodity_data pcd
        , stat_type stt
    where pcd.STAT_TYPE_ID = stt.STAT_TYPE_ID
      and pcd.pct_id = :P0_PCT_ID
      and stt.stat_type = 'PRD'
    group by pcd.pct_id
          , pcd.stat_type_id
          , pcd.stat_period_type_id
          , pcd.measurement_id;This worked perfectly until the DEV environment was upgraded from 10g version 10.2.0.2.0 to 10.2.0.4.0.
    The condition would fire even if there were no rows returning.
    I pasted the condition code into SQL Developer connected to the DEV (10.2.0.4.0) environment and it returned no rows.
    To solve the problem, I removed the MAX.
    You can test this using this code if you have access to the two versions... select  MAX(1)
          , sysdate
          , 'Gus'
    from  dual
    where 1 = 2
    group by sysdate, 2Now I know the MAX isn't required in the condition as I'm just trying to find out if any rows exist, but it was there as I copied the code in... I was just wondering why this happened between 10.2.0.2.0 and 10.2.0.4.0?
    Gus..

    Hi Gus,
    try to execute
    select count(*) from dual where exists (select  MAX(1)
          , sysdate
          , 'Gus'
    from  dual
    where 1 = 2
    group by sysdate, 2)in SQL Developer. The above statement is generated by APEX for an "Exists (SQL query retruns at least one row)". Can't test it, because I don't have a 10.2.0.4.0 at hand.
    Does SQL Developer now show the same behavior?
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com
    The APEX Builder Plugin: http://builderplugin.oracleapex.info/
    The ApexLib Framework: http://apexlib.sourceforge.net/

  • Why does Oracle SQL query returning a date field without the time component

    Hi,
    I'm a novice SQL user & hv just installed Oracle SQL developer (Version 3.0.04, Build MAIN-04.34).
    I made the same SQL query using "Oracle SQL developer" & "TOAD for Oracle 9.0.1" but I got 2 different format on the same date field:
    On TOAD, I get the date field extracted as *04/26/2011 23:12:58*
    On Oracle, I get the date field extracted as *26/APR/11*
    Why is the Oracle result in a different format & missing the time component?
    Is there any option/preference that I need to set in Oracle SQL developer to get the full date/time format displayed?
    I've tried to set my the date format to DD/MON/RR HH12:MI:SSXFF AM under the preference -> database NLS but I still get the same format!
    Plse help!

    hokim wrote:
    Hi,
    I'm a novice SQL user & hv just installed Oracle SQL developer (Version 3.0.04, Build MAIN-04.34).
    I made the same SQL query using "Oracle SQL developer" & "TOAD for Oracle 9.0.1" but I got 2 different format on the same date field:
    On TOAD, I get the date field extracted as *04/26/2011 23:12:58*
    On Oracle, I get the date field extracted as *26/APR/11*
    Why is the Oracle result in a different format & missing the time component?
    Is there any option/preference that I need to set in Oracle SQL developer to get the full date/time format displayed?
    I've tried to set my the date format to DD/MON/RR HH12:MI:SSXFF AM under the preference -> database NLS but I still get the same format!
    Plse help!http://edstevensdba.wordpress.com/category/nls_date_format/

  • Complex SQL query return type

    I am trying to take a complex query that I was running inside of C# code and turn it into a stored proc so that it performs much better. I was doing quite a bit of looping in C# code because I am most familiar with that but I know it ain't the best way to do things. Basically my query does the following:
    -Query a table to get a set of table names
    -loop over that set of table names to query another table to get some info
    -use that info to query another table to find out if there are any results
    -if there are results add those to a table to be returned to the caller
    The issue I am having is that I don't know how to build the return table so I can pass it back to the calling code. All i need to know is the names of the tables that had at least one hit in my big query.
    I am kind of new to this so I may have some things in here that are completely bizarre. I won't be offended if you rip it apart. I know that my out SYS_REFCURSOR will not work as is. The part that says 'SELECT OBJECTID really needs to be telling me the name of the table and not OBJECTID. I want to jam all these table names into a resultset which would really just be a temp table that I create with one field (TableName).
    I know it's a lot to ask but if anyone can look at any part of this and give me suggestions I would greatly appreciate it. I'm struggling slowly through PL/SQL trying not to do dumb things when there are easier ways. There is probably a way for me to get rid of this loop but I think I need the dynamic part because I am querying different tables. Thank you very much
    CREATE OR REPLACE PROCEDURE "CREAM_USER"."ENVELOPE_INTERSECT"
    pMINX IN NUMBER,
    pMAXX IN NUMBER,
    pMAXY IN NUMBER,
    pMINY IN NUMBER,
    pRESULTSET OUT SYS_REFCURSOR
    AS
    BEGIN
    DECLARE
    SQLSTR VARCHAR2(700);
    theLayerID NUMBER;
    cursor gi is SELECT TABLE_NAME, OWNER FROM VIEW_GEOINDEXER_TABLES WHERE GEOINDEXED = 1;
    theTABLE_NAME varchar2(160);
    qTheTABLE_NAME varchar2(160);
    theOWNER varchar2(32);
    BEGIN
    for iLayer in gi loop
    theTABLE_NAME := iLayer.TABLE_NAME;
    theOWNER := iLayer.OWNER;
    qTheTABLE_NAME := '''' || theTABLE_NAME || '''';
    theOWNER := '''' || theOWNER || '''';
    SQLSTR := 'SELECT LAYER_ID FROM SDE.LAYERS WHERE OWNER = ' || theOWNER || ' AND TABLE_NAME = ' || qTheTABLE_NAME || '';
    EXECUTE IMMEDIATE SQLSTR INTO theLAYERID;
    SQLSTR := 'SELECT OBJECTID FROM ' || theTABLE_NAME || ' WHERE SHAPE IN
    SELECT FID FROM F' || theLayerID || ' WHERE
    (' || pMINX || ' >= EMINX AND ' || pMINX || ' <= EMAXX)
    OR
    (' || pMAXX || ' >= EMINX AND ' || pMAXX || ' <= EMAXX)
    AND
    (' || pMINY || ' >= EMINY AND ' || pMINY || ' <= EMAXY)
    OR
    (' || pMAXY || ' >= EMINY AND ' || pMAXY || ' <= EMAXY)
    OR
    (' || pMINX || ' <= EMINX AND ' || pMAXX || ' >= EMAXX)
    AND
    (' || pMINY || ' <= EMINY AND ' || pMAXY || ' >= EMAXY)
    OPEN pRESULTSET FOR SQLSTR;
    END LOOP;
    END;
    END ENVELOPE_INTERSECT;

    Looks like you are using dynamic sql but, not using bind variables.
    Check out this link (try to ignore the original question) and see how the third post shows you how to use dyanmic sql using the 'USING' construct.
    dynamic SQL
    HTH,
    Rahul.

  • The data from my web page insert in SQL table as question marks

    I use Farsi language in my web page for inserting customer data. The data that is inserted in webpage and submitted, showed as ???? in SQL table. A lot of developers say that I should use N' before the Unicode character, but I don't know how I can use it
    in my code. I attached the code. Can someone say me where I should insert the N in my code?
    protected void cmdInsert_Click(object sender, EventArgs e)
    //Checking the validation of required fields
    if (cboCustomerType.Text == "" || cboTitle.Text == "" || SearchableName.Text == "" ||
    FinalName.Text == "" || NationalID.Text == "" || BusinessID.Text == "" || MobilePhone.Text == "")
    lblStatus.Text = "لطفا فیلدهای اجباری را حتما پر کنید";
    return;
    //define ADO.NET objects.
    string insertSQL;
    insertSQL = "INSERT INTO Customers(";
    insertSQL += "CustomerType,CustomerTitle,CustomerFirstName,CustomerLastName,CompanyType,";
    insertSQL += "CompanyName,SearchableName,FinalName,NationalCode,BusinessID,City,Address,PostalCode,";
    insertSQL += "Zone,MobileNumber,WorkPhone1,WorkPhone2,HomePhone,FaxNumber,Email,Website,Note)";
    insertSQL += "VALUES('";
    insertSQL += cboCustomerType.Text + "','";
    insertSQL += cboTitle.Text + "','";
    insertSQL += CustomerFirstName.Text + "','";
    insertSQL += CustomerLastName.Text + "','";
    insertSQL += cboCompanyType.Text + "','";
    insertSQL += CompanyName.Text + "','";
    insertSQL += SearchableName.Text + "','";
    insertSQL += FinalName.Text + "','";
    insertSQL += NationalID.Text + "','";
    insertSQL += BusinessID.Text + "','";
    insertSQL += City.Text + "','";
    insertSQL += Address.Text + "','";
    insertSQL += PostalCode.Text + "','";
    insertSQL += Zone.Text + "','";
    insertSQL += MobilePhone.Text + "','";
    insertSQL += Phone1.Text + "','";
    insertSQL += Phone2.Text + "','";
    insertSQL += HomePhone.Text + "','";
    insertSQL += FaxNumber.Text + "','";
    insertSQL += Email.Text + "','";
    insertSQL += Website.Text + "','";
    insertSQL += Note.Text + "')";
    SqlConnection con = new SqlConnection(connectionString);
    SqlCommand cmd = new SqlCommand(insertSQL, con);
    //try to open the database and execute the insert
    int added = 0;
    try
    con.Open();
    added = cmd.ExecuteNonQuery();
    lblStatus.Text = added.ToString() + "اضافه شد";
    catch (Exception err)
    lblStatus.Text = "Error inserting record.";
    lblStatus.Text += err.Message;
    finally
    con.Close();
    //If the insert succeed, refresh the customer list.
    if (added > 0)
    FillCustomerList();
    Regards,

    Because you're composing the SQL statement with string concatenation, you would put the "N" before the single quote,
    VALUES(N'";
                insertSQL += cboCustomerType.Text + "',N'";
                insertSQL += cboTitle.Text + "',N'"; // ...etc
    However, composing SQL statements with string concatenation is not a suggested practice because it's open to SQL injection (see:
    https://technet.microsoft.com/en-us/library/ms161953(v=sql.105).aspx). A safer way to do this is to use command parameters to represent the values (see SqlCommand.Parameters
    property). If you use parameters, you can specify parameter data type as SqlDbType.NVarchar, which will ensure your text values are passed in as Unicode. Also ensure that the columns in question are defined in the database table definition as Unicode (NVARCHAR
    rather than VARCHAR).
    Hope this helps, Bob

  • SQL query returns value but EXEC SQL Task fails to assign variable

    I have an execute SQL task to get an identifier from an Oracle database and assign it to a variable (the variable is used in subsequent query's where clauses to transfer the data to a SQL Server database). If I copy the query from the SSIS
    package to the Oracle SQL Developer interface and run the query; I get the expected single identifier. If I run the execute SQL task I get the error "[Execute SQL Task] Error: An error occurred while assigning a value to variable "VariableName":
    "Single Row result set is specified, but no rows were returned."
    I can create phony/simpler versions of the query that will return the wrong identifier that will successfully assign the value to the variable, so the problem isn't with the variable itself or the way the result set is set up in the task (Result
    Set/Single Row in the General panel; Result Name 0/VariableName in the Result Set panel).
    How can two queries that return a single value produce different results with respect to the variable assignment process?

    Perhaps you can trap (profile) the query in Oracle to see what it gets submitted,
    thing is this query
    select id from table where ProcessedStatusColumn is null and DateColumn = (sub select to get most recent date in table where ProcessedStatusColumn is null)
    is not guaranteed to return a value, you need a default returned in case the search failed e.g.
    select
    NVL(id, 0)
    from table where ProcessedStatusColumn is null and DateColumn =
    (sub select to get most recent date in table where
    ProcessedStatusColumn is null)
    Arthur My Blog

  • SQL query returns few rows, but holds on with several Gbs of RAM memory used

    If I perform the following query:
    SELECT d.DocumentGUID, d.DocumentID
    FROM ImportDataBase.dbo.Document d
    LEFT OUTER JOIN ContentDataBase.dbo.Document d2 ON (d.DocumentGUID = d2.DocumentGUID)
    WHERE ( d2.DocumentGUID IS NULL ) -- new document in the ImportDB
    OR ( d2.DocumentGUID IS NOT NULL AND d.QueryContent <> d2.QueryContent ) -- modified document in the ImportDB
    It returns around 1000 rows and takes about 3 minutes to complete
    It also raises up the RAM memory used from 2GB to 9GBs. 
    This memory used will remain used untill I restart the server. I have no need to make use of that memory, I already copied the returned rows of that query into a note pad for example. And any other reason of SQL has to  to keep that memory stored by
    that query, I  dont want it.
    Is there a way to release that memory I really dont need my SQL server to keep, without having to restart the SQL server?
    and without topping the max memory the sql server uses, since I need my SQL server to use as much as it needs in other tasks(I dont think it needs to hold on to the above query memory used)
    Thank You very much.

    Is there a way to release that memory I really dont need my SQL server to keep, without having to restart the SQL server?
    and without topping the max memory the sql server uses, since I need my SQL server to use as much
    A query can be resource intensive even if it returns a single row. Generally it is a good idea to set SQL Server MAX memory.
    BOL: "Optimizing Server Performance Using Memory Configuration Options
    The memory manager component of Microsoft SQL Server eliminates the need for manual management of the memory available to SQL Server. When SQL Server starts, it dynamically determines how much memory to allocate based on how much memory the operating system
    and other applications are currently using. As the load on the computer and SQL Server changes, so does the memory allocated. For more information, see Memory Architecture.
    The following server configuration options can be used to configure memory usage and affect server performance:
    •min server memory
    •max server memory
    •max worker threads
    •index create memory
    •min memory per query
    The min server memory server configuration option can be used to ensure that SQL Server does not release memory below the configured minimum server memory once that threshold is reached. This configuration option can be set to a specific value based on the
    size and activity of your SQL Server. If you choose to set this value, set it to some reasonable value to ensure that the operating system does not request too much memory from SQL Server, which can affect SQL Server performance.
    The max server memory server configuration option can be used to specify the maximum amount of memory SQL Server can allocate when it starts and while it runs. This configuration option can be set to a specific value if you know there are multiple applications
    running at the same time as SQL Server and you want to guarantee that these applications have sufficient memory to run. If these other applications, such as Web or e-mail servers, request memory only as needed, then do not set the max server memory server
    configuration option, because SQL Server releases memory to them as needed. However, applications often use whatever memory is available when they start and do not request more if needed. If an application that behaves in this manner runs on the same computer
    at the same time as SQL Server, set the max server memory server configuration option to a value that guarantees that the memory required by the application is not allocated by SQL Server."
    LINK: 
    http://technet.microsoft.com/en-us/library/ms177455(v=sql.105).aspx
    Memory configuration:
    http://www.sqlusa.com/bestpractices/memory-configuration/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • SQL query return wrong Windows version

    when excuting   'select @@VERSION' returns wrong Windows version. Why?

    when excuting   'select @@VERSION' returns wrong Windows version. Why?
    SELECT @@VERSION will return SQLServer version and not windows version
    Even in case of sql, if you're seeing a different version from what your management studio suggests, then it may be that you're SSMS (client tool) is of another later version whereas the server instance which you're actually connecting to may
    be of different (earlier) version.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • SQL query - return single unique rows

    Hi
    If you have an employee table where employees are listed per department, using SQL, how could you return the names of the employees listed per department on a single unique row?
    Eg - select deptno, first_name from employee
    deptno first_name
    10 Jane
    20 Jack
    10 Joe
    20 Jill
    10 Jacinta
    30 John
    30 Jeffrey
    10 Jackie
    30 Jennifer
    ... etc.
    the return set of the query would look like:
    deptno first_name concat
    10 Jane Joe Jacinta Jackie ..
    20 Jack Jill ..
    30 John Jeffrey Jennifer ..
    Cheers

    Here you go:
    WITH t AS
    (SELECT 10 deptno, 'Jane' first_name FROM dual UNION
    SELECT 20 deptno, 'Jack' first_name FROM dual UNION
    SELECT 10 deptno, 'Joe' first_name FROM dual UNION
    SELECT 20 deptno, 'Jill' first_name FROM dual UNION
    SELECT 10 deptno, 'Jacinta' first_name FROM dual UNION
    SELECT 30 deptno, 'John' first_name FROM dual UNION
    SELECT 30 deptno, 'Jeffrey' first_name FROM dual UNION
    SELECT 10 deptno, 'Jackie' first_name FROM dual UNION
    SELECT 30 deptno, 'Jennifer' first_name FROM dual)
    SELECT   deptno,
             RTRIM(XMLAGG(XMLELEMENT(c, first_name||' ') ).EXTRACT ('//text()'), ' ') names
    FROM     t
    GROUP BY deptno

Maybe you are looking for

  • How to uninstall Adobe Drive 4 for CS6 for Mac

    I have Adobe CC on my system and also Adobe Drive 4.2 from CS6 time for some reason. adobe Drive was not removed when I removed CS6. The Adobe Drive 4.2 run fine at this time. Now I want to uninstall Adobe Drive 4 from my Mac (running OSX 10.8.4), so

  • Please help with a table issue

    At http://www.stlblues.net/default.htm, the mini-calendar I frame at the top right is aligning left. I can't find the reason, please help me align this centered /

  • Loading Images CS5 32 & 64 bit

    When I load an image (jpeg etc) into Photoshop it shows up in the layers palet as a background but does not show in the workspace, where I see a chequered background. How do I overcome this? What am I missing? This is the trial version of CS5 Extende

  • Oracle Streams PIT on Source DB

    I'm testing backup/recovery in my streams environment, simulating a PITR on the source. The objective is to get both the source and destination to the same point in time, driven by the source. That being said, if recover to a time 5 hours prior, on b

  • Flash CS5: Is there a keyboard shortcut to move to the next keyframe?

    I know there are keyboard shortcuts to move to the next and previous frames -- "." and "," but they're not really what I'm referring to. Also, these keys don't necessarily move to the next and previous frames, rather it just seems to move the red pla