Viewing 15 posts - 1,486 through 1,500 (of 10,144 total)
Beatrix Kiddo (6/22/2016)
I'm f@*king terrified.
Me too, and ashamed of the xenophobes.
Back to SQL Server, I work for a company that has a lot of trading systems. We are expecting meltdown...
June 22, 2016 at 9:21 am
Ed Wagner (6/22/2016)
whymaravele (6/22/2016)
I have this function
CREATE FUNCTION [dbo].[fnFormatMobileNumber] (@phone VARCHAR(15))
RETURNS VARCHAR(15)
AS
BEGIN
DECLARE @Formatted VARCHAR(15)
IF (LEN(@phone) > 10)
SET @Formatted = '0' + SUBSTRING(@phone,3,9)
ELSE SET @Formatted = @phone
RETURN @Formatted
END
select
[dbo].[fnFormatMobileNumber](0842507889)
I...
June 22, 2016 at 9:04 am
DECLARE @JobNum TABLE([JobNum] [NVARCHAR](14) NOT NULL);
INSERT INTO @JobNum (JobNum) VALUES
('ABLobby-ABL-1')
,('ABLobby-ABL-2')
,('ABLobby-ABL-5')
,('ABLobby-ABL-10')
,('ABLobby-ABL-11')
,('ABLobby-ABL-15')
,('ABLobby-ABL-20')
,('001656-1-1')
,('001656-2-1')
,('001656-10-1')
,('001656-13-1')
,('001656-13-2')
,('001656-13-10')
,('001656-13-11')
SELECT *,
PARSENAME(REPLACE(JobNum,'-','.'),3),
PARSENAME(REPLACE(JobNum,'-','.'),2) ,
PARSENAME(REPLACE(JobNum,'-','.'),1)...
June 22, 2016 at 8:59 am
Look up PARSENAME as Luis posted. Ideal for this.
June 22, 2016 at 8:55 am
BWFC (6/22/2016)
jasona.work (6/22/2016)
June 22, 2016 at 8:11 am
astrid 69000 (6/22/2016)
i know what my error is, i just don't know how to fix it. :w00t:
It's the opposite way around for us!
June 22, 2016 at 5:48 am
Aren't you curious to see what your dynamically-constructed statement looks like?
alter proc ShortReporRequest_sp
@CompanyName nvarchar(20),
@RequestDate datetime
as
begin
declare @TableName nvarchar(200)
...
June 22, 2016 at 5:13 am
astrid 69000 (6/22/2016)
thanks, but it is still not using the date. it doesnt not give an error type anymore, but the outcome of the query is not what requested.
i do...
June 22, 2016 at 4:38 am
Excellent writeup Alan, thanks for posting this. I had no idea about n-grams, despite having used them for fuzzy-matching for years.
June 22, 2016 at 2:46 am
jasona.work (6/21/2016)
Geez, where the heck has the year gone?We're just under 2 weeks out from the half-way mark of the year...
Absolute time vs relative time, or don't clock-watch when you're...
June 21, 2016 at 7:06 am
astrid 69000 (6/21/2016)
maybe i am calling the...
June 21, 2016 at 5:12 am
This format is preferable because folks can begin working with it straight away:
CREATE TABLE #Temp (ActionId INT NULL, CustomerId INT NULL, Action CHAR(1) NULL, Subaction CHAR(1) NULL, ACTdatetime DATETIME NULL,...
June 21, 2016 at 3:21 am
This?
DENSE_RANK() OVER(PARTITION BY MONTH(yourcolumn) ORDER BY yourcolumn)
June 20, 2016 at 7:19 am
Can you set up some sample data please Celia? It doesn't need to contain all of the columns, just the ones required to help identify the problem domain.
Cheers.
June 20, 2016 at 4:54 am
Viewing 15 posts - 1,486 through 1,500 (of 10,144 total)