Viewing 15 posts - 796 through 810 (of 3,480 total)
Wait wait wait...
you can only reference a CTE immediately following the declaration. Why do you need a CTE for this at all? What are you trying to accomplish?
February 18, 2020 at 5:39 am
Select @localvariable = count(*) from server_cte
February 18, 2020 at 4:55 am
SELECT ServerName + ', ' AS 'data()'
FROM ServerList
FOR XML PATH('');
February 17, 2020 at 6:14 am
Mike... most of the answer that I found is right here...
DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358...
February 16, 2020 at 2:24 am
That's an awful lot of points for someone who can't even post consumable data. I guess this is required reading then: Forum Etiquette: How to post data/code on a...
February 16, 2020 at 2:00 am
Sorry, missed the NVARCHAR. (The answer is in the same article, though!)
February 15, 2020 at 8:09 pm
That was cheating-level easy... except you need a helper function, Jeff Moden's DelimitedSplit8K function. It's here https://www.sqlservercentral.com/articles/tally-oh-an-improved-sql-8k-“csv-splitter”-function
Here's the SQL:
SELECT x.Item AS Category
, COUNT(*) AS UseCaseCount
FROM
(
SELECT ID
,...
February 13, 2020 at 11:11 pm
INSERT INTO OtherDatabase.Schema.Table (<field list>)
SELECT <field list>
FROM...
Or you could
INSERT INTO db.schema.table (field list)
EXEC storedProcName @param1='x', @param2='y';
February 13, 2020 at 9:57 am
The query will eliminate the sets that have already been added. That's what the NOT EXISTS predicate is for.
I guess if you don't like it, you could always write your...
February 13, 2020 at 9:22 am
I need every iteration increased by 5000 rows insert from temp table
Why not something like
SELECT TOP (5000) <field list>
FROM SourceTable st
WHERE NOT EXISTS (SELECT 1 FROM DestinationTable...
February 13, 2020 at 5:40 am
If you're doing an insert where you don't want the constraints checked, you can script out the constraints on the table, then drop them, do the import, then add them...
February 12, 2020 at 2:26 am
Did you actually install SSMS? The weird thing about the newer installers from MSFT is that all the pieces are separate. If you search for it, can you find this...
February 11, 2020 at 8:37 pm
Don't think you can do that very easily with SSRS. the best I think you can do is to make the filters optional... Except you can't build complete filters through...
February 10, 2020 at 8:46 am
Too hard to just copy & paste your CREATE TABLE and INSERT scripts here?
February 10, 2020 at 3:34 am
Would be easier to help with some sample data... It can be completely fake, just representative.
February 9, 2020 at 6:42 pm
Viewing 15 posts - 796 through 810 (of 3,480 total)