Is the SQL Mail started? you can check this under
support services when u expand the server list using MMC.
To send emails with SQL Server check the links below.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q263556
http://www.mssqlserver.com/articles/sqlmail_p1.asp
Nice...
...a table with all the months starting from 1 to 12? if so this is one way to do it.
Create Table #TEMP (month1 tinyint)
Declare @i int
set nocount on
SET @i=1
while @i<=12
begin
insert into #temp (month1) values(@i)
set @i=@i+1
end
set nocount off
select * from #temp
GO
DROP TABLE #TEMP
dbtech
...--This Works
SET SET ANSI_WARNINGS OFF
insert into #temp values('12345678901')
SET SET ANSI_WARNINGS ON
--This Fails (The default setting in SQL Server)
SET SET ANSI_WARNINGS ON
insert into #temp values('12345678901')
SET SET ANSI_WARNINGS OFF
SELECT * FROM #temp
go
drop table #temp
dbtech
Check BOL for @@ROWCOUNT
The changes you need to make wil be
IF @@ROWCOUNT=0
BEGIN
If (left(@dateTo,11) = left(@currentDate,11))
/* If2: dateTo is the currentDate */
BEGIN
Insert into #myTempTable
SELECT statment from linked server database
END
END
@@ROWCOUNT Returns the number of rows...
U can make use of CASE Statements.
Please post your full query.
Anway this is how its done
SELECT Amount FROM tablename
WHERE Amount=(CASE WHEN Amount ='' THEN 0 END)
dbtech
U can use CHECK constraints in SQL Server to limit the values entered into a column, note that when the violation of constraint occurs SQL Server will issue a warning message The message will not be in user-friendly format,
Which u will need to trap in your access front end and display a proper...
Are you calling the SP from Visual Basic code? if yes then you can try to set the CommandTimeout property of connection/command object to 0, CommandTimeout=0
if you are running from Query Analyser
Go to
Query Analyzer-> Menu Tools-> Options,
Tab "Connections"-->specify timeout value...
'remote conn timeout': Will not kill inactive process.
Use SQL Profile to monitor the open/close connections.
check this link, U need to register to access the script...
Try this
http://www.sqlmag.com/Articles/Index.cfm?ArticleID=20460
scroll down below and you can download the code for the article above.
Issues related to crystal reports for displaying iamges from database
http://support.crystaldecisions.com/library/kbase/articles/c2007340.asp
Did this work...
To change the lock you need to use locking hints, search BOL for
locking hints and SET TRANSACTION ISOLATION LEVEL
Example to force No locks while reading data from authors table in Pubs database
SELECT au_lname FROM authors WITH (NOLOCK)
dbtech
Try this
Declare @Alloted int
SET @Alloted=10
SELECT *
FROM tblCase
WHERE dateadd(dd,@Alloted,CaseDate) = getdate()
If you want to eliminate the time part from the date field then you should use the query below.
SELECT *
FROM tblCase
WHERE...
Check this links
Image
http://www.sqlmag.com/Files/09/20461/Figure_01.gif
Answer to ur question abt pointer
http://www.sqlmag.com/Articles/Index.cfm?ArticleID=20461
Try this example
http://www.sqlmag.com/Articles/Index.cfm?ArticleID=20460
dbtech
Are u able to get the result for your SP when u run inside SQL query analyzer?
Here is the modified version of your sp, i prefer to use this method.
With cmd
.ActiveConnection = DBS
.CommandType = adCmdStoredProc
.CommandText = "CompareBom"
.Parameters.Append...
oops there is a mistake in the code i posted above, i forgot to include the commit please ignore the above code and use this one.
/*Create table with default value for column test1 to 0 */
BEGIN TRANSACTION
go
CREATE TABLE dbo.Table4
(
test1 int NULL
) ON [PRIMARY]
go
ALTER TABLE...
...the default value of a column with a SINGLE SQL statement, the only way to do is drop and recreate the default constraint
See the example below
/*Create table with default value for column test1 to 0 */
BEGIN TRANSACTION
go
CREATE TABLE dbo.Table4
(
test1 int NULL
) ON [PRIMARY]
go...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.