Viewing 15 posts - 1,891 through 1,905 (of 1,957 total)
I have posted a solution on ASK that does the COUNT_BIG select for 4 Billion rows in 16 minutes on SQL express on my laptop, while I am working in...
March 2, 2010 at 4:46 pm
Another approach I sometimes use is to compare like this:
SELECT ....
WHERE ABS(float_1 - float_2)>=0.01
Changing the 0.01 to whatever value you consider to be a variance.
March 2, 2010 at 12:39 pm
grnlt (3/1/2010)
but if you are using SSRS and the report is needing to pull data from up to the minute time, isnt dynamic SQL the only way to go?
No, there...
March 2, 2010 at 7:47 am
Agreed, the WHERE clause can combine both, but also you can do away with the @Account_Or_Group variable and associated lookup code.
You said the two lookups are mutually exclusive, so there...
February 26, 2010 at 4:52 pm
For those interested, here's the proper way to write the code following "my" best practices...
UPDATE dbo.TableA
SET SomeColumn = b.SomeOtherColumn
FROM dbo.TableA ...
February 23, 2010 at 5:46 pm
Hi,
Did you try the code I posted?
You said the gridview worked using the connection string in web.config, so there is no problem with authentication, but there is a problem with...
February 18, 2010 at 4:17 pm
I don't know if it applies to replication, but check out sp_change_users_login
February 18, 2010 at 12:30 pm
Dim _cnString as string = ConfigurationManager.ConnectionStrings("VanillaConnectionString").ConnectionString
Dim cn As New SqlConnection(_cnString)
February 17, 2010 at 4:36 pm
Luckbox72 (2/12/2010)
SET @query=
'SELECT * Into #tempTable FROM
(SELECT RepID, State
FROM RepBDState) src
PIVOT (count(State) FOR State IN ('+@listCol+')) AS pvt'
EXECUTE (@Query)
select * from #tempTable
and when run I get the following
(236...
February 12, 2010 at 4:00 pm
Would you mind giving a more detailed explanation including a sample scenario to show the point where dynamic SQL start not to work anymore?
I meant "up to a point" as...
February 11, 2010 at 5:17 pm
You can't use GO in a dynamic query like this.
February 11, 2010 at 4:58 pm
I guess you have variable "types" of data in DataValue - hence the check for DataCode=9 ?
In which case you will need to make SQL filter by DataCode before it...
February 11, 2010 at 4:48 pm
[previous post appeared while I was writing this one - this can be taken as an addendum to that]
If you really want that sort of information, just extract the data...
February 11, 2010 at 4:43 pm
Your field SARatio is a percentage held as a number between 0 and 1?
Try ...
WHERE ABS(SARatio - 1)>=0.01
just to see if you are getting the line selected due to it...
January 22, 2010 at 5:24 pm
Viewing 15 posts - 1,891 through 1,905 (of 1,957 total)