Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql Server - Command Window
Message
De
20/04/2007 11:01:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01217728
Message ID:
01218291
Vues:
16
I understand your concerns about deleting. I know the feeling well. But I think it's still easy to avoid incorrect deletes. Just build a correct Select statement in Query Analyzer. When you are 100% sure your select statement is returning only the necessary rows, just change the "Select" to "Delete". You are now 100% sure of what recs will be deleted.

If you are "browsing" a subset of recs to do updates, there is no similar way I know of to Select a subset and do updates on that subset in one step. It's usually the same process as "Delete". In that you first need to get your "Select" statement correct so you are sure you will operate on only the subset of records you want. Then I would modify the Select to return only 1 row of that subset. Note the original value in the column(s) I wanted to update. Then test the update statement against that one row.





>The main reason I take the database offline is to ensure I dont screw up live data , as in Delete all for 1=1, deleted all records, and unlike VFP, you cannot just Recover deleted records.
>
>
>On the Browse = Select .....In VFP. i would use this on the command wndow a lot. Can I select into a temporary table and Brows the Tempoorary table in Sql ?
>
>
>
>>It sounds like you are not skilled enough in SQL yet. I've never seen the need to take the database offline for anything.
>>
>>"Replace all" = "Update...."
>>"Browse" = "Select...", etc.
>>
>>What would be an example of why you would need to take the database offline?
>>
>>
>>>I have been using Sql Server Management Studio but it doe not gove me the type of things I amused to in VFP... Brow, Repalce all For etc....is this sort of stuff in Management Studio or in 3rd Party products ?
>>>
>>>Regards,
>>>Gerard
>>>
>>>
>>>
>>>
>>>
>>>>>Hi.
>>>>>I've been using Sql Server now for about 2-3 months and I miss the VFP command window terribly !!
>>>>>
>>>>>Anybobody know of any utility around whch emulates the VFP window in Dot Net, or even in VFP allows access to a Sql Server file using Command Window type commands.
>>>>>The likes of Brow fields , Delete all for a=b, replace all rep with "003" for State = 'NY' , Copy to ANOTHER Table for x=y etc etc etc
>>>>>Its very frustrating trying to do little tweaky changes like this..... I am currently taking a copy of the Sql Server off line, writing a special .prg in VFP to do any changes, and Restoring back the Database when finished.
>>>>>
>>>>>I thought I saw someting a while ago that did this sort of thing... I am aware of the VFP toolkit but I dont think it does this sort of thing.
>>>>>
>>>>>Any help appreciated.
>>>>>regards,
>>>>>Gerard
>>>>
>>>>You need Enterprise Manager and Query Analizer if you use SQL Server 2000 or SQL Server management Studio if you use SQL Server 2005. All utilities didn't installed if you use MSDE or SQL Express. For SQL Express there is a SSMS express. I think (not sure) that you could download it and use it even if you use MSDE.
>>>>But my recommendation is to buy SQL Server Developer edition (about $60). That way you will have all tools and utilities that comes with SQL Server.

(On an infant's shirt): Already smarter than Bush
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform