Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Some vfp functions in sqlserver
Message
 
À
30/03/2012 05:51:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01539755
Message ID:
01539756
Vues:
63
>hi,
>i've upsized my app to sqlserver 2005
>
>but i can't do some currents operations on tables in sqlserver such as :
>
>1 - replace all
>replace all mytable.field with recno()

There is NO RECNO() function in SQL Server. If you need to update ALL records in a table just use UPDATE command w/o WHERE:
UPDATE SomeTable SET TheField = SomeValue
>
>2 - update customer's database
>
>loop into all tables in the database
>for each table
>delete all record
>append from another table in other database


There is a hidden SP named MS_ForEachTable. That SP executes a query for each table in the DB.
EXEC MS_ForEachTable 'SELECT * FROM ?'
>
>i need a sqlserver procedure that can do that
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform