Viewing 15 posts - 1 through 15 (of 668 total)
posted twice
February 7, 2024 at 4:52 pm
looks like 2 different folders?? Should the first one be \\myServer\Users\SQLAdmin\Documents\BulkInsert\??
exec master.sys.xp_dirtree '\\myServer\Users\Documents\BulkInsert\', 1, 1;
exec master.sys.xp_dirtree 'c:\Users\SQLAdmin\Documents\\BulkInsert\', 1, 1;
February 7, 2024 at 4:52 pm
can you provide a link to the ddl and data?
October 20, 2023 at 12:02 pm
How about a cte?
drop table if exists #some_table;
go
create table #some_table (
input_string varchar(200) not null);
insert #some_table(input_string) values
('5,1,6,1,69,1'),
('5,1,6,1,3,2,5,3,69,1'),
('5 ,2,36,1,69,1')
;
;with cte as (select input_string, case when RowNum %2 = 0...
November 2, 2022 at 6:53 pm
Is year and Month always the same for all 3 parameters? Are you always looking for StartOfMonth, EndOfMonth and MiddleOfMonth? If so, you can do something like this:
September 8, 2022 at 3:46 pm
Without sample data and DDL, it's hard to help, but I would look here. It is only bringing back where the dtDate = enddate
INNER JOIN tblDate WITH (NOLOCK) ON tblDate.dtDate...
August 18, 2022 at 5:53 pm
In the first link, if you go to step 16, you'll see where they are calling the procedure you have been referencing to update the watermark table. Essentially, they are...
August 18, 2022 at 5:49 pm
DDL, Sample Data and expected results will help us help you
August 18, 2022 at 12:28 pm
I created your table [watermarktable] and then created your stored procedure dbo.usp_write_watermark and then executed your stored proc with the script that I provided. I don't know what you did...
August 18, 2022 at 12:22 pm
I ran your code and it works as expected. What happens if you run this:
Select * from watermarktable where table_name = '[dbo].[products]'
exec dbo.usp_write_watermark @LastModifiedtime = '8/17/2022', @TableName = '[dbo].[products]'
Select *...
August 17, 2022 at 8:01 pm
Instead of shoving it into an xml field, can you parse it into real table or 3?
February 7, 2022 at 7:54 pm
The DateAdd function is failing. The increment parameter is an int and you are passing in a bigint
January 28, 2022 at 2:25 pm
without any sample data, we can only tell you what we see. App Category is coming from the label field in app_menu_filters and Menu is coming from the label field...
January 13, 2022 at 8:37 pm
Depends on how big the data set is, but you could use string_split
;with cte as (
Select c.ID, c.name, ltrim(rtrim(s.value)) as word, c.KeyWords
from #Companies c
Cross apply
string_split(KeyWords, ',')...
January 12, 2022 at 7:20 pm
I tried to just add a column to the table with a default value of the current day but it errors out with because there is no date (Column 14)...
January 7, 2022 at 8:08 pm
Viewing 15 posts - 1 through 15 (of 668 total)