Forum Replies Created

Viewing 15 posts - 5,956 through 5,970 (of 7,636 total)

  • RE: Re: Auto generating numbers

    You probably want to use a substitution table,

    Like this:

    --====== Create a substitution table:

    Create Table #SSNSubs(

    SSN int,

    Subs int,

    CONSTRAINT PK_SSNSubs_1

    PRIMARY KEY CLUSTERED (SSN))

    GO

    --====== Get...

  • RE: DISTINCT in a SQL statements with a TEXT field

    OK, I think I know what this one is...

    Try this:

    Select distinct CAST(TextCol as Varchar(MAX))

  • RE: DISTINCT in a SQL statements with a TEXT field

    Can you provide us with an example so that we can see what work-arounds might be applicable?

  • RE: SQL Profanities

    Oops, almost forgot: Dynamic execution also provides Turing-completeness.

  • RE: SQL Profanities

    magarity kerns (8/12/2008)


    gserdijn (8/12/2008)


    But I'd like to add GOTO to the list of Mr. Simmons. SQL Server 2000 only...

    Whoa there! SQL would not be Turing complete without GOTO -...

  • RE: SQL Profanities

    Wow. This obtuse defense of cursors and RBAR has more hand-waving than a Michael Jackson concert. Practically every other post here has statements to the the effect that...

  • RE: CTE / VIEW

    GSquared (8/11/2008)


    Barry, when I said, "your" I meant Milu's. He miscopied yours.

    Yeah, I knew that Gus. Sorry if it looked like I was responding to you, I think...

  • RE: Trigger Not Executed even if record is inserted or Updated

    What does profiler say about the Insert code?

  • RE: CTE / VIEW

    Milu (8/11/2008)


    your code...

    Create View vwRecursiveAW AS

    WITH DirectReports(ManagerID, EmployeeID, EmployeeLevel) AS

    (

    SELECT ManagerID, EmployeeID, 0 AS EmployeeLevel

    FROM AdventureWorks.HumanResources.Employee

    WHERE ManagerID...

  • RE: Copy a Database with out information

    Jack Corbett (8/11/2008)


    In SSMS right-click on the database and select All Tasks - Generate Scripts. First you should go to Tools -> Options -> Scripting and make sure all...

  • RE: CTE / VIEW

    You can pretty much take any CTE example out of BOL (Books On-Line) and just put a "CREATE VIEW..." in front of it.

    Here is a recursive example:

    Create View vwRecursiveAW AS

    WITH...

  • RE: CTE / VIEW

    Milu (8/11/2008)

    with abc(a,b)

    as

    (select * from temp where tid in (select tid from abc))

    is this possible....????

    Not like that, no. A recursive CTE has to follow a format that has a...

  • RE: CTE / VIEW

    Of course a View itself can contain a CTE also.

  • RE: SPs, UDFs and views are slower in SQL server 2005 than SQL server 2000

    chandima_panditha (8/11/2008)


    For example, there's a stored procedure (which calls some views and UDFs) which takes only few seconds to run in SQL server 2000, but it takes more than 3...

  • RE: Find distinct special characters in column

    Maybe it would be easier for you to list all of the characters that are acceptable?

Viewing 15 posts - 5,956 through 5,970 (of 7,636 total)