Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2000 Equivalent?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01509488
Message ID:
01509500
Vues:
33
Naomi,

Thank you, here is what I ended up using.
select c.name from tempdb..sysobjects o inner
join tempdb..syscolumns  c on o.id=c.id where o.name like '#MyBedsByDate%'
Kirk

>>Does anybody know if there is an Equivalent of the following in SQL 2000? This code works in 2008 but returns invalid object when trying to run it in SQL 2000. The purpose is to get all the field names in my Temp Table which is #MyBedsByDate.
>>
>>
>>SELECT Name 
>>FROM tempdb.sys.columns where object_id =object_id('tempdb..#MyBedsByDate') 
>>
>>
>>Thanks in advance
>>
>>Kirk
>
>Check syscolumns instead of sys.columns
>
>Also, Information_Schema.Columns view should work in SQL 2000 as well.
>
>SELECT Column_Name as Name from TempDb.Information_Schema.Columns
>WHERE Table_Name = '#MyBedsByDate'
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform