Stored Procedure email not working  

Here is my stored procedure:[highlight=sql]CREATE PROCEDURE [sproc_sales_referral_reminder] ASset nocount onIF exists(SELECT TOP 1 1FROM dbo.tbl_sales_referrals INNER JOIN dbo.tbl_hr_emp ON dbo.tbl_sales_referrals.referred_to =... Continue Reading
Views : 106
Monday 26th of November 2012

UPDATE: worked around the code = 3001 error  

I replaced the recordset command line with adCmdTableDirect and it fixed that error right up. I have another error now.. I'm a SQL noob any help is appriciated.-- Database errorProcedure = usp_Childs_NameThe database could not retrieve the Birth... Continue Reading
Views : 196
Monday 26th of November 2012

Model Database!  

We detached the model database to move it to another drive, but now we cannot start the SQL Server Service. Can anyone out there help us? Continue Reading
Views : 170
Monday 26th of November 2012

SQL Server, MTS, and MSMQ  

HELP!!!My head is spinning! For the past week I have been searching on how to implement a DNA within my intranet. The solution that is suggested is to use the above applications. If I understand the information that I have gathered, I will be sending messages to the MSMQ and they will be... Continue Reading
Views : 34
Monday 26th of November 2012

Set Column default value  

Hi,Ho do I set the default value for an existing column using the alter statement?If I use : Code: ALTER TABLE [reg_main] ALTER COLUMN [IsInfo] bit SET... Continue Reading
Views : 133
Monday 26th of November 2012

Resetting primary keys  

Hi all. Is there a way of resetting the primary key (auto number) back to 1? I have done a lot of testing, and the auto increment values are in there 100's, and the site is about to go live.Thanks Continue Reading
Views : 151
Monday 26th of November 2012

Noise words  

Advice needed!I'm using Full Text search via an ASP.Net page with a text box. The user fills in their search and that gets put into a CONTAINS full text sp.Sometimes the users manage to put noise words in their query and this causes errors. To stop this I'm going to... Continue Reading
Views : 71
Monday 26th of November 2012

Select * From question  

If i got a database. the database contains:Audi, ford, opel, etc.. sql = "SELECT * FROM Cars WHERE Model='" & model & "';"Now i gotta write Audi to get audi.. How do i get so i just write Au, or Fo, or something like that? so i get everything that goes with... Continue Reading
Views : 139
Monday 26th of November 2012

Two seperate records getting mixed up  

Can somebody please help with this problem I seem to have.I have a shopping cart that connects to the DB and adds orders as records.If two customers click on submit at the same time then both orders become one order.For example the order will consist of one... Continue Reading
Views : 289
Monday 26th of November 2012

Dates showing 1/1/1900  

There is a field call certification date and through the .asp page it shows 1/1/1900. Is there any way to show the output as 1/1/2005 for example in the database? Continue Reading
Views : 104
Monday 26th of November 2012

Changing datatypes  

I have a field called cert# and it will only allow me to input numbers. But if I do not have a cert# to include in that field and I want to put see information or check back later, what datatype should be used to reflect on the asp page that I am working on?Thanks. Continue Reading
Views : 188
Monday 26th of November 2012

How insert string into dtb  

I use this statement to insert string value in my test dtb is it correct? Code: strSql = "UPDATE guestbook SET" _& " isapproved = '1'" _& " WHERE gid... Continue Reading
Views : 197
Monday 26th of November 2012

Help with Query  

Here is my Query below, in SQL server as a view.I am trying to return all the Assets with the correct information.I need a where statment I dont know where to place it . I need all th Assets from Assets table to return all the following infoCODE:::::::::::::::: Continue Reading
Views : 171
Monday 26th of November 2012


Hi Guys,I need to insert a unique record into a new table from a existing table containing duplicate rows. The duplicates should be recognized by comparing the values in 4 columns. E.g. Continue Reading
Views : 35
Monday 26th of November 2012

Retrieving value from @@Identity  

Hi friends,Is there any way to retrieve value from @@Identity twice for a single transaction in SQL.Please give suggestionsThanks... Continue Reading
Views : 150
Monday 26th of November 2012

SQL tweaking  

I have a pretty simple query that I need to tweak a little but I can't seem to figure out how. Here's the query: Code: SELECT s_name, count( showsongs.song_id ) AS... Continue Reading
Views : 61
Monday 26th of November 2012

Connect to an AS400 or MS ACCESS 2003  

I'm a nubie with SQL 2005 so please be patient.I have been trying to connect to an AS400 Database and have had zero luck. To date, I have downloaded the Microsoft OLE DB provider for DB2 app and installed it. I believe I have successfully Linked to the Server (Server... Continue Reading
Views : 114
Monday 26th of November 2012

New login domain users missings  

I am having trouble adding new domain logins to a SQL server 2000 system.When logging on from my pc I open the new login option in Enterpise manager and select the required domain. All of the standard users are there alongside the global groups. What is missing is all of the... Continue Reading
Views : 186
Monday 26th of November 2012

Changing database  

Hi there guys and gals...i need to move from a access to SQL db, i've never done this before, is there a procedure to follow or just some tips for me?thanksShemzilla Continue Reading
Views : 171
Monday 26th of November 2012

Job Scheduling - to invoke a program  

Hi friends,I want to create a job schedule in SQL Server to invoke a program everday. The job scheduling wizard ask for operating system shell command... but i have no idea what it is. Anyone know how to write shell command for this task? Please reply.... Continue Reading
Views : 110
Monday 26th of November 2012

Multiple joins  

Entity Relationships:Personperson_idfirst_namelast_nameaddr1addr2etcPatientperson_idmed_rec_nbrlocation_idguar_idI want to have a result set that gives me the demographics from person,... Continue Reading
Views : 127
Monday 26th of November 2012


How to select a nth maximum paid employee from table? Continue Reading
Views : 78
Monday 26th of November 2012

Nightmare with a value input  

I have two tables:-tblArea and tblPageContent.In tblPageContent I have a field called PageBody which has a Data Type of vchar and a length of 4000.But for some weird reason I cannot add much content into the field, it comes up with an error... Continue Reading
Views : 200
Monday 26th of November 2012

IF statement query  

Hi everyoneDoes anyone know the SQL code for the following If statement.IF "a record exists in a database table" THEN Update a row within a a table.Cna anyone help Continue Reading
Views : 238
Monday 26th of November 2012

Please help with setting up for OR statement queries  

Hello, I have a problem with creating a simple querry that will look at multiple areas in my database and bring a result.Here's what I want:(search term) --> looks under the "products" table and retrives items based on the search term. Needs to look under SKU,... Continue Reading
Views : 316
Monday 26th of November 2012

SQL Server built in functions  

Which built in fucntion is required in SQL Server if i have a value of -1 and i would like to convert the value to 1, by removing the - (first character from the string)The ASP Code for acheiving this is as followsMid(rsCheckForAvailableStock.Fields.Item("Availabl ... Continue Reading
Views : 123
Monday 26th of November 2012

Simple SQL statment help required!!  

Please can someone tell me how I add a order by statment into the following SQL query? Code: SQL_query = "SELECT * FROM players WHERE age = " &... Continue Reading
Views : 257
Monday 26th of November 2012

Sored procedure  

Hi guys, could anyone please help here This is very URGENT.Thanks guys.Jo. Continue Reading
Views : 139
Monday 26th of November 2012

Stored Procedure Error...  

I'm trying to build a quick stored procedure here but I get error with "BackupId"... Why? Code: CREATE PROCEDURE dbo.sp_tblBackupListINSERT /* ( @parameter1 int =... Continue Reading
Views : 79
Monday 26th of November 2012

Narrowing attempts to one instead of infinite  

Hi! I'm working on a quiz that needs to let the user guess only once on a question then moves on... right now it lets the user guess until the right answer is reached. I have attached my code below. Thanks in advance for any help. Continue Reading
Views : 161
Monday 26th of November 2012