Re: Split Field in SQL in to multiple columns

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



RickyP (ricky@xxxxxxx) writes:
unfortunately, I am not able to create temp tables or UDF's ,

Permission to create temp tables is by default granted to public, and I
don't think it's possible to revoke it. Not that it matters here.

so it looks like my options are quite limited. Incidentally, there will
only ever be three values in the field which I am splitting. do you
think my query would be labour intensive, it looks far more complicated
than yours?

I think they are about the same. The main factor for performance is how you
access tables, use indexes and that. Not how you do string manipulation.

--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: SYS.SQL_DEPENDENCIES, Refresh Dependencies
    ... because you cannot have temp tables in user-defined functions. ... If you are using dependencies to see what you need to migrate from test ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Temp Table Faster?
    ... > Or better to create a temp table, select the records into it, and then ... A temp table could be slower because of recompilations. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: SQL 2000 Stored Procedure Problem
    ... I added SET NOCOUNT ON as the first line in spTestTempTable - same ... SELECT 'Test Temp Table' ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: adding identity column dynamically
    ... > In my stored procedure I'm doing a SELECT on ... To get an IDENTITY column you could bounce over a temp table with: ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Most efficient way to run update query
    ... rdraider writes: ... a temp table to hold all the item numbers would be better. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)