.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Generic Query Designer displaying non standard syntax

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :Sql Server
I've just discovered a problem with the Generic Query Designer on my machine. When I do a simple join of two tabels it does not display in the SQL pane as standard syntax, so instead of SELECT a.1 from ainner join b on a.1=b.1It does SELECT a.1from a, bwhere a.1 = b.1I am doing this against an oracle 10g database, it will run the query, but I want the query designer to out put at standard SQLI am presuming that it is a setting in SSBIDS, but I don't know why it is doing this. Any suggestions?

View Complete Post

More Related Resource Links

Need Syntax To Make Results of LINQ Union Return Non-Generic Type



I have the below SQL which works just fine:

SELECT     Message, CreateDate, AccountId, AlertTypeId
FROM       dbo.Alerts
SELECT     TOP (100) PERCENT Status, CreateDate, AccountId,
                          (SELECT     10 AS Expr1) AS AlertTypeId
FROM         dbo.StatusUpdates
WHERE AccountId = PassedInParameter

I have been going about trying to convert the above into a LINQ method and am having problems with return types.
As the above SQL illustrates, I am querying two distinct LINQ tables - Alerts and StatusUpdates -
and then attempting to perform a Union on them. In order to do the union in LINQ, I have to have agreeing types. So, I
am using "var" to make the results of "alerts" and "updates" generic before the union.  

public IList GetStatusUpdatesAsAlertsByAccountId<T>(Int32 accountId)
            using (WorkbookDataContext dc = _conn.GetCont

Data Points: Standard Query Operators with LINQ


LINQ to Objects and LINQ to Entities have an arsenal of Standard Query Operators that operate on sequences to perform a wide variety of operations.

John Papa

MSDN Magazine March 2008

Syntax error (missing operator) in query expression

Good Day Gurus!

I have a Excel user application which has a user form (named 'Registo') that displays criteria and an image that has been entered in it's corresponding spreadsheet. This works the way it should.  There's also the ability to search the spreadsheet via a form (by clicking 'Pesquisar' button) this opens a search form. However, I having a bit of a problem with it. When I try to search for something it basically doesn't do anything at all. It just sits there. So I tried to debug it and I think I'm having a problem with either the JET db engine or somethign with teh query or maybe I don't have the correct reference.

I 'borrowed' this Excel application from another forum because it's exactly what I'm looking for! However, I suck at vb.

So I was hoping somebody could take a look at the code and see if I'm missing something?  I'm kinda' desparate to get this working because I'm been trying to figure it out for days and I'm running out of time.  Cry
Option Explicit

'constantes para auxiliar na verificação do código
Private Const Ascendente As Byte = 0

Storing and displaying user input (encoding query)

Hello,I've just been reading up a little on security regarding user input and how to handle html and scripts.My question is, what if I build my own CMS?Isn't it inevitable that I'll want to store html code, possibly scripts, and almost certainly apostrophes and special characters, and then display them again.What's the best way to do this, since I wont want to display the encoded html, but the html itself.Would it be to encode everything then when I want to actually display the html, decode it, but everywhere else, keep it encoded?I'm just trying to think of all the scenario's that I could come across when I accept user input where I don't know what they could be typing in.What if I WANT the user to be able to display html?Is it possible to decode only some tags but leave all other tags encoded? 

Sub Query Syntax

Hi All, I know this is a repost but I have struggled though it and managed to nut most of the issues from this query. An issue I am still getting are multiple values returned by a sub query... Which one SQL doesn't like to clue me into. Below is the stored procedure and I know it is mess, this is reverse engineering a terrible application.   USE [CMI] GO /****** Object: StoredProcedure [dbo].[CMIReport] Script Date: 09/02/2010 09:49:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[CMIReport] @startdate datetime, @enddate datetime as BEGIN ---- ~This drops the tables created by the report before recreating it~ ---- DROP TABLE CMI_Report DROP TABLE CMI_Report_Final_Data ---- ~This Query defines the dates early on in the procedure~ ---- SET NOCOUNT ON select * into CMI_Report from Case_Query_View where end_dt Is Null Or end_dt > @startdate and end_dt < @enddate --- ~This Query Replaces Name Veiw in the Report~ ---- select * into CMI_Report_Final_Data from Name_View ---- ~This is the defining query, This controls YTD and such! ---- SELECT nq.surname, nq.sw_ur, nq.MaxOfnext_rev_dt, cq.CTenddt, aq.LastOfadm_dt, aq.LastOfsep_dt, nq.end_dt, nq.clnt_id, nq.case_id, nq.HCPName, nq.hcp_id, cq.LastOfstart_dt, nq.MaxOfwellb_dt, (select MAX(dq.icd_desc) from Diagnosis_View dq where nq.clnt_id = dq.clnt_id) AS Diag

BIDS Query Designer very slow in VS 2008

I am in the process of upgrading my Report Server projects from 2005 to 2008.  These reports use an Analysis Services 2005 data source and have queries that are anywhere from 20 to 100 lines of MDX.  After upgrading a report, when I open or save a dataset in the Query Designer, it takes up to 20 seconds.  In 2005, this would happen almost instantly. Running SQL Server Profiler, I see that there is an extensive number (600+) of Discover events going on with the Analysis Services server while the Query Designer loads. My version of Visual Studio is 9.0.30729.1 SP and I am running Windows XP SP2. Thanks, Mitch

BIDS Query Designer very slow

BIDS Query Designer seems to be very slow while saving the query or opening the query designer when you've got quite a lot of Query Parameters. When I remove all the query parameters, the query designer seems to be running smoothly. Editing a query with about 10 to 15 query parameters takes ages this way! Is there something I can do about this?!

MDX works fine in SSMS but not in query designer

Hi all,   I am trying to include this query in my query designer in SSRS. The query below is as follows:WITH MEMBER [Time].[Fiscal Month].[All].[ Subtotal] AS ' AGGREGATE( EXISTING { [Time].[Fiscal Month].[All].CHILDREN }) ', SOLVE_ORDER = 1000  SELECT NON EMPTY { { { { [Time].[Fiscal Month].[All].CHILDREN }, { [Time].[Fiscal Month].[All].[ Subtotal] } } * { { [Measures].[SKU Distinct Count] } } } } ON COLUMNS , NON EMPTY { [Sales Force].[Retailer Code].[All].CHILDREN } ON ROWS  FROM [Sales]CELL PROPERTIES VALUE, FORMATTED_VALUE, CELL_ORDINAL The error i am getting isThe query cannot be prepared: The query must have at least one axis. The first axis of the query should not have multiple hierarchies, nor should it reference any dimension other than the Measures dimension..Please let me know where am i going wrong.Thanks and regards,ram

Query Designer question

I am not sure where to post this question, so I guess it is here: I have a VERY large query that joins quite a few tables. I am using the graphical designer to get the tables all linked together. However the graphical designer seems to place the order of the tables in a random order resulting in a hodge podge of left and right joins.   In the graphical designer, is there a way to order the from clause?

Query Designer - Pane - Results grayed-out?

In Query Designer, right click, select pane -- the option for Results is unavailable (grayed-out)?

WPF Designer not displaying controls in the toolbox VS2008 Prof Edn running on Windows 7

My Version Microsoft Visual Studio 2008 Version 9.0.30729.4462 QFE Microsoft .NET Framework Version 3.5 SP1 I have windows 7 home premium running on my machine I installed Visual C# 2008 Express Edn with SP1 first I got that running I then installed rest of the Express components including SQL. I then installed Visual Studio 2008 Prof Edn with .Net 3.5 SP1 I then installed .Net 4.0 I run two instance of  C# IDEs. The Pro End and the Express Edn. Both Express/Prof C# versions display controls in toolbox for Windows Forms correctly. I only have problems with controls in toolbox for WPF in VS 2008 Prof Edn. My Scenario : When I use Express Edition the design view of the WPF Designer, it displays the toolbox with controls populated for WPF that I can use. When I use Pro Edition the design view of the WPF Designer, it displays the toolbox with  NO controls visible for WPF  that I can use.  The toolbox has only  "general" tab with the words "not usable controls....". If I do a show all it does show controls but they are disabled/read only. When I look at the Tools -> Choose Toolbox Item , I get the tools dialog box. Inside the box within the WPF Components TAB all controls are not ticked/selected. If I tick the Button Control and select OK, the control does not appear on the toolbox. I have done reset Toolbox no change. I

syntax problem passing parameter into Indexing Service Query

Hi everyone, I have the following query which works fine: select OriginalFileName from Document_Entries where EntryType like 'File%' and substring(entry,charindex('file_',entry),LEN(entry)) in (  SELECT filename FROM OPENQUERY(MySearchCat, 'SELECT Directory, FileName FROM SCOPE() WHERE    CONTAINS('' "green" '') ') )  It finds all documents in the document system which contain the word "green" using the index catalog.  My problem is that i need to include this query in a larger stored procedure which accepts a parameter for key words amongst others. I can't work out the syntax to get the @keywords parameter into query. The closest I've come is the following which runs but comes back with "incorrect syntax near keyword 'green'".  The @keywords parameter will contain any key words the user enters.   declare @keywords nvarchar(500) set @keywords='green'   Declare @query nvarchar(max) set @query = ' select OriginalFileName from Document_Entries where EntryType like ''File%'' and substring(entry,charindex(''file_'',entry),LEN(entry)) in (  SELECT filename FROM OPENQUERY(MySearchCat, ''SELECT Directory, FileName FROM SCOPE() WHERE    CONTAINS(''' + @keywords + ''') '')     )  )' exec(@query)   Any ideas? thanks Gus

SSRS Query Designer (in BIDS) does not generate ANSI SQL

Hello, I have a problem when using SQL Server 2005 BIDS (Business Intelligence Development Studio) when connected to an Oracle data source.  The Query Designer generates the old Oracle SQL syntax instead of ANSI SQL.  This is with the Oracle 10g client installed. So, I would really appreciate it if anybody knows how to get the Query Designer to generate the ANSI SQL.   Thanks, Stuart

Adding a table or view multiple times when building a query with BI Report Designer and Report Build

How can I add a table/view multiple times to a single query by using BI Report Designer or Report Builder 3.0? In Report Designer I managed (workaround) to add one table multiple times by creating multiple Named Queries and having the same SELECT. Still I don't know how to add one table multiple times in Report Builder 3.0.

Report Builder 3.0 for Oracle with Graphical Query Designer

Is there a possibility to have Graphical Query Designer in Report Builder 3.0 in case the connection is made to an Oracle database (through .NET Provider for Oracle for example)? I need to offer to the end users the means to build their own reports. Every user has associated a group of database objects and as soon as users are added new database objects are added. Therefore I cannot create a model because it needs to be changed frequently and the model in this case would contain objects to which the user does not have access. The only option is that the user should create his report query in a friendly manner. So the query text editor is of no good in this case.   I've found in documentation that for Oracle and other databases there is no Graphical Query Designer: In Report Builder 2.0, to specify a query for data source types Oracle, OLE DB, ODBC, and Teradata, you must use the text-based query designer (http://msdn.microsoft.com/en-us/library/dd220607(SQL.100).aspx). Is there a way to have Graphical Query Designer in Report Builder 3.0 or should I look for other products? In case Report Builder cannot solve this problem can you make some product recommendations - ad-hoc web reporting for .NET?

Nested Full Text Query and SQL syntax



Quick question, is it possible to use the SQL TOP syntax in a Full Search Query something like

Select Top 1 title from SCOPE() where = 'All Sites' AND Productid= '1234556'


Can you use nesteed select statments ?

Select title from SCOPE() where = 'All Sites' AND Productid=  (select productid from scope() where scope = 'all sites' AND product = 'example')


Dave Roberts


WCF URITemplate for generic query



I'm writing a proxy and I want to implement a WebGET URITemplate that will allow me to grab the entire set of name/value pairs as a single entity.  ie calling


I want a string that is "p1=1&p2=2" or "?p1=1&p2=2"

I've tried various URITemplates with no success. 

URITemplate="{request}" works for http://myproxy/p1=1&p2=2 but not with the preceding "?"

URITemplate="*" passes through to my associated function (for which I cannot in this case specify a parameter and which I can't see how to retrieve)

URITemplate="*{request}" or "?{request}" are invalid

Any ideas?  Basically, it seems you need to indicate the ? and then you must go the name/value pair route but I won't know what these are in advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend