Viewing 15 posts - 1,531 through 1,545 (of 6,036 total)
mceventphoto (3/31/2016)
Drew,I like your solution better. It is short and clean.
Thanks,
MC
Which one are you talking about?
I can't find any solution posted by Drew in this thread.
March 31, 2016 at 5:21 pm
drew.allen (3/31/2016)
March 31, 2016 at 5:15 pm
Alan.B (3/31/2016)
How would this be applied against a column in a table?
It depends.
Simplest way would be to add a new column, create a scalar function out of the script...
March 31, 2016 at 4:14 pm
drew.allen (3/31/2016)
March 31, 2016 at 3:54 pm
Phil Parkin (3/31/2016)
Nice solution, Sergiy. You taught me a new trick!The execution plan is interesting: 75% on a 'clustered index update'. Of what?
You welcome.
Takes a twisted mind to come up...
March 31, 2016 at 3:49 pm
Solution is suprisingly simple.
1. Create a "translation" table:
CREATE TABLE #Mapping (
FromChar NCHAR(1) PRIMARY KEY,
ToChar NCHAR(1)
)
INSERT INTO #Mapping ( FromChar, ToChar )
SELECT 1, 'A'
UNION ALL
SELECT 2, 'B'
UNION ALL
SELECT 3,...
March 30, 2016 at 11:08 pm
JediSQL (3/28/2016)
March 30, 2016 at 6:58 pm
...
INNER JOIN #distinctSubscriptionKeys d ON s.sub_id = d.distinctSubscriptionKey
INNER JOIN (
select sub_id, country_code, sub_user_number
from PHONENUMBERS
WHERE e.comm_type = 'v'
GROUP BY sub_id, country_code, sub_user_number) e ON s.sub_id = e.sub_id
LEFT JOIN sirens t
...
March 30, 2016 at 6:44 pm
drew.allen (3/30/2016)
Sergiy (3/29/2016)
'DY1' DayNo into nvarchar(4) column.It causes an implicit conversion and consequently, the warning.
If you either change the datatype to varchar(4) or use N'DY1'...
March 30, 2016 at 6:33 pm
sks_989 (3/29/2016)
Thanks but i still have issue after 43667 char.
3. 43667 char is way beyond 8000 bytes limitation.
What would be the character 43668?
March 29, 2016 at 7:47 pm
1. Restore PRINT commands for "in sql" variables and see what do they return.
Look especially for single quotes or square brackets.
2. Get rid of the cursor and replace it with...
March 29, 2016 at 7:45 pm
You're inserting varchar values 'DY1' DayNo into nvarchar(4) column.
It causes an implicit conversion and consequently, the warning.
If you either change the datatype to varchar(4) or use N'DY1' DayNo instead,...
March 29, 2016 at 4:47 pm
JediSQL (3/23/2016)
Then I can do something like this where the added columns are dynamically constructed instead of being hard coded:
OK, let's pretend you've achieved what you want.
Like in the last...
March 28, 2016 at 8:18 pm
The question, as it's been asked, has a very simple answer:
remove that column you added recently from the index - everything should be back where it was before.
March 28, 2016 at 5:09 am
set edatetime=dateadd(mi,datediff(mi, 0, getdate()) + 50, 0)
March 23, 2016 at 11:54 pm
Viewing 15 posts - 1,531 through 1,545 (of 6,036 total)