Viewing 15 posts - 196 through 210 (of 240 total)
How can you say that based upon the code snippet provided?
This could very will work if via some frontend application, a @TYPE of 1 is passed in to signify the...
February 15, 2006 at 12:33 pm
I don't know how to continue but since you are specifing a linked server for accessing each database, you could ensure the account used for the security context of the...
February 15, 2006 at 12:07 pm
Just a word of advice on only storing the duration. You will be losing valuable data about when the visit occurred if you don't store the start and end times. ...
February 15, 2006 at 11:12 am
This is how I normally execute dynamic SQL and it does continue on an print out an error message.
declare @sql varchar(8000)
declare @ErrorNum int
select @sql = 'select * from foo'
exec(@SQL)
select @ErrorNum...
February 15, 2006 at 11:07 am
You can use the following:
USE master
EXEC sp_configure 'allow updates', '1'
go
RECONFIGURE WITH OVERRIDE
go
use [db-to-update-the-objects-in]
update sysobjects
set crdate = '01 Jan 2006'
go
USE master
EXEC sp_configure 'allow updates', '0'
go
RECONFIGURE
go
February 15, 2006 at 10:07 am
It is always a good idea to test a procedure after developing it. This will catch the errors because the execution will fail.
February 15, 2006 at 9:24 am
This returns 4 for '29 Jan 2006'
---------------------
declare @date datetime
select @date = '29 Jan 2006'
SET DATEFIRST 1
BEGIN
DECLARE @renWeek int
SET @renWeek= DATEPART(wk,@DATE)+1
-DATEPART(wk,CAST(DATEPART(yy,@DATE) as CHAR(4))+'0104')
IF (@renWeek=0)
SET @renWeek=dbo.renWeek(CAST(DATEPART(yy,@DATE)-1...
February 15, 2006 at 9:20 am
SOUNDEX and DIFFERENCE will work with something like this:
declare @Customer Table (customerID int identity(1,1), customername varchar(50))
insert @Customer(customername) values ('Gap Online')
insert @Customer(customername) values ('Gap-Online')
insert @Customer(customername) values ('American Large Colony Hotl')
insert @Customer(customername)...
February 15, 2006 at 9:11 am
What is the table definition for Service, specifically the ServiceRestrictionElement column?
February 15, 2006 at 8:59 am
I would store the duration as the seconds elapsed and allow the front end to present the data in any format desired, hh:mm:ss in your case. Also, there may be...
February 15, 2006 at 8:56 am
What I mean is that as part of the code that inserts a new customer, populate a column with the SOUNDEX of the stripped down customer name. An example script...
February 15, 2006 at 8:42 am
It is probably not the cause but in the DCR table, customernumber is declared as varchar(50) while in the customer and master tables, customer is declared as varchar(7). Since they...
February 15, 2006 at 8:28 am
You have to preface the function in the select with dbo. An example is:
SELECT @i = dbo.fn_test(10)
February 14, 2006 at 2:53 pm
If you need temp tables, move the code to a stored procedure on the SQL server and call it from the .ASP code.
February 14, 2006 at 2:51 pm
The problem is with your data. What does this return?:
select count(*) from master m inner join customer c on m.customer = c.customer
How about this?
select count(*) from master m inner join...
February 14, 2006 at 2:47 pm
Viewing 15 posts - 196 through 210 (of 240 total)