Here a query Microsoft Access Query That I would like to convert to SQL. What replace the Word "Last" in SQL SELECT Contacts.FirstName, Last(Contacts.LastName) AS LastofLastNameFROM ContactsGROUP BY Contacts.FirstName;
Hi -I'm completely new to Microsoft Query Analyzer and I need to learn itfor work to do data mining as a Product Manager. Does anyone have anyrecommendations on how to learn this and where? Which books? Whatclasses? What links to online tutorials?thanks
The fun thing is that I'm running into a circumstance where one SQL statement that works in Visual Studio accessing the same database works, but then I try to use the same statement in Microsoft Query (running to Excel) and it refuses to admit its a valid statement.
The SQL statement I'm using is this.
SELECT MLNumber, StreetNumber, StreetName, StreetDirection, ListingOfficeMLSID, Status, Bedrooms, Bathrooms, City FROM "data: Property:RESI" WHERE (ListingOfficeMLSID = '550000020' OR ListingOfficeMLSID = '550001760') AND (MLNumber > 1) AND (City = "Boiling Spring Lakes")
This works fine inside of VS 2005.
The same statement used within Microsoft Query returns this error message.
SQL SYNTAX ERROR - Unexpected char: '?'
Working with the people that work with that database regularly, they say that I need to write a METADATA-LOOKUPTYPE call that should tell me how the City name 'Boiling Spring Lakes' is actually formatted.
I, of course, have no clue how to do that. But my thought is, if it works in VS2005 and returns a valid result, why does the same SQL statement return an error message through Excel?
Hi all, I am Vaibhav.I am using Microsoft SQL Server Management Studio 9.00.1399.00 on my machine , which have Windows 2000 Professional OS installed. Now I am upgrading My ystem to Windows Vista OS. And I am not getting whether Microsoft SQL Server Management Studio 9.00.1399.00 will support Windows Vista? or I have to go for Higher version available for Microsoft SQL Server Management studio ? Please asist me on same.
Ive got a collection of view which piece together data from varying sources and assemble it ready for a stored procedure to squirt the data into a table.
This has worked fine up til yesterday when i had to amend one of the views to include a reference to another data set.
Essentially the data is for students and comes from our old db and our new one, each year group has different values so the views act to extract all data relevant for a child from both databases and accross all year data sets.
The problem im having is that i can get the final stored procedure to run. It ran fine the other day but since ive amended one of the views i get timeout errors wherever it's run. real problem when query analyser which has no timeout settings (apparently) times out as it means i cant run the query anywhere....enterprise manager will timeout after 30secs despite amending the query timeout setting to 600s.
so im a bit stuck, both views which the problem view is trying to combine run in under 30 seconds...when you try and combine them it times out- seems to run for a long long time.
note sure why this has started happening, from all ive read most peeps get this with EM and solve it using QA. but what if QA cant handle the query either?
heres the sql: (wont make much sense but hopefully shows that its not a complex query)
SELECT TOP 100 PERCENT dbo.StudentDetMaster.SetId, dbo.StudentDetMaster.StudentId, dbo.StudentDetMaster.Name, dbo.StudentDetMaster.CourseYear, dbo.StudentDetMaster.House, dbo.StudentDetMaster.Tutor, dbo.PGJSProfile.[Key Stage 1 Reading], dbo.PGJSProfile.[Key Stage 1 Writing], dbo.PGJSProfile.[Key Stage 1 Speaking & Listening], dbo.PGJSProfile.[Key Stage 1 Maths], dbo.PGJSProfile.[Key Stage 2 English], dbo.PGJSProfile.[Key Stage 2 Maths], dbo.PGJSProfile.[Key Stage 2 Science], dbo.PGJSProfile.[Verbal Reasoning Year 3], dbo.PGJSProfile.[Year 3 English Autumn], dbo.PGJSProfile.[Year 3 English Year Group Average], dbo.PGJSProfile.[Year 3 English Summer], dbo.PGJSProfile.[Year 3 English Year Group Average Score], dbo.PGJSProfile.[Year 3 Maths Autumn], dbo.PGJSProfile.[Year 3 Maths Year Group Average], dbo.PGJSProfile.[Year 3 Maths Summer], dbo.PGJSProfile.[Year 3 Maths Year Group Average Score], dbo.StudentDetMaster.[Year 3 Maths Set], dbo.PGJSProfile.[Verbal Reasoning Year 4], dbo.PGJSProfile.[Year 4 English Autumn], dbo.PGJSProfile.[Year 4 English Year Group Average], dbo.PGJSProfile.[Year 4 English Summer], dbo.PGJSProfile.[Year 4 English Year Group Average Score], dbo.PGJSProfile.[Year 4 Maths Autumn], dbo.PGJSProfile.[Year 4 Maths Year Group Average], dbo.PGJSProfile.[Year 4 Maths Summer], dbo.PGJSProfile.[Year 4 Maths Year Group Average Score], dbo.StudentDetMaster.[Year 4 Maths Set], dbo.PGJSProfile.[Verbal Reasoning Year 5], dbo.PGJSProfile.[Year 5 English Autumn], dbo.PGJSProfile.[Year 5 English Year Group Average], dbo.PGJSProfile.[Year 5 English Summer], dbo.PGJSProfile.[Year 5 English Year Group Average Score], dbo.PGJSProfile.[Year 5 Maths Autumn], dbo.PGJSProfile.[Year 5 Maths Year Group Average], dbo.PGJSProfile.[Year 5 Maths Summer], dbo.PGJSProfile.[Year 5 Maths Year Group Average Score], dbo.StudentDetMaster.[Year 5 Maths Set], dbo.PGJSProfile.[Verbal Reasoning Year 6], dbo.PGJSProfile.[Year 6 English Autumn], dbo.PGJSProfile.[Year 6 English Year Group Average], dbo.PGJSProfile.[Year 6 English Year Group Average Score], dbo.PGJSProfile.[Year 6 Maths Autumn], dbo.StudentDetMaster.[Year 6 Maths Set], dbo.StudentDetMaster.[JS Baseline], dbo.PGJSProfile.[Year 6 English Mock], dbo.PGJSProfile.[Year 6 Maths Mock], dbo.PGJSProfile.[Year 6 English Mock Year Group Average], dbo.PGJSProfile.[Year 6 Maths Mock Year Group Average] FROM dbo.PGJSProfile LEFT OUTER JOIN dbo.StudentDetMaster ON dbo.PGJSProfile.SetId = dbo.StudentDetMaster.SetId AND dbo.PGJSProfile.StudentId = dbo.StudentDetMaster.StudentId ORDER BY dbo.StudentDetMaster.Name
Microsoft.AnalysisServices.Viewers.DLL dll in VS 2005 but sometimes it gives an error.
"Code generatio for property 'ConnecitonManager'" failed. Error was:'Property accesor 'ConnectionManager' on object 'AssosiactionViewer1' threw the following exception:'Object referance not set to instance of an object"
Is there anyone here who use "Microsoft SQL Server 2005 Datamining Viewer Controls" in SQLServer2005 FeaturePack ? http://www.microsoft.com/downloads/details.aspx?FamilyID=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=en
i am using VS2005 Version 8.0.50727.762 (SP.050727-7600) and SQL Server 2005 SP2
Dear All,Access adp on sql-server 2000After upgrating to A2003 updating data with 1 perticular combobox causes theprogram to hangs without any error-msg.Traying to change te combobox recordsource i get this error:This version of Microsoft Access doesn't support design changes to theversion of Microsoft SQL Server your project is connected to. See theMicrosoft Office Update Web site for the latest information and downloads(on the Help menu, click Office on the Web). Your design changes will not besaved.The solution in :http://support.microsoft.com/defaul...kb;en-us;313298tolks about SP 'dt_verstamp007' but I have SP 'dt_verstamp006'What should I do.Is the failure of the combobox also caused by the absence of dt_verstamp007???Filip
odbc_pconnect() [function.odbc-pconnect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] System resource exceeded., SQL state S1001 in SQLConnect
we got the error with access 2000 database and PHP as prog. language .
we created dsn for the connection.
reboot solves the problem. but we need another solution better than this.
I have a query that executes just fine except that it won't recognize varchar(255) ( or any other value within the () ) and if I leave it off like this: varchar, then it executes but it leaves that value as 1 and that is just not very useful for my purposes. This also happens with anything else that requires () to add length such as char(), or nvarchar(), etc... Any ideas?
I am trying to create a Datazen query against a Microsoft SharePoint List. The Data View successfully returns records from the list; however, it appears that the Query String parameter is entirely ignored. I want to use the query string to grab only records with a certain status value.
So far I have attempted specifying a View and Filters:
All return the complete set of records in the list. I do not see a single example or comment online other than the claim that SharePoint List sources are supported. How I can specify a Query String value that will filter the list records?
I'm not asking a lot. I just want to know if I can connect from anExchange server to a SQl server without having to use Access linkedtables. Surely MS must have had a look at this but I can't findanything out there.Help appreciated.Ginters
Hi all, I have the "Northwind" database in my Sql Server Management Studio Express.
In my C:ProSSEAppsSamplesForChapter02Chapter02 folder, I have the following 2 files: (1) ListColumnValues (MS-DOS Batch File) sqlcmd -S .sqlexpress -v DBName = "Northwind" CName = "CompanyName" TName = "Shippers" -i c:prosseappschapter02ListListColumnVales.sql -o c:prosseappschapter02ColumnValuesOut.rpt (2) ListColumnValues (Microsoft SQL Server Query File) USE $(Northwind) GO SELECT $(CompanyName) FROM $(Shippers) GO When I ran the following SQLcmd: C:ProSSEAppsSamplesForChapter02Chapter02>ListColumnValues.bat I got the following "ColumnValuesOut.rpt" with error messages:
'Northwind' scripting variable not defined. Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1 Incorrect syntax near '$'. 'CompanyName' scripting variable not defined. 'Shippers' scripting variable not defined. Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1 Incorrect syntax near 'CompanyName'.
I copied these T-SQL statements from a book and I do not know how to correct them. Please help and tell me how to correct these errors.
"Failed to copy objects from Microsoft SQL Server to Microsoft SQL Server "
I keep getting this when trying to copy stored procs from one db to another on the same server. I am using the DTS wizard. I have been able to copy the tables but I need the sp's too, and there are too many to copy one at a time.
In VS 2005, when we choose database connection, we can choose one of the above. My question is in what situations should we choose MS SQL Server Database File (SqlClient), and when should we choose Microsoft SQL Server?
I want to deploy a standalone desktop application with a backend database. Which backend database should I should and which of the above connection should I choose?
On localhost this application works fine but when I put on remote server. I am getting following errors. For both localhost and server, I am using same remote sql 2000. I will appreciate any help.
Thanks,
Arif
Server Error in '/' Application. --------------------------------------------------------------------------------
ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ')'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ')'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
End Sub this code worked well. we know sql7 is not compatiable with vista. please tell us how to connect it wiith sql2005 . we downloaded orcas express edition beta. we created a database also. please let u know how to connect with Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5).
Hello to all, I have a stored procedure. If i give this command exce ShortestPath 3418, '4125', 5 in a script and excute it. It takes more 30 seconds time to be excuted. but i excute it with the same parameters direct in Microsoft SQL Server Management Studio , It takes only under 1 second time I don't know why? Maybe can somebody help me? thanks in million best Regards Pinsha My Procedure Codes are here:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= ALTER PROCEDURE [dbo].[ShortestPath] (@IDMember int, @IDOther varchar(1000),@Level int, @Path varchar(100) = null output ) AS BEGIN
if ( @Level = 1) begin select @Path = convert(varchar(100),IDMember) from wtcomValidRelationships where wtcomValidRelationships.[IDMember]= @IDMember and PATINDEX('%'+@IDOther+'%',(select RelationshipIDs from wtcomValidRelationships where IDMember = @IDMember) ) > 0 end if (@Level = 2) begin select top 1 @Path = convert(varchar(100),A.IDMember)+'-'+convert(varchar(100),B.IDMember) from wtcomValidRelationships as A, wtcomValidRelationships as B where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0 and PATINDEX('%'+@IDOther+'%',B.RelationshipIDs) > 0 end if (@Level = 3) begin select top 1 @Path = convert(varchar(100),A.IDMember)+ '-'+convert(varchar(100),B.IDMember)+'-'+convert(varchar(100),C.IDMember) from wtcomValidRelationships as A, wtcomValidRelationships as B, wtcomValidRelationships as C where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0 and charindex(convert(varchar(100),C.IDMember),B.RelationshipIDs) > 0 and PATINDEX('%'+@IDOther+'%',C.RelationshipIDs) > 0 end if ( @Level = 4) begin select top 1 @Path = convert(varchar(100),A.IDMember)+ '-'+convert(varchar(100),B.IDMember)+'-'+convert(varchar(100),C.IDMember)+'-'+convert(varchar(100),D.IDMember) from wtcomValidRelationships as A, wtcomValidRelationships as B, wtcomValidRelationships as C, wtcomValidRelationships as D where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0 and charindex(convert(varchar(100),C.IDMember),B.RelationshipIDs) > 0 and charindex(convert(varchar(100),D.IDMember), C.RelationshipIDs) > 0 and PATINDEX('%'+@IDOther+'%',D.RelationshipIDs) > 0 end if (@Level = 5) begin select top 1 @Path = convert(varchar(100),A.IDMember)+ '-'+convert(varchar(100),B.IDMember)+'-'+convert(varchar(100),C.IDMember)+'-'+convert(varchar(100),D.IDMember)+'-'+convert(varchar(100),E.IDMember) from wtcomValidRelationships as A, wtcomValidRelationships as B, wtcomValidRelationships as C, wtcomValidRelationships as D, wtcomValidRelationships as E where A.IDMember = @IDMember and charindex(convert(varchar(100),B.IDMember),A.RelationshipIDS) > 0 and charindex(convert(varchar(100),C.IDMember),B.RelationshipIDs) > 0 and charindex(convert(varchar(100),D.IDMember), C.RelationshipIDs) > 0 and charindex(convert(varchar(100),E.IDMember),D.RelationshipIDs) > 0 and PATINDEX('%'+@IDOther+'%',E.RelationshipIDs) > 0 end if (@Level = 6) begin select top 1 @Path = '' from wtcomValidRelationships end END
I have just installed sql server 2005 but, now I have two types of server name: Microsoft SQL Server Developer EditionMicrosoft SQL Server Express Edition Which one should I use? Does it matter??thanks..
I work for a financial company where we send out lots of correspondence to clients on a daily and monthly basis. This would typically be something like a financial report, account statements, etc. We've decided to use PDF as the format which these documents must be in when our clients receive them.
Our marketing and sales departments designs the templates of these documents using Microsoft Word. They can save these MS Word documents in the Word XML format (either 2003 or 2007). We want it in XML format, because it is text based, and we can therefore string replace the content to update the template with a client€™s information. In the same token RTF would also do, but the file size when converted to RTF is a problem.
What I am looking for is a way to convert this XML into PDF using something like XSL-FO - i.e. we do not want to use the Word Interopt on our Production Server, firstly it is a little slow and secondly the production server is unmanned and we cannot allow a WinWord.EXE process to not close successfully for some or other reason.
I've tried a number of companies' evaluation software to try and achieve this (converting the WordML to PDF via XSL-FO), but so far no luck.
Does anybody know of a stylesheet out there with which I will be able to achieve this? Or an alternative method of converting MS Word files into PDF without using Word to do it?
Is there a bug in SQL Server 6.5 that does not permit the increase of RAM dedicated to SQL Server (above approx. 200MB), without reducing the procedure cache to 10% ?
I need to refresh data from a SQL 6.5 environment for QA purposes (hopefully generic solution should work for 7 & 2K). I need to select blocks of data in demand or in an automated fashion.
I would like to know the experiences of anyone who has done this.
Hey guys how you doing ? Well i wanna Install Microsoft CRM for Sharing Data with Client. i have installed Windows Small business Server 2003 Service Pack1
Please i need some help to get starting making my server and Starting using the Microsoft CRM
Do i need to Install SQL server after installing Windows Small business Server 2003 Service Pack1 ?
Sql server has some very good features but some possibilities are forgotten.
For instance in DTS2000 there was a possibility to make data transfer packages from a AS400 ODBC connection (With parameters ) to Sql server tables.
Those parameters were set in a dynamic properties task.
In Sql server I can get variables out of sql tasks and even pass a parameter to an ODBC Sql task. This all works find. However when we try to use the obtained parameters in a dataflow transformation we are left in the cold.
The dataflow function in 2005 has indeed great looks but that is all. Everything I could do in DTS2000 seems not to be possible anymore.
For the query Source component in Data Flow :
ODBC - connection -----> No parameter binding possible (If so it is very wel hidden)
OLEDB connection , Parameter binding should be possible but again there is little or no possibility to make a good connection to the standard AS400 OLEDB provider)
Also other commercial OLEDB providers like HITSW aren't working.
Thank you very much MS for many and nothing. After 2 days of trying i have to develop DTS2000 packages again .
HiI use visual std. 2005 and I create a asp.net web page after >add item> sql database > I added my project *.mdf file when I make project my project is runnig with visual studio 2005 but I sent my hostting (internet server ) I cant use this mdf file . Are we register this mdf file sqlserver ? can we use this mdf file like access file (mdb ) . What kind of thing I do to use this mdf file . Thanks
Im trying to use Microsoft.SqlServer.Management.Smo to load a dropdown of available sql server databases. On my computer it works fine but when i try and run the application on my virtual it throws and unhandled exception that it couldn't load SMO assembly. I know this is because 2005 isn't installed on my virtual but i want to be able to catch this error and just ignore it and load a blank dropdown. I tried putting try catch blocks around the load but it still errors. I then tried instead of importing it i tried to reference smo by using the whole name inside of my try catch block. Does anyone know how to catch this errorTry ' Create a new connection to the selected server name
Dim srvConn As New Microsoft.SqlServer.Management.Common.ServerConnection(txtServerName.Text) Dim srvSql As Microsoft.SqlServer.Management.Smo.Server
' Log in using SQL authentication instead of Windows authentication srvConn.LoginSecure = False ' Give the login username srvConn.Login = txtUserID.Text ' Give the login password srvConn.Password = txtPassword.Text ' Create a new SQL Server object using the connection we created srvSql = New Microsoft.SqlServer.Management.Smo.Server(srvConn) ' Loop through the databases list For Each dbServer As Microsoft.SqlServer.Management.Smo.Database In srvSql.Databases ' Add database to combobox txtDatabase.Items.Add(dbServer.Name) Next Catch ex As Exception MsgBox(ex.Message) End Try