Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to populate default values for a new record?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01474230
Message ID:
01474287
Views:
51
This message has been marked as a message which has helped to the initial question of the thread.
>>One time job?
>>If so:
>>
>>EXEC sp_MSForEachTable 'EXEC sp_columns ''?'''
>>
>>
>>:-))))))))))
>
>No, this would not do. I need to write a query to see if I have Defaults in any of the tables.
SELECT OBJECT_NAME(syscolumns.Id) AS Table_Name,
       syscolumns.name AS Column_Name,
       OBJECT_NAME(syscomments.id) AS Default_Constraint_Name
FROM syscomments 
INNER JOIN syscolumns ON syscomments.id = syscolumns.cdefault AND syscolumns.cdefault > 0
ORDER BY OBJECT_NAME(syscolumns.Id),syscolumns.name 
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform