Viewing 15 posts - 18,346 through 18,360 (of 18,923 total)
I just moved the exists to eliminate the @JobsDB variable
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'Configure' AND XType = 'U')
begin
select * from Employees inner join CTJobs.DBO.Jobs Jobs...
March 22, 2005 at 11:03 am
I've never used more than 10 parameters in my progs (almost all queries are done by access in adps).. I can't imagine using more than 25-100 parameters in a sp.
March 22, 2005 at 10:51 am
This is the way to change collation in a query.
Note that you can also change it in the table definition, but that would obviously change every query that touches the...
March 22, 2005 at 10:49 am
this is more a flow job than sql job...
if I got your requirements right I would do this :
if @JobsDB = 1
begin
select * from Employees inner join CTJobs.DBO.Jobs...
March 22, 2005 at 10:00 am
I would use this as a last resort as sql server would input the full table before applying the where condition.
March 22, 2005 at 9:54 am
The go keyword tells sqlserver to end this batch and start a new one. Even if the return keyword is executed (don't know where it would return to... but...
March 22, 2005 at 9:25 am
Actually I redid some test and it turns out that pw's solution is better than mine :
Substring(name, 3, 999) seems to be a tad faster than right(UserField1, len(UserField1) -...
March 22, 2005 at 8:32 am
Update d_details
set UserField1 = 'efgh' + right(UserField1, len(UserField1) - 4)
where left(UserField1, 4) = 'abcd'
I'm using len(UserField1) - 4 in case the field can be more than 8 chars (can be...
March 22, 2005 at 8:09 am
I don't know if you misunderstood, but the results you are getting are correct. The post is about shorcircuiting the or operator. Like in my previous post, when...
March 22, 2005 at 8:02 am
It will exit after the first hit.
Select * from dbo.SysObjects WHERE
1 > 0
OR
--this is shortcircuited
1/0 > 0--should throw an error
Complete article on WindowsItPro
March 22, 2005 at 7:36 am
You can't use another table unless you're inside the udf or inside a trigger. Maybe you could send the parameters needed to calculate the first field in the 2nd...
March 21, 2005 at 1:14 pm
You'll have to run a trace and scan for the alter procedure text in it.
March 21, 2005 at 11:40 am
adInteger and adParamOutput... are meaningless in asp.
You must replace them with their equivalent int value.
Ex adParamInput = 1.
There's also a workaround where you must include a vb file but I...
March 21, 2005 at 8:11 am
You could also use this is the index is not the primary key :
Select * from dbo.SysIndexes where id = object_id('TableName') and name = 'IndexName'
March 21, 2005 at 6:42 am
Viewing 15 posts - 18,346 through 18,360 (of 18,923 total)