Viewing 15 posts - 1,096 through 1,110 (of 1,347 total)
>>Despite my desire to find a workaround, I'll probably just have to start quoting the values.
You haven't explained just exactly why that is such a problem ? If you have...
March 8, 2005 at 3:45 pm
The Nulls are the least of your problems. Taking a perfectly simple problem that cries out for a set-based solution, and throwing cursors & dynamic SQL at it is an...
March 8, 2005 at 2:05 pm
You need to reference the table being updated in the FROM clause.
See BOL on UPDATE syntax
March 8, 2005 at 11:26 am
Situation #1
Use a Derived Table (Or a Common Table Expression [CTE] in SqlServer 2005) and lose the variables:
SELECT
t1.col1, t1.col2, dt.col1, dt.col2
FROM
Customer t1
CROSS JOIN
(
...
March 8, 2005 at 10:42 am
This is an example of a "Pivot". Search on keyword "pivot" and you'll find many examples like this:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=9&messageid=159163
March 8, 2005 at 9:16 am
Turn the existing query into a derived table and query/pivot from it into the variables:
Select
@Type1cnt = Sum(Case Type When 1 Then TypeCount Else 0 End),
@Type2cnt = Sum(Case...
March 8, 2005 at 9:12 am
Enchance Performance ? Probably yes
Good idea ? No
Will it affect integrity ? Yes, absolutely
It must be based on the assumption that the client software that inserts/updates/deletes the database is 100%...
March 8, 2005 at 8:41 am
Well, first off, are you sure there aren't valid business requirements to run 2 instances ?
Maybe there are 2 versions of the client side software installed, and they need to...
March 7, 2005 at 2:08 pm
Well, you'll get several different points of view on this, depending on which data warehousing "religious camp" you listen to, but this process sounds like a "staging" or "back office"...
March 7, 2005 at 10:30 am
>>however in this example the design is correct because the table is denormalised for reporting.
Maybe the design isn't correct, since the process that creates the denormalised data (presumably from normalized...
March 7, 2005 at 9:51 am
See the "Linked Servers" topics in BOL.
March 7, 2005 at 9:02 am
>>I've got a SQL issue that set-based languages don't handle very well
Set based languages handle it really well if the database design is correctly normalized and doesn't have repeating...
March 7, 2005 at 7:59 am
I>>s there any way to prevent the server from trying to convert the column to the datatype of my hard-coded value?
Yes, make your hard-coded value the same datatype as the...
March 4, 2005 at 2:25 pm
If the column is a varchar, you need to quote the value you're comparing it to.
Otherwise, SqlServer tries to cast the column to the datatype of your hard-coded value...
March 4, 2005 at 2:04 pm
Viewing 15 posts - 1,096 through 1,110 (of 1,347 total)