Viewing 15 posts - 421 through 435 (of 441 total)
Use dynamic SQL to complete your query, and you can send the amount of employee you want:
Here's an example:
DECLARE @sql NVARCHAR(1000)
DECLARE @ab NVARCHAR(100)
set @ab...
November 5, 2008 at 8:43 am
A trigger is good for the update statement, but I propose you use a simple default value for the new value. Here's how:
USE tempdb
GO
CREATE TABLE [dbo].[Test]
(
...
November 5, 2008 at 8:34 am
If I understand what you mean correctly, you are saying it would be quicker to do something like this:
UPDATE vwGICSPFVendorUpdateAndKey
SET MfrCode...
October 29, 2008 at 12:14 pm
Maybe the query itself would help, even though I cannot give the tables or some data for them.
Here is the query:
UPDATE vwGICSPFVendorUpdateAndKey
SET MfrCode = sub.MfrCode
...
October 29, 2008 at 11:23 am
Yes the query plan differs, but only a bit. I can post both here, but I don't think it would help. The only thing that differs is an "index spool",...
October 29, 2008 at 11:18 am
Here is a dynamic procedure that should work better, since you can reuse it with a different parameter
CREATE PROCEDURE SelectLastXMonths ( @nbMonths AS INT )
as
BEGIN
...
October 29, 2008 at 7:34 am
I would love to know the answer for that, as the damned architect decided to change the exporting method, and export as Unicode now, 😉
If anyone has the answer, or...
October 21, 2008 at 2:10 pm
Hi, it depends on what you want to do, insert another value to replace the Null value, or simply not insert. Here is an example if you want to insert...
October 17, 2008 at 11:45 am
Works perfectly for me, are you sure the string is the right type? Why is there 49 length values and then 50? It works correctly for the NULL saying 4....
October 17, 2008 at 11:33 am
Hi,
When you use Len(String), it returns the length of the string before it finds only blanks. So a string with 2 blanks and 4 characters returns a length of 6,...
October 17, 2008 at 11:21 am
Simply append your query with the insert into query. Using the parameter itself, because you cannot execute an appened string unless it's in a single string. Here's an example:
DROP TABLE...
October 17, 2008 at 9:47 am
It is actually a requirement to try importing the data as is, because we want to know if errors occured. That update will happen in 100 stores, and we need...
September 4, 2008 at 6:51 am
That would be interesting, since the BULK or OpenRowSet would use the same connection, so the same transaction, and access the "Uncommited rows".
Can you give me a link or a...
September 3, 2008 at 9:24 am
Thanks for the reply, unfortunately, the idea does not work, the query still freezes when I try adding a new transaction in the current one. The top transaction is blocking...
September 3, 2008 at 8:39 am
Hi,
I have an issue with using openrowSet:
When using on real data, i got several products that with double quotes in the description, and caused me problems.
Here is an example:
ProductID ...
August 25, 2008 at 2:51 pm
Viewing 15 posts - 421 through 435 (of 441 total)