I’m dealing with a legacy system where I need to identify some bad records based on a column with a data type of Float. Good records have a value of… 1 2 1.01 2.01 Bad records are anything such as.. 1.009999999999999 2.003423785643000 3.009999990463260 I’ve tried a number of select statements where I Convert to Decimal […]
I finally got my SSIS package deployed to our SQL 2005 server, and I can run it from my ASP.NET 2.0 code. I needed to change my package after I first set it up. I double-clicked the .manifest file and deployed the package to the same server, but the job is never updated. It stays […]
I have one big query for performance related in SQL Server 2005. I have data like this id parentId 1 null 2 1 3 1 4 2 5 4 6 3 I want the order for the records by downline with parentId and id wise like id Order 1 1 2 2 4 3 5 […]
I’m having to return ~70,000 rows of 4 columns of INTs in a specific order and can only use very shallow caching as the data involved is highly volatile and has to be up to date. One property of the data is that it is often highly repetitive when it is in order. I’ve started […]
Is the following stored procedure code robust for multi-user application. It is working fine. I was wondering if there is any better way to do it and if there is any performance issues. The proc has three sql statements together like 1.Updating hardware status in Allocation Table 2. Calculating Next appropriate Primary Key value for […]
What is the SQL query to check whether particular SQL Login is Enable or Disable?
This may be naive but I cannot get any confirmation of this: When I write a SQL function via the SQLCLR and as a C# SQL Server Project, can the SQL function include any method/class/namespace in the .NET BCL? Are there any restrictions on what the function can do? I have full control of the […]
Am trying to write a query that would output something similar to the last batch of records below. For sure it works in Reporting Services and Crystal Reports, but just throwing it out here to see if it is possible in SSMS/QA: Table: id name amount — —- —— 1 rob 23.00 2 rob 34.00 […]
CREATE TABLE exmp_test ( id int, v1 int, v2 int, v3 int, v4 int ) SELECT * FROM exmp_test id v1 v2 v3 v4 1 2 4 6 7 1 4 77 3 8 I want to add the value of the [id] column to (whichever has least value for v1 ,v2 ,v3 ,v4) for […]
I have 2 tables, one called dbo.dd and one called dbo.gt. where dbo.gt.v_products_model = dbo.dd.[Vendor Stock Code] I would like to update the field dbo.gt.v_products_price with the dbo.dd.[Dealer Ex] Sorry, forgot syntax of SQL 2005 and in a jam!