Sql statement does not give require output

Hi Guys,
i have created two tables, tables data and required output are given below: any help would be highly appretiated:
{code}
create table tt (keyword varchar2(250))
insert into tt ('Smith')
insert into tt ('Walker')
create table a (name_a varchar2(250), name_b varchar2(250))
insert into a ('Smith Walker','Walker Smith');
insert into a ('Adam Webster','Steve David');
insert into a ('SmiGavin Walker'  ,'James Smith');
insert into a ('Trever Michael ','Andy Walker');
insert into a ('James Walton' ','Smith Thomas');
select * from a, tt b where instr(a.name_a, b.keyword)=0 and instr(a.name_b,b.keyword)>0
Trever Michael Andy Walker Walker
Gavin Walker James Smith Smith
James Walton Smith Thomas Smith
Required output
I want output where all name_a column should not have keyword, on the other hand, all name_b should have keyword
Trever Michael Andy Walker Walker
James Walton Smith Thomas Smith
*************"Gavin Walker James Smith Smith" this one should not come as it has Walker in NAme_a which is forbidden, please can anyone help how to fix this issue.
{/code}
Best Regards,
Zaid

Try this
SELECT KEYWORD, NAME_A, NAME_B FROM TT, A
WHERE INSTR (NAME_A, KEYWORD) =0 AND INSTR (NAME_B, KEYWORD)>0
AND NAME_A NOT IN (SELECT NAME_A FROM TT, A
WHERE INSTR (NAME_A, KEYWORD) >0)

Similar Messages

  • TestStand Open SQL Statement does not support SQL's ORDER BY clause???

    TestStand 1.0.3
    Windows 2000 SP1
    SQL Server 2000 Personal
    You've got to be kidding me...
    It appears that the built-in TestStand Open SQL Step does NOT support the
    "ORDER BY" clause in the SELECT statement, even though the documentation
    says it does. Is this true?
    I have an Open SQL Statement query:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234)"
    it works fine, returning a correct record count 120 records. If I change
    the Open SQL Statement query simply by adding an ORDER BY clause, such as:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234) ORDER BY [MyField] ASC"
    it returns a record count of zero. I know that "MyField" exists in the
    MyTable table and contains valid data. The
    second query works fine in SQL
    Server Enterprise Manager.
    Am I missing something? Is it true that the TestStand Open SQL Step does
    NOT support the "ORDER BY" clause? If not, what &#$!ing good is it and why
    does the manual state it is supported? Is there any other way using just
    the TestStand steps to order a database recordset on one or more fields?
    Any help would be appreciated.
    Grrrrr....
    Bob Rafuse
    Etec Inc.

    > Bob -
    > The database step types do not do anything special to the SQL command
    > that you give it. The step just passes the command to the ADO
    > provider. I tried a simple query using the step types with the
    > following command,
    >
    > "SELECT UUT_RESULT.* FROM UUT_RESULT WHERE ([UUT_SERIAL_NUMBER] =
    > 12345) ORDER BY [EXECUTION_TIME] ASC"
    >
    > and this return the expected results and the record count parameter
    > was as expected. I tried this on TS 1.0.2 and TS 2.0 with MS Access
    > 2000 and MS SQL Server 7.0. I do not have MS SQL Server 2000 at this
    > time.
    >
    > It would be surprised if the step types are messing something up.
    I've been doing some experimenting over the past couple of days. Simple,
    one-table queries seem to handle the ORDER BY clause fine. Th
    ings seem to
    get messed up when I try multi-table queries with ORDER BY clause with the
    TestStand database steps. I get no errors but the returned record counts
    are always 0 with the ORDER BY and positive without the ORDER BY. The exact
    same queries work fine in Visual Basic/ADO and the SQL Server Query
    Analyzer.
    > Questions:
    > 1. Have you verified whether the data is actually returned even though
    > the record count is zero?
    Hmmm... yes data IS getting returned (at least on the two instances I just
    checked), but the record count is always zero. I was not proceeding with
    processing if the record count was 0.
    Still... I don't know how to loop through the recordset without knowing how
    many records there are an not eventually generate an error by passing EOF.
    Is there another way using the TestStand database steps to determine a) the
    number of records in the recordset or b) when I'm at EOF?
    > 2. Are you using any advanced options on the Opend SQL Statement step
    > type, specifically
    the cursor type set to forward only? Forward only
    > cursors do not allow for record counts.
    Everything on the Advanced tab of the Open SQL Statement step is set to "Use
    Default".
    Bob.

  • SQL query does not give me correct search results

    I have the code below for a search box with some fields input into the query.
    I want to be able to select all and only give results for a match of all the selected results.
    I know I have to use AND in the query.
    But it is giving me other cars in the results.
    So if I choose Alfa Romeo a BMW will be listed in the results too.
    $query = array();
    if(!empty($_GET[c]))
        $query[] = "cars_listings.CategoryID = '$_GET[c]' ";
    if(!empty($_GET[AgentID]))
        $query[] = "cars_listings.AgentID = '$_GET[AgentID]' ";
    if(!empty($_GET[search_country]))
        $query[] = "cars_agents.country = '$_GET[search_country]' ";
    if(!empty($_GET[search_state]))
        $query[] = "cars_agents.state = '$_GET[search_state]' ";
    if(!empty($_GET[search_city]))
        $query[] = "cars_agents.city = '$_GET[search_city]' ";
    //if(!empty($_GET[postcode]))
    //    $query[] = "cars_agents.postcode = '$_GET[postcode]' ";
    if(!empty($_GET[min]))
        $query[] = "cars_listings.price >= '$_GET[min]' ";
    if(!empty($_GET[max]))
        $query[] = "cars_listings.price <= '$_GET[max]' ";
    if(!empty($_GET[year1]))
        $query[] = "cars_listings.VehicleYear >= '$_GET[year1]' ";
    if(!empty($_GET[year2]))
        $query[] = "cars_listings.VehicleYear <= '$_GET[year2]' ";
    if(!empty($_GET[before]))
        $MyDate = strtotime("-$_GET[before]");
        $query[] = "cars_listings.DateAdded >= '$MyDate' ";
    if(!empty($_GET[cars]))
        $query[] = "cars_listings.VehicleMake <= '$_GET[cars]' ";
    if(!empty($query))
        $MyQuery = implode(" and ", $query);
        $MyQuery = " and ".$MyQuery;
    //////////        order by
    $order = array(); 
    if(!empty($_GET[orderby]))
        $MyOrder = explode("|", $_GET[orderby]); 
        while(list(,$ov) = each($MyOrder))
            if($ov == "DateAdded")
                $order[] = " cars_listings.DateAdded desc ";
            if($ov == "Price")
                $order[] = " cars_listings.Price asc ";
            if($ov == "address")
                $order[] = " cars_agents.address asc ";
    else
        if(!empty($_GET[p]))
            $order[] = " cars_listings.Price asc ";
        if(!empty($_GET[r]))
            $order[] = " cars_listings.mileage asc ";
        if(!empty($_GET[vehicle]))
            $order[] = " cars_vehicle.VehicleName ";
    if(count($order) > '0')
        $MyOrder = implode(", ", $order); 
    if(empty($MyOrder))
        $MyOrder = " order by cars_agents.PriorityLevel desc, cars_listings.DateAdded desc";
    else
        $MyOrder = " order by cars_agents.PriorityLevel desc, $MyOrder, cars_listings.DateAdded desc";
    if(!empty($_GET[Start]))
        $Start = $_GET[Start];
    else
        $Start = '0';
    $ByPage = '20';
    $pcode = $_GET[postcode];
    $q1 = "select * from cars_listings, cars_agents, cars_priority, cars_vehicle where cars_listings.AgentID = cars_agents.AgentID and cars_agents.PriorityLevel = cars_priority.PriorityLevel and cars_agents.AccountStatus = 'active' and cars_listings.VehicleMake = cars_vehicle.VehicleID $MyQuery $MyOrder limit $Start, $ByPage "; 
    I hope that is clear to you.
    This code was given to me by my client to amend with a postcode function.
    Problem is the postcode database table always outputs 3miles

    SELECT * FROM LFBK
                     INTO TABLE <ITABL>
                     FOR ALL ENTRIES IN IT_TIBAN
                     WHERE BANKN EQ IT_TIBAN-BANKN.
    As the Data element of TIBAN-BANKN and LFBK-BANKN is different, i afraid FOR ALL ENTRIES will also not work.. any way try or else compare with other keys like....
    SELECT * FROM LFBK
                     INTO TABLE <ITABL>
                     FOR ALL ENTRIES IN IT_TIBAN
                     WHERE BANKS eq IT_TIBAN-BANKS
                     AND       BANKL eq IT_TIBAN-BANKL
                     AND       BKNOT eq IT_TIBAN-BKNOT.
    If you list your requirement clear, then can help with create query with all tables...
    Thanks & Regards,
    SUJI.

  • Database Adapter does not generate proper output for PL/SQL table type

    Hi,
    I have a DB Adapter to invoke a stored procedure on Oracle which returns a table type.
    I am getting the following output from the adapter:
    </DB_Test_InputVariable><DB_Test_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/BPEL_DB_TEST/XXC_KEMET_TEST_PKG-24GETITEMONH/">
    <ITEM_QTY_UOM_OUT>
    <ITEM_QTY_UOM_OUT_ITEM>
    <SERIAL_NUM>1</SERIAL_NUM>
    <ITEM_QTY_OUT>1</ITEM_QTY_OUT>
    <UOM_OUT>BOX</UOM_OUT>
    </ITEM_QTY_UOM_OUT_ITEM>
    <ITEM_QTY_UOM_OUT_ITEM>
    <SERIAL_NUM>2</SERIAL_NUM>
    <ITEM_QTY_OUT>5</ITEM_QTY_OUT>
    <UOM_OUT>BOX</UOM_OUT>
    </ITEM_QTY_UOM_OUT_ITEM>
    </ITEM_QTY_UOM_OUT>
    </db:OutputParameters>
    </part>
    </DB_Test_OutputVariable>
    When I try to transform it, it tries to select /db:OutputParameters/db:ITEM_QTY_UOM_OUT/db:ITEM_QTY_UOM_OUT_ITEM/db:SERIAL_NUM from it and does not give me any output.
    I assume it's the same issue with namespace prefix.
    If anyone has faced a similar issue or knows how to fix this, please let me know.

    I am using a DB adapter to run a stored procedure for a simple Select Query with a table as my out parameter.This creates an XSD when the partner link is created.The elementFormDefault=qualified is by default formed in the xsd.When i change it to unQualified it returns me compilation error.
    Where do i need to change the root element?
    My output of BPEL(P.S. - I have used synchronous BPEL) on the console is
    Your test request was processed synchronously. It took 359.0milliseconds to finish and generated the following output:
    Value: <ProcessResponsehttp://www.w3.org/2001/XMLSchema-instancehttp://www.example.org>
    <null>
    <null>
    <null>database_K_DKL_NW02</null>
    <null>2008-07-07T00:00:00.000+05:30</null>
    <null>2008</null>
    <null>3435</null>
    <null>http://www.google.com</null>
    </null>
    <null>
    <null>database_config.txt</null>
    <null>2006-03-14T00:00:00.000+05:30</null>
    <null>2006</null>
    <null>342345</null>
    <null>\\01hw180464\MOTO\database_config.txt</null>
    </null>
    <null>
    <null>database_help.txt</null>
    <null>2008-07-01T00:00:00.000+05:30</null>
    <null>2008</null>
    <null>68</null>
    <null>\\01hw180464\MOTO\database_help.txt</null>
    </null>
    <null>
    <null>database_search.txt</null>
    <null>2007-12-03T00:00:00.000+05:30</null>
    <null>2007</null>
    <null>365</null>
    <null>\\01hw180464\MOTO\database_search.txt</null>
    </null>
    </null>
    </ProcessResponse>
    whereas the output shown in Invoke in the visual flow is
    <messages>
    -<Invoke_1_Callin_Db_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    -<InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/VODAT/BPEL_CALLIN_DB/MOTOROLA_BSC_DB-24VIEW_MOTOROLA/">
    <IN_FILENAME/>
    </InputParameters>
    </part>
    </Invoke_1_Callin_Db_InputVariable>
    -<Invoke_1_Callin_Db_OutputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    -<db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/VODAT/BPEL_CALLIN_DB/MOTOROLA_BSC_DB-24VIEW_MOTOROLA/">
    -<MYCURSOR>
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_K_DKL_NW02
    </SOFTWARE_PKGS>
    <CREATION_DATE>2008-07-07T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2008
    </CREATION_TIME>
    <FILE_SIZE>3435
    </FILE_SIZE>
    <FILE_PATH>http://www.google.com
    </FILE_PATH>
    </MYCURSOR_ITEM>
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_config.txt
    </SOFTWARE_PKGS>
    <CREATION_DATE>2006-03-14T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2006
    </CREATION_TIME>
    <FILE_SIZE>342345
    </FILE_SIZE>
    <FILE_PATH>\\01hw180464\MOTO\database_config.txt
    </FILE_PATH>
    </MYCURSOR_ITEM>
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_help.txt
    </SOFTWARE_PKGS>
    <CREATION_DATE>2008-07-01T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2008
    </CREATION_TIME>
    <FILE_SIZE>68
    </FILE_SIZE>
    <FILE_PATH>\\01hw180464\MOTO\database_help.txt
    </FILE_PATH>
    </MYCURSOR_ITEM>
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_search.txt
    </SOFTWARE_PKGS>
    <CREATION_DATE>2007-12-03T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2007
    </CREATION_TIME>
    <FILE_SIZE>365
    </FILE_SIZE>
    <FILE_PATH>\\01hw180464\MOTO\database_search.txt
    </FILE_PATH>
    </MYCURSOR_ITEM>
    </MYCURSOR>
    </db:OutputParameters>
    </part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]
    </part>
    </Invoke_1_Callin_Db_OutputVariable>
    </messages>
    and the output shown in ReplyOutput is :-
    <outputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    -<ProcessResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.example.org">
    -<MYCURSOR xmlns="">
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_K_DKL_NW02
    </SOFTWARE_PKGS>
    <CREATION_DATE>2008-07-07T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2008
    </CREATION_TIME>
    <FILE_SIZE>3435
    </FILE_SIZE>
    <FILE_PATH>http://www.google.com
    </FILE_PATH>
    </MYCURSOR_ITEM>
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_config.txt
    </SOFTWARE_PKGS>
    <CREATION_DATE>2006-03-14T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2006
    </CREATION_TIME>
    <FILE_SIZE>342345
    </FILE_SIZE>
    <FILE_PATH>\\01hw180464\MOTO\database_config.txt
    </FILE_PATH>
    </MYCURSOR_ITEM>
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_help.txt
    </SOFTWARE_PKGS>
    <CREATION_DATE>2008-07-01T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2008
    </CREATION_TIME>
    <FILE_SIZE>68
    </FILE_SIZE>
    <FILE_PATH>\\01hw180464\MOTO\database_help.txt
    </FILE_PATH>
    </MYCURSOR_ITEM>
    -<MYCURSOR_ITEM>
    <SOFTWARE_PKGS>database_search.txt
    </SOFTWARE_PKGS>
    <CREATION_DATE>2007-12-03T00:00:00.000+05:30
    </CREATION_DATE>
    <CREATION_TIME>2007
    </CREATION_TIME>
    <FILE_SIZE>365
    </FILE_SIZE>
    <FILE_PATH>\\01hw180464\MOTO\database_search.txt
    </FILE_PATH>
    </MYCURSOR_ITEM>
    </MYCURSOR>
    </ProcessResponse>
    </part>
    </outputVariable>
    Can you please tell me why am i getiing null value in my output xml in my BPEL console??
    What is the solution?where do i need to change the db: prefix?

  • Netctl fails to connect to a wireless network and does not give detail

    If I try to connect to a wireless network (WEP, DHCP) using netctl I get "Jon for netctl@wlp2s0\x2dnetworkname.service failed." and two commands (journalctl -xn and systemctl status ...) that should give details about the error.
    However, both of them give the following lines:
    oct 05 14:44:25 laptop network[422]: Starting network profile 'wlp2s0-networkname'...
    oct 05 14:44:30 laptop network[422]: Failed to bring the network up for profile 'wlp2s0-networkname'
    oct 05 14:44:30 laptop systemd[1]: netctl@wlp2s0\x2dnetworkname.service: main process exited, code=exited, status=1/FAILURE
    oct 05 14:44:30 laptop systemd[1]: Failed to start Networking for netctl profile wlp2s0-networkname.
    oct 05 14:44:30 laptop systemd[1]: Unit netctl@wlp2s0\x2dnetworkname.service entered failed state.
    Just one line saying that it was trying to connect and four lines repeating the same thing (connecting failed), but it does not give any detail at all.
    The netctl profile is:
    Interface=wlp2s0
    Connection=wireless
    Security=wep
    ESSID=networkname
    IP=dhcp
    Key=\"hex-password
    Last edited by eduardosm (2014-10-05 14:01:02)

    MoonSwan wrote:Either this Key=\"hex-password was a typo when you cut & pasted that code or your issue is that you need a closing " symbol.  So your line should read:  Key=\"hex-password".
    If you look at the netctl.profile man page, it explains some special quoting rules at the end.  The literal double-quote (or escaped double-quote) actually just results in a non-quoted string when passed from netctl to the underlying supporting software.  This is apparently necessary if the WEP key is in hexadecimal.

  • My external LaCie drive gets an error message "the disc you inserted was not readable by this computer." The only options offered are "ignore" or "eject" Disk Utility sees the disc but does not give a repair option. What can I do?

    When I plug in my external LaCie drive I get an error message "the disc you inserted was not readable by this computer."
    The only options offered are "ignore" or "eject"
    Disk Utility sees the disc but does not give a repair option.
    What can I do?

    The good thing about mac-centric resellers such as OWC, is they have people on staff that can answer questions without you buying things first. They also have how-to information, and instructions are included in many of their products. I saw a link to watch a DIY video in one of their pages; an example of a RAID (with its own power supply) is shown on their drives page. Also a few in there, with no power supplies, for less money.
    If I were looking to backup and perhaps also have a partition for a system clone, I'd consider something like one of these: http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB
    Some ideas on the RAID backup methods appear in google search, some of the pages are ideas and concepts; and the better ones also warn about using RAID for the only backup plan.
    Oh, OWC has live chat. Haven't tried it, nor have I bought anything from them. I have what appears to be two products from them, but have not used either. One is in a box as-new, but has only USB2.0 ports & my Macs needed FW400/800. It has been said their RAM is a good way to upgrade, too. But I can't confirm!
    A 'RAID-ready' unit for backup may be more versatile for just that, but I have not checked into these details. I use single HDDs in powered enclosures, and usually manually make backup clones to FW drives, of bootable OS X systems. Some of the OWC raid-ready use eSATA ports so that may not be viable for a computer without them.
    The unused in-box external drive I have is like the base model in the link above. However mine is USB2.0 (maybe) and won't boot my older Macs due to hardware variance; and my preference would be for FireWire options, these models do offer that. But the one I have does not. Dual 500GB HDDs, and they could be used in tandem as a RAID. That would be a choice set up in software. I'm not sure and not interested enough to read up just now.
    My backup method is not automatic, or a moving backup plan, if I don't get a move-on and make full system clones. I do make copies of photos and documents the manual way, to USB external drives; and occasionally backup to DVD or CD media. And USB flash, that helps to move files between computers without need to use file sharing via wi-fi. {Like Why fly? Walking is better exercise unless one is a bird. Squawk!}
    https://www.google.com/#q=raid+backup+mac
    Depending on the ports in your Mac, you may be able to use other cables to attach between a backup or externally enclosed hard disk drive with multiple partition and bootable clone in one of them. Not sure about the Thunderbolt, and where that is the main port, adapters are required to access other devices, as allowed.
    Anyway, I am going on and on, yet not really saying anything.
    My ideas would not be all that interesting to follow as a backup
    plan when matching available newer hardware to task, but you
    can get some into better ideas if you are not in a rush. Get a
    good setup and then look into more an betterer stuff.
    Good luck & happy computing!

  • SQL Query - The number of columns specified in "SQL Query" does not match t

    I am creating new UDM for tablespace alert, below is my query,however its failing with error
    SQL Query - The number of columns specified in "SQL Query" does not match the value specified in "SQL Query Output"
    I selected Metric type is number
    SQL Query Format : Two columns
    Query:
    SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2)
    used_pct FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    Any clues why i am getting error.

    SQL> SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2) used_pct
    2 FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    3 WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    4 AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    TABLESPACE_NAME USED_PCT
    MGMT_TABLESPACE .82
    SYSAUX 1.52
    UNDOTBS1 .32
    RMAN .02
    CORRUPT_TS 10.63
    USERS 0
    SYSTEM 2.26
    MGMT_ECM_DEPOT_TS .04
    MGMT_AD4J_TS 0

  • Can't Create a Data Source - Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

    Hi there,
    I am having a serious issue with The Power BI Data Management Gateway which I am hoping that someone can help me with.
    Basically I am setting a connection between a Power BI demo site and a SQL 2012 Database based on Azure. The Data Management Gateway and is up and running, and Power BI has managed to connect to it successfuly.
    By following the tutorials at
    here I was able to successful create my Data Connection Gateway with a self-signed certificate.
    However, when trying to create the data source I come into problems. The Data Source Manager manages to successfully resolve the hostname, as per the screenshot below:
    Bear in mind that I exposed the require ports in Azure as endpoints and I managed to modify my hosts file on my local machine so I could access the SQL server hosted in Azure using its internal name -- otherwise I would not be able to get this far.
    However the creation of the data source also fails when trying to created it whilst logged in the SQL server in question:
    The Data Source Manager returns the error when using the Microsoft OLE DB Provider for SQL Server:
    Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
    I tried using the SQL Server Native Client 11.0 instead but I also get an error. This time the error is:
    Failed to test connection. Login timeout expiredA network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.Named Pipes Provider: Could not open a connection to SQL Server [53]. 
    Some considerations
    If I provide an invalid username/password, the Data Source Manager does say that the username and password is incorrect.
    Firewall is turned off in the SQL Server (either way, this error also happens if I try top use the Data Source Manager whilst logged in the SQL Server itself).
    SQL Profiler does not show any attempt of connection.
    The SQL server instance in question is the default one.
    The error happens regardless if I select the option to encrypt connection or not.
    In SQL Configuration manager I can see that all protocols are enabled (TCP/IP, Named Pipes and Shared Memory.
    The Event Viewer does not provide any further errors than the one I have copied in this post.
    I'm at a loss here. Could someone please advise what might I be doing wrong?
    Regards,
    P.

    Here is what I had to do to solve this issue:
    Basically I had to add the MSSQL TCP/IP port as an end-point in Azure. After I did that, then I was able to create the data-source. However, I was only able to authenticate with a SQL account, as any domain account would return me an error saying that the
    domain isn't trusted.
    What puzzles me here is how come the Data Source Manager would inform me that an account username/password was invalid, but it would fail/timeout if I provided valid credentials (!?!?!!?)

  • OLE DB or ODBC error: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

    Hi,
    I have one client and one server.  In both hosts I created an OS-user named User1.
    The user have been given various role under the prefix SQLServer2005.
    The default instance of SQL Server and instance (background-process) of
    Analysis Service are also run under User1.
    I connected via Management Studio to Analysis Service directly in the
    server.  I set the permission to access Analysis Service to Everyone. 
    This means everyone should be able to use Analysis Service.  I have set
    ODBC data source to the server.  Testing was successful.
    I created a project to create a cube.  The tables are fairly small (total 300 MB, biggest one 290).
    On project setting (created at client) I set the server host as
    deployment target. I managed to deploy project when all I have are Data
    Source and Data Source Views.
    But on deployment I always failed.   The errors remain the same, begins with
    OLE DB error: OLE DB or ODBC error: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.; 08001.
    I have tried 4 combinations of Impersonation :
    (A) Use a specific username and password
      * in which I supply User1 and the password of User1
    (B) Use the service account
    (C) Use the credentials of the current user
    (D) Default
    Why is this? The server does certainly exist.  I think the error message is wrong.
    I have seen 3 posting that seems related.  One of them say the solution is giving the right impersonation, but gave no detail.  About the privilege, User1 are granted the role of
    SQLServer2005MSOLAP.  What is the solution?
    Thank you,
    Bernaridho

    I just had this problem and solved it by creating an alias in SQL Server Configuration Manager, as below:
    Scenario: My SQL server is accessible from the internet under my.domain.com, and from itself at ServerName. But the local network can't see itself through the router at my.domain.com, so the deployed project is unable to process the cube, since that would
    require Analysis Services to be able to see the SQL Server at my.domain.com, which it can't do.
    So I changed the server in my project from my.domain.com to ServerName, and I created a local alias to ServerName in SQL Server Configuration Manager, under SQL Native Client 11.0 Configuration, Aliases. In my case, I pointed it to localhost port 1333, and
    used SSH -L 1333:my.domain.com:1433, but I could have pointed the alias directly to the server, just as well. (Verifying... yes, that worked too, so you can forget SSH if you have no interest in it.)

  • Cannot delegate Reporting Services Web access to domain user / group, User does not have required permissions

    Hi
    I have an SCCM 2012 SP1 CU3 installation on a Server 2008 R2 + SQL 2008 R2.
    I'm having trouble delegating Reporting Services Web Access to a standard domain user.
    I have followed the instructions from these blogs:
    http://blog.coretech.dk/kea/creating-the-reporting-user-role-in-configmgr-2012/
    http://www.wolffhaven45.com/blog/sccm/assigning-users-to-configmgr-reportusers-group-in-sccm-2012/
    No matter how I try, I cannot get the reports to show for a standard domain user. In the console no reports are showing and in the web access I get
    "User domain\user does not have required permissions........"
    The only thing that is consistenly working when I test is to put the AD Group on the Security Role "Full Administrator".
    Then everything will show up.
    Any ideas on how to troubleshoot this?

    Thanks everyone for helping me with tips. I have now solved the problem. It was the permissions from SCCM that did not replicate to the Reporting Server.
    In srsrp.log I got these error messages:
    Could not retrieve the reporting service name for instance 'MSSQLSERVER'
    Invalid class
    Could not stop the reporting serviceAfter googling a litte I found these 2 sites with similiar problems:http://social.technet.microsoft.com/Forums/en-US/d4a7f93a-506f-4e3f-b5fc-bd2b087277da/ssrs-permissions-do-not-add?forum=configmanagergeneral
    http://www.microtom.net/microsoft-system-center/software-distribution/sccm-2012-reporting-services-do-not-install
    So I ran the command for SQL 2008 R2: mofcomp.exe C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof
    and BAAM, everything started to work =)
    /ALX

  • Ui!ReportManager_0-1!219c!08/07/2014-16:18:21:: e ERROR: Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User 'SSRS_SERVER\SSRS_user1' does not have required permissions. Verify that sufficient permissions have been

    I installed SSRS on an existing instance. Configured SSRS using report manager, loaded some reports and they work as expected.
    The problem is I can not launch(IE)  Report Manager UI due to error in description. I can launch the Report Manager IF I RUN IE AS ADMINISTRATOR. The details of error from SSRS log file listed below.
    The main page SSRS page starts to display. The display starts with "Home | my subscriptions |site Settings..." in upper right side, and "SQL Server Reporting Services" in upper left. Then the error displays
    User 'SSRS_SERVER\SSRS_user1' does not have required permissions. Verify that sufficient     permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.
    Starting IE as administrator starts the Report Manager with out problems.
    Does anyone have suggestion, is more information needed?  Thanks, Joe
    library!ReportServer_0-2!f4c!08/07/2014-16:18:21:: i INFO: Call to GetPermissionsAction(/).
    ui!ReportManager_0-1!219c!08/07/2014-16:18:21:: e ERROR: Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User 'SSRS_SERVER\SSRS_user1' does not have required permissions. Verify that sufficient permissions have been
    granted and Windows User Account Control (UAC) restrictions have been addressed.
       at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Web.UI.Control.OnInit(EventArgs e)
       at System.Web.UI.Page.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    library!ReportServer_0-2!f4c!08/07/2014-16:18:21:: i INFO: Call to GetSystemPermissionsAction().
    ui!ReportManager_0-1!219c!08/07/2014-16:18:21:: e ERROR: HTTP status code --> 500
    -------Details--------
    Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User 'SSRS_SERVER\SSRS_user1' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions
    have been addressed.   at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)   at System.EventHandler.Invoke(Object sender, EventArgs e)   at System.Web.UI.Control.OnInit(EventArgs e)  
    at System.Web.UI.Page.OnInit
    (EventArgs e)   at System.Web.UI.Control.InitRecursive(Control namingContainer)   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    library!ReportServer_0-2!f4c!08/07/2014-16:18:21:: i INFO: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-1!219c!08/07/2014-16:18:21:: e ERROR: System.Threading.ThreadAbortException: Thread was being aborted.
       at System.Threading.Thread.AbortInternal()
       at System.Threading.Thread.Abort(Object stateInfo)
       at System.Web.HttpResponse.End()
       at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
    library!ReportServer_0-2!2538!08/07/2014-16:19:00:: i INFO: Call to GetPermissionsAction(/).
    ui!ReportManager_0-1!219c!08/07/2014-16:19:00:: e ERROR: Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User 'SSRS_SERVER\SSRS_user1' does not have required permissions. Verify that sufficient permissions have been
    granted and Windows User Account Control (UAC) restrictions have been addressed.
       at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Web.UI.Control.OnInit(EventArgs e)
       at System.Web.UI.Page.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    library!ReportServer_0-2!2538!08/07/2014-16:19:00:: i INFO: Call to GetSystemPermissionsAction().
    ui!ReportManager_0-1!219c!08/07/2014-16:19:00:: e ERROR: HTTP status code --> 500
    -------Details--------
    Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User 'SSRS_SERVER\SSRS_user1' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions
    have been addressed.   at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)   at System.EventHandler.Invoke(Object sender, EventArgs e)   at System.Web.UI.Control.OnInit(EventArgs e)  
    at System.Web.UI.Page.OnInit
    (EventArgs e)   at System.Web.UI.Control.InitRecursive(Control namingContainer)   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    library!ReportServer_0-2!1c98!08/07/2014-16:19:00:: i INFO: Call to GetSystemPropertiesAction().
    ui!ReportManager_0-1!219c!08/07/2014-16:19:00:: e ERROR: System.Threading.ThreadAbortException: Thread was being aborted.
       at System.Threading.Thread.AbortInternal()
       at System.Threading.Thread.Abort(Object stateInfo)
       at System.Web.HttpResponse.End()
       at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
    library!WindowsService_0!202c!08/07/2014-16:20:52:: i INFO: Call to CleanBatch()
    library!WindowsService_0!202c!08/07/2014-16:20:52:: i INFO: Using folder N:\WFSLR_JOE\MSRS11.WFSLR_JOE\Reporting Services\RSTempFiles for temporary files.
    library!WindowsService_0!202c!08/07/2014-16:20:52:: i INFO: Cleaned 0 batch records, 0 policies, 1 sessions, 0 cache entries, 1 snapshots, 4 chunks, 0 running jobs, 0 persisted streams, 4 segments, 4 segment mappings, 0 edit sessions.
    library!WindowsService_0!202c!08/07/2014-16:20:52:: i INFO: Call to CleanBatch() ends

    Hi Joseph_SQL,
    The following operating systems limit the overuse of elevated permissions by removing administrator permissions when accessing applications: Windows Server 2012 R2, Windows 8.1, Windows 8, Windows Server 2012, Windows Server 2008 R2, Windows 7, Windows Server
    2008 and Windows Vista.
    Because the noted operating systems limit permissions, members of the local Administrators group run most applications as if they are using the Standard User account. To avoid open Report Manager in Internet Explorer always using Run as administrator option,
    we can refer to the following configuration steps:
    Add Reporting Services URLs to trusted sites.
    Report Manager Folder Settings
    Report Manager Site Settings
    For more details about how to configure the settings, please refer to the following article:
    http://msdn.microsoft.com/en-us/library/bb630430(v=sql.110).aspx. After finishing the configuration, we can re-open Report Manager in Internet Explorer without using
    Run as administrator.
    Hope this helps.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • The SQL statement is not valid - when importing data from SQL Server using a query

    Hi there,
    I am trying to import data from SQL to Power Pivot using a SQL query like below:
    SELECT Score.FieldCount, Score.Record.GetAt(0), Score.Record.GetAt(1),  Score.Record.GetAt(2),  Score.Record.GetAt(3),  Score.Record.GetAt(4)
    FROM 
    SELECT * FROM dbo.CLR1(
    dbo.CLR2('c:\FILES\Test.xml'), 
    'SELECT * FROM [dbo].[CXCustomer_Small]') Input
    ) Score
    And when I tried to validate it, it returns
    The SQL statement is not valid. A column name cannot be blank.
    I ran the above SQL statement in Management Studio and it works without problem. Any idea?
    Thanks!
    Chu
    -- Predict everything. http://www.predixionsoftware.com

    Never mind, I figured out - I need to give each column a name.
    -- Predict everything. http://www.predixionsoftware.com

  • NonLinearFitWithMaxIters does not give correct results for phase

    Dear all,
    I am trying to fit a sin cuve with NonLinearFitWithMaxIters function of labwindows, but the results given by this function are dispersed a lot (the function does not give same results).
    In fact, I have two waveforms signals v and i (of 104 points), and I  find the phase between the two signals with NonLinearFitWithMaxIters.
    The two singals v and i are  measured with an osciloscope.
    I use the following fit functions :
    v=p1*sin(wt+p2) ;
    i=p3*sin(wt+p4) ;
    I use the NonLinearFitWithMaxIters function to fit the data and to have the parameters  p1, p2, p3, p4. Then, the phase is claculated as follow phase=p4-p3.
    The problem is that the phase calculted between the two signals (v and i) is different for each run for the same conditions.
    In fact, for a same condition, I measure different times the signals v and i, and I calculate the phase p4-p3, using NonLinearFitWithMaxIters. The goal is to calculate a mean of phases for the same condition. For example, there are cases where the phase=-5 degree, and other cases when phase=12 degree.
    For ten measures of v and i, the phase calculated is different. I get a big dispersion between the phases.
    I would like to know please why I have a big difference in phases calculated with the same condition?whern using NonLinearFitWithMaxIters.
    I read that this function does not give all time the correct results, is there a way to know when the results are not corrects and when they are correct ?
    And is there any solution to find accuratly the phase between the two waveforms.
    Thank you for your precious answer.

    The pseudocode which I am using is :
    v_err=NonLinearFitWithMaxIters(array_x,array_v,v_y_fit,1252,100,sinus,v_coef,2,&v_mean_squareError);
    The fit function is
    double sinus(double x, double a[],int noef){
        return (a[0]*sin((w*x)+a[1]));
     I use the same inital coeficient of v_coef for each run :     
    v_coef[0]=0.03;
    v_coef[1]=0.2;
    These coeficient are choosen arbitrary.
    In this case, the number of points of the data is 1252 (the data of array_v).
    The number of iterations is 100.
    For the array_x, the distance between adjacents values of the array is dt=0.4*1e-9(difference between array_x[i] anv array_x[i+1]=dt=0.4*1e-9 ).
    for (i=0;i<1252;i++){
    array_x[i]=i*(0.4*1e-9);
    The means square error returnned by the function when it is complished is  small, of the order of 0,001.
    I read the help
    « From the help:
    You must pass a pointer to the nonlinear function f(x,a) along with a set of initial guess coefficients a. NonLinearFitWithMaxIters does not always give the correct answer. The correct output sometimes depends on the initial choice of a. It is very important to verify the final result.
    That means that the function cannot be used, as it does not give correct results. How
    can we check if the results are good or not ? in my case.
    I think that in my case, the function does not give correct results, but how can I check if the results are good, or not ? The mean square error is small.

  • Any advice on how to switch to ICloud on my 3g IPhone?  I am supposed to install OS 5, but the dialogue box says that my 4.2.1 OS is the current version and does not give me the option of downloading OS5.  Apple says I have to be running 5 to switch.

    Any advice on how to switch to ICloud on my 3g IPhone?  I am supposed to install OS 5, but the dialogue box says that my 4.2.1 OS is the current version and does not give me the option of downloading OS5.  Apple says I have to be running OS5 to switch.

    "iCloud requires iOS 5 on iPhone 3GS or later, iPod touch (3rd and 4th generation), iPad, or iPad 2; a Mac computer with OS X Lion
    From here >  http://www.apple.com/icloud/

  • Sys.sql_Module does not give full defination of store procedure

    I want to get a defination of a store procedure by using sys.sql_Module
    Beflow is the query i use 
    SELECT  
    @spTxt =ISNULL(smsp.definition, ssmsp.definition)) 
    FROM sys.all_objects AS sp
    LEFT OUTER JOIN sys.sql_modules AS smsp ON smsp.object_id = sp.object_id
    LEFT OUTER JOIN sys.system_sql_modules AS ssmsp ON ssmsp.object_id = sp.object_id
    WHERE (sp.type = N'P' OR sp.type = N'RF' OR sp.type='PC')and(sp.name=@SpName 
    and SCHEMA_NAME(sp.schema_id)=@SchemaName)
    @SchemaName = SCHEMA 
    ANd @SpName = Store procedure Name.
    This query does not give me complete store procedure.
    Is there any other table i need to join and I can get full defination?
    Thank you.
    BM19.23

    You're confusing what's being stored vs what's being displayed. The full proc is being stored in the definition column. It's just that SSMS won't display the full content of the cell.
    The following is a proc that we use to overcome this situation... (I have no clue who the original author is)
    CREATE PROCEDURE [dbo].[LongPrint]
    @String NVARCHAR(MAX)
    AS
    Example:
    exec LongPrint @string =
    'This String
    Exists to test
    the system.'
    /* This procedure is designed to overcome the limitation
    in the SQL print command that causes it to truncate strings
    longer than 8000 characters (4000 for nvarchar).
    It will print the text passed to it in substrings smaller than 4000
    characters. If there are carriage returns (CRs) or new lines (NLs in the text),
    it will break up the substrings at the carriage returns and the
    printed version will exactly reflect the string passed.
    If there are insufficient line breaks in the text, it will
    print it out in blocks of 4000 characters with an extra carriage
    return at that point.
    If it is passed a null value, it will do virtually nothing.
    NOTE: This is substantially slower than a simple print, so should only be used
    when actually needed.
    DECLARE @CurrentEnd BIGINT, /* track the length of the next substring */
    @offset TINYINT /*tracks the amount of offset needed */
    SET @string = REPLACE( REPLACE(@string, CHAR(13) + CHAR(10), CHAR(10)) , CHAR(13), CHAR(10))
    WHILE LEN(@String) > 1
    BEGIN
    IF CHARINDEX(CHAR(10), @String) BETWEEN 1 AND 4000
    BEGIN
    SET @CurrentEnd = CHARINDEX(CHAR(10), @String) -1
    SET @offset = 2
    END
    ELSE
    BEGIN
    SET @CurrentEnd = 4000
    SET @offset = 1
    END
    PRINT SUBSTRING(@String, 1, @CurrentEnd)
    SET @string = SUBSTRING(@String, @CurrentEnd+@offset, 1073741822)
    END /*End While loop*/
    GO
    To use the proc, you'd do something like this...
    DECLARE @sql VARCHAR(MAX)
    SELECT @sql = sm.definition FROM sys.sql_modules sm WHERE sm.object_id = 892230629
    EXEC dbo.LongPrint @sql
    HTH,
    Jason
    Jason Long

Maybe you are looking for