One of my clients has a Foxpro database (.DBF file). I need to convert it into a SQL Server 2008 database. Does anyone have any idea how to do this? Kindly give me solution. Thanks in advance….
I would like to achieve a database export (dump) in SQL Server from one server and import that dump in another SQL Server and not necessarily in the same schema name. For example if I have a database prepared with all the data set for implement a new DB for a new customer, that db […]
We have a function in our database that searches two large tables to see if a value exists. It is a pretty large query, but it is optimized to use indexes and generally runs pretty fast. Three times over the past 2 weeks, this function decided to go haywire and run extremely slow, which causes […]
What is the advantage of using FAST_FORWARD for defining a cursor? Is it better for performance? why?
I want to find out which tables in the database are most heavily used (I mean read/write Bytes/Table Size ratio) or IO / Table size ratio. To decide which tables to place on faster discs and which on slower ones. Any ideas? I tried make use of dm_db_index_usage_stats But how to find out how many […]
I’m working on a small project in which I’ll need to select a record from a temporary table based on the actual row number of the record. How can I select a record based on its row number?
I’m trying to set up a Stored Procedure as a SQL Server Agent Job and it’s giving me the following error, Cannot bulk load because the file “P:\file.csv” could not be opened. Operating system error code 3(failed to retrieve text for this error. Reason: 15105). [SQLSTATE 42000] (Error 4861) Funny thing is the Stored Procedure […]
I would like to find all the rows in a table and match on an exact case sensitive string. Unfortunately, my table has the case insensitive collation. What is the most efficient way to perform this. Eg. I would like the following to return no rows: select * from sysobject where name = ‘Sysbinobjs’ For […]
Create Table #Test ( ID Int Primary Key Identity, Category VarChar(100) ) Insert into #Test (Category) Values (‘Banana’), (‘Banana’), (‘Banana’), (‘Banana’), (‘Banana’), (‘Banana’), (‘Strawberry’), (‘Strawberry’), (‘Strawberry’), (‘Banana’), (‘Banana’) Select * ,ROW_NUMBER() Over (Partition by Category order by ID) as RowNum From #Test Order by ID So this script returns this: ID Category RowNum 1 Banana […]
I have two tables tbl_PurchaseDetails and tbl_ItemDetails. I need to insert some rows into tbl_ItemDetails from tbl_PurchaseDetails, right after it is inserted in tbl_PurchaseDetails. I know the problem but i am unable to solve it. Please help. I have written the following code for the trigger: CREATE TRIGGER trigger_UpdateItemDetails ON tbl_PurchaseDetails FOR INSERT AS DECLARE […]