Complete Idiot Calling All Intelligent Lifeforms
May 22, 2007
Hi all, I run several contact websites. One of them is www.ramc.org.uk - they used to fill in a form and results emailed to me. I then manually copied and pasted into page on server. Very tiresome.
I was hoping with sql express i could create a page where they enter there details into the database after verifying details via a link..... Then as the new details are added they would be displayed on the contacts page in alphabetical order.
Is this really possible or even feasable.
Cheers, your all stars. Mark
View 5 Replies
ADVERTISEMENT
Jun 20, 2008
SELECT * from table where city like '%woshington%'
Now this would return nothing, as there is no city like woshington. but google find results and ask as r u looking washington. so would u please tell how I may write an intelligent SQL like query
View 5 Replies
View Related
Sep 1, 2005
I have three tables: table1 has a one-to-many relationship with bothtable2 and table3. When I do a left join to get a count from table2,it works:SELECT table1.field1, COUNT(table2.field1) as MyCountFROM table1 LEFT JOIN table2 ON table1.field1 = table2.field1WHERE...GROUP BY table1.field1I want to also get a count from table3:SELECT table1.field1, COUNT(table2.field1) as MyCount,COUNT(table3.field1) as MyOtherCountFROM table1 LEFT JOIN table2 ON table1.field1 = table2.field1LEFT JOIN table3 ON table1.field1 = table3.field1WHERE...GROUP BY table1.field1The Count totals from the above query end up being a multiple of thetotals that I actually want. (If there are 8 records each in table2 andtable3, the counts would be 64 for each table). Can someone help meget the proper counts, in this case 8 from table2 and 8 from table3.Thanks!
View 2 Replies
View Related
Jun 17, 2004
Tried using webmatrix code builder to simply bind a web grid to a sql table.
Works great in WEbMatrix, but when I move the code to Visual Studio.VB,
I get a logon error when the code is run.
Any Help is Greatly Appreciated... I am stuck.....
Here is the code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DataGrid1.DataSource = GetCustomers()
DataGrid1.DataBind()
End Sub
Private Function GetCustomers() As System.Data.SqlClient.SqlDataReader
Dim connectionString As String = "server='localhost'; trusted_connection=true; Database='ASPExamples'"
Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [Customers].* FROM [Customers]"
Dim sqlCommand As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection)
sqlConnection.Open()
Dim dataReader As System.Data.SqlClient.SqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Return dataReader
End Function
End Class
View 1 Replies
View Related
Dec 20, 2007
I have a table which im joining that looks like this
123,1
123,2
123,3
123,4
456,1
456,18
456,71
456,99
I want to return the first column #s where there isnt a 2 in the second column. and i need it as a group by...
like, select column1 from table1 where column2 <> 2....
but that above query would still grab the 123.. because of the fk..
i would like the query to only pull the 456 b/c none of the fks with 456 have a 2... understand?
thanks
View 6 Replies
View Related
Jul 20, 2005
I am looking for some T_SQL code that would help us eliminateduplicate data entry into our mailing db. Finding and removing theexisting dups is not rocket science, but I am looking for a completesolution.We also want to be able to come up with a T-SQL script to beintelligent enough to know if:"Bill Jones" is the same as "Billy Jones" or"Bill Jones" is the same as "William Jones" or"Bill Jones at 123 My street" is the same as "Bill Jones at 123 MySt."Purchasing scripts from a company is not out of the question. Its amatter of script cost versus my hourly rate to create them... Needlessto say, something cheap.We have only heard of one app that is dynamic enough to handle this,and the cost was way, way out of our range, 6 figures is almost 2years salary.Any ideas would be greatly appreciated.
View 4 Replies
View Related
Feb 14, 2007
I have a variable called @ORComm which has been selected using a cursor from each line on an order.
DECLARE TC2 CURSOR FOR
SELECT [Commodity],[Total] FROM [CSITSS].[dbo].[Ordrate] WHERE [OrderNumber]= @OrdNum AND [Companydiv] = 'GLPC-TRANS'
OPEN TC2
FETCH NEXT FROM TC2 INTO @ORComm, @ORTotal
I need to compare the resulting @ORComm against a list of valid commodity types selectable by
SELECT [CommodityClass] FROM [CSITSS].[dbo].[Comclass] WHERE [CompanyDiv] = 'GLPC-TRANS' AND [DELETED] = 0
What's the easiest way to do this?
View 2 Replies
View Related
Jan 23, 2007
It's funny:
Everyone thinks that CSVs are awesome to transport data. I mean after all, SSIS defaults to Comma Delimited files. Even Excel defaults to it. Microsoft is supposed to be our leader! They should get this right. And get the terminology correct too. How many people describe the file as comma separated? It's delimited! Even SQL server calls it delimited by the "delimited" drop down.
CSVs suck and i will tell you why:
When you transport any text field (especially Address) it has the possibility of containing a comma. This causes data to be parsed into the wrong fields. Why in God's grace would you EVER get in the habit of choosing a delimiter that SOMETIMES doesn't work?
I'll tell you a little short story:
I have been waiting (at work) for like a month for a guy to export data and give me this file. Well today i finally got that file. He was in a hurry and used the Defaults to export this file. I don't blame him for being in a hurry and using the defaults. Well the defaults made the import NOT work because the data parsed into the wrong columns. Comma delimited would work if there was a text qualifier. But the default is comma delimited and NO text qualifier. What idiot thought that would be good. Or it was the separation of duties that eff'd this one up? Who knows?
Fix your products!
That's my .02
View 14 Replies
View Related
Dec 3, 2007
Hi, friends.
I make a big mistake like this:
First, I installed the sql server 2005, Second, I installed the VS.net 2005 (vb.net). After that, I uninstalled the VS.NET 2005. Then I found after I uninstalled the VS.NET, the Business Intelligent Management Studio is gone too. I install the VS.NET 2005 again.
Now I could use the Business Intelligent Management Studio to open a SSIS project and a package, but there is nothing in the toolbox in it. Also the IDE could not recognize any object inside the ETL package, like the Task, the Compoment, etc. So I think that the Business Intelligent Management Studio is still not be really installed. The IDE is the VB.NET, and something needed to deal with the ETL package is missing.
How to fix the Business Intelligent Management Studio? I mean, how to make my vb.net to deal with an ETL package agian?
Thanks!
View 3 Replies
View Related
May 26, 2008
hi all
i try to get data from sql as
select * from datetable where @d between firstdate and lastdate
i add parameter @d and the type is datetime
when i excute the quiry
An error occurred while reading data from the query result set.Arithmetic overflow error converting expression to data type smalldatetime.
how can i fix that plz
View 4 Replies
View Related
Mar 31, 2007
Hi all,
I desperately need to setup the AD-HOC reporting on SQL server 2005.
I think one of the templates that I need is in Business Intelligent Project Templets Reporting Model Template in Visual Studio Templates.
But I do not see it in there.
Can some one please let me know where can I get the Reporting Model Template, or a link to where I can download or how to create it.
Thanks or any help.
Abrahim
View 3 Replies
View Related
Apr 14, 2008
What can I do to make OnComplete and OnSuccess mean something in SQL Server 2000 DTS?I have this pretty simple package that imports data into a table from an XLS file, then runs an external console application which manipulates the data and drops into a different table.That data is then used to create a CSV file. If I execute each step individually, the whole thing works. But what it happening is that the end file is being created before the console app is finished.I have a workflow line (on complete) between the 2 processes, but that doesn't seem to mean anything. To run the external app I am just using an active x script task...CreateObject("WScript.Shell").Run "my file" Any advice?
View 1 Replies
View Related
Apr 9, 2001
Dear all,
I have a SQL Server 7 box that is shortly to be rebuilt completely (still on NT4, but with new RAID system), does anyone have any advice on how I can make the transition as painless as possible? Particularly, I want to maintain the backup, security and DTS structures as much as possible.
Thanks in advance
Jonathan
View 1 Replies
View Related
May 3, 2006
Using the tutorial at:
http://msdn2.microsoft.com/en-us/library/ms131094.aspx
I've determined that the code I need to follow is:
Imports System
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlTypes
Imports Microsoft.SqlServer.Server
Imports System.Data.SqlClient
'The Partial modifier is only required on one class definition per project.
Partial Public Class StoredProcedures
''' <summary>
''' Create a result set on the fly and send it to the client.
''' </summary>
<Microsoft.SqlServer.Server.SqlProcedure> _
Public Shared Sub SendTransientResultSet()
' Create a record object that represents an individual row, including it's metadata.
Dim record As New SqlDataRecord(New SqlMetaData("stringcol", SqlDbType.NVarChar, 128) )
' Populate the record.
record.SetSqlString(0, "Hello World!")
' Send the record to the client.
SqlContext.Pipe.Send(record)
End Sub
End Class
Given this code, how do I add other SqlMetaData Columns to the statement:
Dim record As New SqlDataRecord(New SqlMetaData("stringcol", SqlDbType.NVarChar, 128) )
---
Like this???
Dim record As New SqlDataRecord(New SqlMetaData("stringcol", SqlDbType.NVarChar, 128),New SqlMetaData("otherstringcol", SqlDbType.NVarChar, 128) )
I assume
record.SetSqlString(0, "Hello World!")
record.SetSqlString(1, "I'm Here!")
To populate the data.
Thanks,
-David
View 1 Replies
View Related
Jun 15, 2006
how can i copy a complete database (tables, views, stored procedures) with/in the sql server 2005 "server mgm. studio". the import/ export function only copys the data (tables).
sql server 2000 had a nice tool for that (import/ export data). but how can i do that with the sql server 2005. can't find anything ...
View 3 Replies
View Related
Mar 26, 2003
Hi all - I'm having problems getting a package to run successfully to completion when I schedule it in SQL Server or as a batch file on the Windows scheduler. If I run the package interactively or run the batch file interactively that contains the DTSRUN command it runs to completion. Both packages start with a call to a batch file that FTPs files from a remote server and then they continue on by executing additional DTS packages within the running package. The owner of all the packages involved and is the same user that I am logged in as when running the packages interactively and is the same user that that SQL Agent and the Windows scheduler job runs under. The FTP step of each package does complete successfully but then I cannot trace where the package then hangs. The package never fails but rather it just continues in a Executing/Running state. This is getting extremely frustrating. Any insight in to this problem would be greatly appreciate.
View 4 Replies
View Related
Feb 18, 2002
Hello.
I have a delete statement that works on some servers/databases and not on others. I am running this on SQL Server 2000/Windows 2000. The statment is a very simple DELETE x FROM y WHERE x = 1234. It is only 1 record in one table. The staement begins but never completes. It looks as if it just keeps trying to recompile but goes nowhere. Have any of you ever seen this before? It works on a restore of the database on 1 server, but not on another. It will not run on either production server/database. Is there a parameter or setting that I need to look for that might be different and causing this? I am running the Enterprise edition of SQL Server on some servers, and standard edition on others. Would that make a difference? If so, how and why. I've never had this issue before. We are running Windows Advanced Server on most all of our servers.
Any help on this would be greatly appreciated.
Thanks.
Deanna
View 6 Replies
View Related
Nov 7, 2000
We are running SQL 6.5 sp5a. There have been a number of instances recently where some scheduled tasks don't complete. I can't even cancel them. The only way to stop them is to stop and start the Executive service.
Anyone come across this before and know what the problem is?
View 1 Replies
View Related
Aug 31, 2004
Hi,
I am having trouble trying to import a big file (aprox 250Mb is size) into an SQL Server database and I keep getting the message:
"Not enough storage is available to complete this operation".
The application tries to import the file by executing a stored procedure:
CREATE PROCEDURE sp_updateMaterialBlob
@MaterialId Int,
@BLOB image
AS
BEGIN
Update Material SET blob = @blob where id = @materialId
END
The application uses an ADO connection. I've tried increasing the memory of the client machine but that didn't work. Whenever I do run the import, nearly all the memory on the machine is used up but every time after several hours I get the same error message. What is the cause of the problem and how do I resolve it? Ideally I want to use my application to do the import rather than anything bespoke.
View 7 Replies
View Related
Dec 15, 2005
I was given the task of writing a new website for my boss.
problem being he wants the ability have a custom user signup form and then a picture gallery of service with comments listed off each one.
I was also asked to produce this in .aspx with SQL.
only one small glitch, never worked with either of them....
I have designed most of the database requirements off of examples I found online but have not found how to post data from the users signup form to the database correctly and retrieve it for the customers profile.
any suggestions????
all help on this will be greatly appreciated
View 9 Replies
View Related
Nov 22, 2007
Hello all! A while ago I started cataloging my collection of old radio recordings and I wrote a simple Visual Basic 2005 program to display them in a nice UI. I have implemented an SQL database with the project and all is fine, when I run the program it connects to the sql server and downloads the data. But when I try and change something by connecting from within Visual Basic at runtime with this code:
Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
Dim ConnectionString As New SqlConnection("Server=MARK-HOMESQLEXPRESS;Database=Library.mdf;Uid=MARK-HOMEMark;Pwd=sodoff;")
Dim sqlString As String
ConnectionString.Open()
sqlString = "UPDATE JackBenny SET Rating='Excellent' WHERE [Episode Number]=" & epNumber
ConnectionString.BeginTransaction(sqlString)
ConnectionString.Close()
End Sub
I get this error code in the log and a general unable to login error within Visual basic itself:
2007-11-22 15:44:39.78 Logon Error: 18456, Severity: 14, State: 5.
2007-11-22 15:44:39.78 Logon Login failed for user 'Mark'. [CLIENT: <local machine>
The state of 5 refers to "User ID is not valid." but I can login to SQL Server Management Studio Express just fine with the username and password in the code posted. Also of note, I can login to the Server Managment with the sa account username and password. When I use the credentials in visual basic code, same error. Any ideas? I am trying to connect to a database which is on this computer (local) in the root folder of the application, called Library.mdg.
Thanks so much all
View 7 Replies
View Related
May 8, 2006
I recently re-built my entire system from ground up (new hard drives, OS, etc). I now have the problem of SQL 2005 installed partially, but no way to get the management tools installed. I get an "already installed message when I try". I've never encounted this before on any other SQL install.
Sequence of events. I installed VS 2005 Pro first, then followed by SQL 2005. Somewhere this install didn't work, and I was left with the MS installed thinking I suceeded, yet none of the functions of SQL were worked or more importantly accessable.
I tried to re-install after using the ADD/Remove App from the control panel (which was sucessfull). SQL thought it was still installed. So I uninstalled VS 2005 as well, and deleted any programs in the SQL directory. Then I checked ADD/Remove programs and nothing was showing. The re-install still did not work. My guess is that the registry is still loaded with now useless entries.
Is there any solution left that does not require me to hand delete any SQL registry entries, since that is always a great way to completely kill my system.
Thanks.
View 1 Replies
View Related
Nov 12, 2007
Hi,
How can I encrypt / decrypt whole database (data, objects ... everything) in SQL Server 2005 Express Edition?
Quick solution from any champion of Databases would be highly entertained.
Waiting ..
Thanks a lot.
View 4 Replies
View Related
Oct 26, 2006
I get this exception after awhile of browsing thru my application, i dunno what causes this because it never happens in the same place. I would like to know if anyone else is experiencing this situation and if there is a solution.
SqlCeException
Not enough storage is available to complete this operation.
em System.Data.SqlServerCe.SqlCeConnection.ProcessResults()
em System.Data.SqlServerCe.SqlCeConnection.Open()
em System.Data.SqlServerCe.SqlCeConnection.Open()
em System.Data.Common.DbDataAdapter.QuietOpen()
em System.Data.Common.DbDataAdapter.FillInternal()
em System.Data.Common.DbDataAdapter.Fill()
em System.Data.Common.DbDataAdapter.Fill()
View 9 Replies
View Related
Apr 26, 2008
My requirement is something like this
I get department ,salary as input from a stored procedure .
now i have to select all the employee no's from the department table.
and based on that i have to select all the employee details from employee table whose salary is greater than given salary.
and the complete row should be passed as output parameter.
This cursor is fine
create procedure usp_proc (@dept char(10),@sal decimal (10,2),@emplist cursor varying output)
declare @empid int
DECLARE @getempid CURSOR
SET @getempid = CURSOR FOR
SELECT emp_id
FROM department where dname = @dept
OPEN @getAempid
FETCH NEXT
FROM @getempid INTO @empid
WHILE @@FETCH_STATUS = 0
BEGIN
select ename,dept,dob,doj,status,pos,sal from employee where empno = @emp_id
FETCH NEXT
FROM @getempid INTO @empid
END
CLOSE @getempid
DEALLOCATE @getempid
I am getting the complete row displayed as output .
How do i redirect the output to the declared output is my concern.
View 8 Replies
View Related
Oct 26, 2006
Hello,
I want to truncate all tables present in the particular database, Is there any simple way to do it? or do I have to do it on individula basis (table by table)?
regards
View 4 Replies
View Related
Nov 30, 2005
Product: Microsoft SQL Server Native Client -- Error 1706. An installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'.
View 16 Replies
View Related
Feb 8, 2008
I'm in a db design, implement, and mgmt class this semester and we are teaching ourselves SQL using MS SQL 2005. I downloaded and installed MS SQL Server 05 Std version successfully. However, when I open the Server Mgmt Studio I am prompted to connect to a server??
EX:
Server Type: Database Engine
Server Name:?????????
Windows Authentication
To my knowledge we have been given no server info and are only supposed to be learning the language. Can I just cancel this window and continue?
The only help we have been given is a O Reilly: Learning SQL on SQL Server 2005 and they kind of skip all the installation and setup stages.
I should probably mention that I'm using Vista.
View 6 Replies
View Related
May 9, 2008
A couple of days ago I installed SQL Server 2005 developer. To pave the way for this I removed SQL Server 2000 and 2005 Express. Since then I've been unable to connect from any of my applications or websites in Visual Studio 2005 to either:- my new 2005 Developer database engine- my colleagues 2005 developer database engine. My colleague can connect to my databases from his visual studio on his machine. I am receiving unspecified OleDb errors.Anyone else had this happen? Anyone know where I should start looking? I've uninstalled all .Net frameworks and re-installed 1.1 and 2.0.Many thanks, Sam
View 3 Replies
View Related
Oct 27, 1999
"Database in use. The system administrator must have exclusive use of the database to run the restore operation." I created a script in the 7.0 database to reconfig the db to 'dbo use only' and identify and then kill all but the 'SA' and 'NT AUTHORITYSYSTEM' processes but that still is not enough. Can anyone please tell me what I'm missing here?
Thanx.
W.
View 1 Replies
View Related
Nov 28, 2006
i have an aplication with any problems, the aplication is hang and in the log is
SQL Server has encountered 1 occurrence(s) of IO requests taking longer than 15 seconds to complete on file [d:Program FilesMicrosoft SQL ServerMSSQLdata empdb.mdf] in database [tempdb] (2). The OS file handle is 0x000003DC. The offset of the latest long IO is: 0x00000016930000 and the aplication log is
E R R: [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionWrite (WrapperWrite()). NUMERO -2147467259 FUENTE Microsoft OLE DB Provider for ODBC Drivers
can yu help me
View 4 Replies
View Related
Aug 6, 2014
I am running an update query.It is taking long time. To find the estimated completion time i checked sys.dm_exec_request or sys.dm_exec_session or sp_who2 but there is no clue. It is showing as zero.
View 3 Replies
View Related
Oct 11, 2007
in 2005..
I want to script the whole database - is this possible?
I'd like to see the same scripts that I get when in management studio I right click on a table and do script table as - create to
is there anyway to get in one click all the tables or do I need to do one by one?
View 2 Replies
View Related