Forum Replies Created

Viewing 15 posts - 18,346 through 18,360 (of 18,923 total)

  • RE: Conditional joining??

    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...

  • RE: Max Number of SP Input Parameters

    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.

  • RE: Collation Problem in migration

    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...

  • RE: Conditional joining??

    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...

  • RE: Weird OpenQuery Behavior

    I would use this as a last resort as sql server would input the full table before applying the where condition.

  • RE: Running SQL script..

    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...

  • RE: Updating First the First Few Characters in a Cell

    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) -...

  • RE: Updating First the First Few Characters in a Cell

    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...

  • RE: Regarding "OR" statement

    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...

  • RE: Regarding "OR" statement

    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

  • RE: UDF Problem

    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...

  • RE: Does SQL2k stored the last modified date for a Stored Procedure?

    You'll have to run a trace and scan for the alter procedure text in it.

  • RE: Problem with OUTPUT Parameters

    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...

  • RE: Dropping an Index

    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'

  • RE: expand column size

    How does the sliding window method work?

Viewing 15 posts - 18,346 through 18,360 (of 18,923 total)