Newbie Question - Viewing All Occurances
Aug 12, 2005
Hi all
I have two tables.
Keywords Table
Keywords |SIC Code |Thomson Code |
School |8010 | 44444 |
Turnip |4444 | 555555 |
Break |99999 | 33333 |
Company File
Vendor | Add1 | Add2 | etc etc
Primary School | High Street | etc
Turnip Farm | Countryside | etc
Breakdown Serv | Industrial |
Turnip School Break | Kidding! |
What I need is a query that will match all the keywords in the keywords table in the Vendor field of the Company file table. i.e
Vendor | Keyword(s)9 |
Primary SChool | School |
Turnip Farm | Turnip
Turnip School Break | SChool,Turnip,Break |
I can get the query reporting singluarlary, but not the last option.
Apologies if this looks basic... but I am struggling!
Regards
Dom
Er yes. That worked. What?
<edit> Moved to appropriate forume </edit>
View 5 Replies
ADVERTISEMENT
Aug 28, 2007
Hello All,
I have a question that has been vexing me for some time now. It keeps coming up when I'm trying to write queries for SSRS reports. Lets say I have a table that has 3 columns to keep track of people's gender in a annonomys survay (very basic example):
Month (varchar) | Year (smallint) | Gender (bool)
I want to return a dataset that is grouped by Month and Year and that contains a count of each Gender which would look something like this:
Month | Year | [Male Count] | [Female Count]
January | 2006 | 100 | 120
February | 2006 | 130 | 110
March | 2006 | 120 | 145
April | 2006 | 105 | 125
How would I acheive a dataset like this? Is it possible? Do I need to join the table to itself? If so do I use an Inner Join, an Outer Join, or a Left/Right Join? Any help would be extremely appreciated.
Thanks!
Tennyson
View 3 Replies
View Related
Dec 18, 2006
Hi,
Is it possible to get words from text columns in a sql server database in the order of their occurances in that column with full text search or by any other method.
Thanks in advance.
View 14 Replies
View Related
Feb 24, 2007
Hi there
I sorry if I have placed this query in the wrong place.
I'm getting to grips with ASP.net 2, slowly but surely!
When i try to access my site which uses a Sql Server 2005 express DB i am receiving the following error:
Server Error in '/jarebu/site1' Application.
Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.
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: System.Data.SqlClient.SqlException: Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.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. Stack Trace:
[SqlException (0x80131904): Database 'd:hostingmemberasangaApp_DataASPNETDB.mdf' already exists.
Could not attach file 'd:hostingmemberjarebusite1App_DataASPNETDB.MDF' as database 'ASPNETDB'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735075
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
This is the connection string that I am using:
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;Initial Catalog=ASPNETDB;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
The database is definitly in the folder that the error message relates to.
What I'm finding confusing is that the connection string seems to be finding "aranga"s database.
Is it something daft?
Many thanks.
James
View 1 Replies
View Related
Apr 2, 2008
Hi all,
I'm very new to SQL Server having previously worked with Oracle 10g for the last couple of years.
Anyway, in Oracle there is a view called V$SQL that provides information about SQL that is or has recently been executed. I'm trying to find a similar sort of functionality in SQL Server.
Basically, what I'd like to do is list all of the SQL statements that are running at a given moment. Or even better would be a way of listing all statements that have run in the last 10 minutes.
Appreciate any help for a newbie.
We're on SQL Server 2000 8.00.194
Cheers
Kloid
View 8 Replies
View Related
Aug 17, 2006
Is there any way, in enterprise manager or otherwise, for me to view the last few SQL statements executed against my sql server?Thanks
View 1 Replies
View Related
Dec 9, 2003
I just installed SQL Server on my 2003 box. Up till now I've been using MS Access for all my database needs. When I wanted to work on fields in a table, all I had to do was open Access and there you go. How do I view and modify Fields in SQL?
Chill
View 2 Replies
View Related
Dec 4, 2000
Is it possible to view the transaction log to identify events run against a database.
I know that I could create a trace file to log events.
But what I really want to know is whether there is any way to actually view the live .ldf transaction log file and make sense of it.
It is possible to do something similar in Informix.
View 2 Replies
View Related
Aug 17, 1999
How can I view the transaction log for a particular database. We are trying to track down when a delete occurred and wanted to look there to find it, unless there is a better place to look.
Thanks
View 4 Replies
View Related
Jun 28, 1999
Can any one tell me how you view the transaction log records since we don't have a syslogs anymore?
View 1 Replies
View Related
Apr 30, 1999
How can I view the contents of a transaction log? Is there a better way to determine who deleted a record and when?
View 1 Replies
View Related
Dec 13, 2004
Holy MOLY I've been banging my head up against the wall on this matter for months now. I have two databases and I need to be able to see the tables from different different databases. Usually I create a view like this
LicensingActions.dbo.License_Suspensions
But it wasnt working kept telling me that the License_Suspensions table didnt exsist and at the time the name was in all caps. So I decided to change the name, and low and BEHOLD IT WORKS. The funny was that I wasnt having that problem any of the other tables just that one. Well live and learn. Just thought I'd share that with you guys
View 4 Replies
View Related
Aug 22, 2005
I just got some great code from this site for viewing constraints, but I can't find the equivalent for indexes (and I couldn't modify the constraint sql), any suggestions?
View 2 Replies
View Related
Jun 17, 2007
why can't i see SQL server 2005 the same way i see Visual Basic 2005 Express edition. i'm able to see VB by going under the all Programs menu and select it, when i try to find SQL 2005, i see configuration tools and some submenu of configuration tools. is that the way it is? if not, how do i get SQL 2005 to open up like VB so i can play with it. Also, at home i do not have a server, do i have to have a home server to play with SQL
hens
View 5 Replies
View Related
Feb 17, 2006
I am trying to view a "View" that is in one of my databases, and I am having a problem seeing the scripting that is inside of it. In sql2000 all I needed to do to view a "View" is double click on it. If I double click on a "View" in sql2005 it will open more folders showing the layout, but I want to see the scripting. If I right click on it and then click open view, sql2005 returns the values that the view would bring across. Does anybody know how to view the scripting of a "View" for sql2005?
Also if I select Modify, sql2005 returns scripting but it does not look right.
Thanks for the help!
View 7 Replies
View Related
Mar 28, 2006
I would like to know the best way to view Package Logs that are being stored in SQL Server? Right now I select out of sysdtslog90 to see what the log file has. I would like to know if there is a way like SQL 2000 where there is a drop down for the date and you could view the entire package data.
View 2 Replies
View Related
May 4, 2001
I have a linked table in Access to my SQL 7 database. But one field who's values are either 0 or 1 now show up as 0 or -1 when I view the linked table in Access?
Any ideas why? Thanks..
View 1 Replies
View Related
Jan 2, 2001
Hi,
What minimum level access/permission/role is required for a database user to view scheduled job listing?
Thanks in advance..
View 1 Replies
View Related
Jun 19, 2001
I would like to be able to get a listing of the object permissions for a particular group in a database. I can't find a procedure for doing this. I know I must be overlooking an obvious solution. Does anyone have any suggestions for doing this? Thanks.
View 1 Replies
View Related
Oct 22, 1998
Hi,
Can anybody tell me is it possible to view user passwords in SQL Server v6.5 as the syslogins table shows the passwords as encrypted.
Thanks,
Phil
View 1 Replies
View Related
Oct 25, 2001
It was possible to read the transaction log on SQL 6.5 with DBCC LOG and find out what was going on. Is there any way to do this in SQL 7.0/2000 or do you now have to rely on SQL Profiler? I have noticed that SQLProbe has a log viewer in it and would like to know how they did it.
View 1 Replies
View Related
Aug 9, 2007
EDIT: Oops in the title. I meant "EM" not "IE".
I'm on a Dev database (full copy). In EM (that is running on the Dev server) I run a view that I used to build the list of rows to be updated.
SQL 2000 Std SP3 on Win 2000 Server.
When I cut-n-Pasted the clause to my "Update" statement in Query Analyser and try to run it, to my surprised, it got hung up.
I looked in EM to see Locks, and to my surprise my EM View Display is blocking the Update! So; I press "Cancel" on my EM View display and, whammo, the update goes.
I tested and it's consistant and does not matter what column I'm updating.
Is this normal behaviour for EM?
EDIT: I tried the exact same scenerio, in the exact same EM and QA screens, but this time remoting over to the Production box (since it's midnight). The blocking did not occur. Weird!
View 3 Replies
View Related
Jul 29, 2013
How to see the job history more than a week?
View 4 Replies
View Related
Oct 4, 2006
hello..
i am getting strange error while opening design through EM..when i tried to open it i m getting error like..
Action Canceled
Internet explorer was unable to link to the web page you requested....
why this error i am getting...also i am unable to view all rows through EM... :(
T.I.A
View 3 Replies
View Related
Aug 2, 2007
Hi all,
How to view the errors occured during the job execution (than viewing the Job history).Is there any files available to refer the errors?.
Thanks in advance.
View 1 Replies
View Related
Jan 28, 2008
Hi there
In SQL 2000, you can view the status of all (failed and running) jobs by going to Management > SQL Server Agent > Jobs.
How do you do the same thing in SQL2005?
Thanks
View 1 Replies
View Related
Mar 5, 2007
Hi,I am trying to debug some queries that are being generated by anexternal program, and I have no way of finding out what the actualsyntax of the query is from within the program itself. This means thatwhen the query fails I am left with only a very unhelpful message.So what I was wondering, was whether there is a way that I can view theactual queries that are sent to SQL server as they happen, or if areal-time solution doesn't exist, then some way I can look back afterthe event and see the syntax of the queries?Ideally, what I would like to do is see the queries in the form theywere sent to the server, ie "SELECT * FROM foo WHERE bar='foobar'", asthis would help me to figure out where the generated queries are goingwrong.Cheers,--Dylan Parryhttp://electricfreedom.org | http://webpageworkshop.co.ukThe opinions stated above are not necessarily representative ofthose of my cats. All opinions expressed are entirely your own.
View 5 Replies
View Related
Jun 21, 2007
i have a copy of a SQL Server 2000 database on an external hardrive.I have SQL Enterprise Manager 2005 on my laptop and was wondering ifit is possible to view the backup on my laptop when external harddrive is plugged in.What other software/tools/procedures do i need to do to make thebackup "viewable"RegardsSteve F
View 1 Replies
View Related
Jul 20, 2005
Hi,I have a need to pull information from an Oracle 9.2.1 database. It isstoring UTF-8 characters in a varchar2(33) field. I need to be able to pullthese values out and put them in a SQL Server 2000 version of the table withthe UTF-8 characters intact.Anyone know how to do this...efficiently? I've tried DTS and the high endUTF-8 characters get lost in the copy.Thanks,CJ
View 4 Replies
View Related
Jul 18, 2006
Is there a way to view replication conflicts remotely without System Administrator privileges in SQL Server 2000?
View 3 Replies
View Related
Apr 9, 2008
Hi,
I have deployed the Reports created in the dev server to another server say ABCD. I am able to view the Report manager of ABCD from the dev server and also the projects under it. Also I can see the list of reports in it. But when I am trying to view any report it gives me an error saying "Your Browser does not support scripts or has been configured not to allow scripts". Has any one of you come across similar kind of problem? Has this anything to do with the browser settings or with the report server settings?
Thanks in advance
View 2 Replies
View Related
Sep 20, 2006
I have been using Microsoft Business Intelligence for 1st time. This software has been able to create my reports based on a table I have. But note, this report is built using Business Intelligence (Visual Studio). Now, the Report pulls data from a database. I also have a C# application that interfaces with this same database. What I would like to do is to display the content of this report in my C# application. How do I go about doing this?
View 4 Replies
View Related
Jul 2, 2007
I am trying to view the design of a DTS on a Microsoft SQL 2000 database but get the below error:
Error: Data Transformation Services (DTS) Package
Error: The system cannot find the file specified.
What could be the issue. Im an using Enterprise manager from a 2000 instalation.
View 8 Replies
View Related