Viewing 15 posts - 5,056 through 5,070 (of 8,731 total)
I'm using your same code but I don't get an error.
CREATE TABLE tblHoliday( HolidayDate date);
INSERT INTO tblHoliday
VALUES('20150101'),
('20150425');
CREATE TABLE tblPeriod( StartDate date, EndDate date);
INSERT...
April 6, 2015 at 10:53 am
What about inserting it into a global temp table? Would that cause issues?
April 6, 2015 at 10:46 am
You can't use GO inside a dynamic sql statement. GO isn't a T-SQL keyword, it's a batch generator interpreted by SSMS.
April 6, 2015 at 10:01 am
Or maybe you might need a LIKE in your JOIN clause.
SELECT
TB.DiaryID
,TA.MedicalCodeID
FROM dbo.TableA TA
JOIN dbo.TableB TB ON TB.EmisCode LIKE TA.EmisCode + '%';
April 6, 2015 at 9:22 am
No, it's not possible.
The IDENTITY property can be assigned to tinyint, smallint, int, bigint, decimal(p,0), or numeric(p,0) columns. Only one identity column can be created per table.
April 1, 2015 at 1:18 pm
This is an awful query, but it's not just the query. The problem comes from the database design. I see a special problem on dbo.avoice_vw_TableDetail as it is completely denormalized.
Another...
April 1, 2015 at 12:49 pm
As previously stated, you need to normalize your table. If you can't change the schema, you still need to code the normalization and denormalize again. Here's a sample on how...
April 1, 2015 at 10:29 am
Anshul Parmar (4/1/2015)
;WITH CTE AS
(
SELECT CAST('2015-03-01' AS...
April 1, 2015 at 9:34 am
What's the error? What are you trying to do?
March 31, 2015 at 3:35 pm
As previously said, you can use a cross apply.
I'm leaving both options. Note that the join needs to calculate all the values before joining and that's why it can be...
March 31, 2015 at 3:24 pm
I had the same question some days ago and only found that the index creation affected the column modify_date in sys.objects. If the index supports a constraint, you could query...
March 31, 2015 at 2:13 pm
March 31, 2015 at 12:44 pm
Why are you concatenating the date with itself? What are you trying to do?
There's no problem concatenating dates if you use CONVERT()
DECLARE @SampleData TABLE(
SomeDate date)
INSERT INTO...
March 31, 2015 at 10:20 am
Maybe you could do this to find offending rows.
select fieldname
from tablename
EXCEPT
select fieldname
from tablename
where fieldname
NOT LIKE N'%[^'+nchar(0x9)+nchar(0xA)+nchar(0xD)+nchar(0x20)+N'-'+nchar(0xD7FF)+N']%'
The NOT LIKE N'%[^Pattern]%' will return non-offending rows....
March 30, 2015 at 6:07 pm
Viewing 15 posts - 5,056 through 5,070 (of 8,731 total)