Viewing 15 posts - 2,581 through 2,595 (of 7,609 total)
Let me know if this code looks good, and we can convert it into more dynamic code. I didn't want to spend time doing that until I had the core...
December 10, 2019 at 10:11 pm
Yeah, I am ancient. I'd still pick SQLCMD or PowerShell over bcp though.
Heh... guess I'm more ancient. I've not found much that will actually beat BCP for performance...
December 10, 2019 at 9:38 pm
Could you please post directly usable data, i.e. CREATE TABLE and INSERT statements for the example table data.
December 10, 2019 at 8:54 pm
You also might have a NULL value for po_num in preqitem. That would prevent the NOT IN from yielding any results, so add a NOT NULL check. Or, perhaps even...
December 10, 2019 at 7:26 pm
Are you exporting the data to load into a different SQL Server instance? If so, then you should "native" format on the output. That will save a lot of time...
December 10, 2019 at 3:24 pm
What we ultimately ended up doing was creating a separate db to store user tables in. A view and/or a synonym can be used in other dbs to allow the...
December 6, 2019 at 7:59 pm
I would expect that behavior honestly. I don't see how SQL could realistically maintain a potentially almost unlimited number of intermediate row counts for different snapshot points for every table...
December 6, 2019 at 5:43 pm
Expect to have to do lots of tweaking to the code to handle all the things that come up, though.
NULL / NOT NULL for each column (which should...
December 6, 2019 at 3:19 pm
Expect to have to do lots of tweaking to the code to handle all the things that come up, though.
NULL / NOT NULL for each column (which should always be...
December 5, 2019 at 10:58 pm
A proc is possible, but most people don't code an actual CREATE TABLE statement, they use the gui. They would have to pass in a block of SQL, which means...
December 5, 2019 at 9:15 pm
Probably the easiest work-around is likely a DDL trigger that prevents them from issuing any DROP TABLE (and ALTER TABLE on a table they didn't create, if you need that,...
December 5, 2019 at 6:52 pm
You need to back up and actually do logical data modeling (Google "logical data modeling") not table modeling. You literally cannot normalize what you posted because there are no usable...
December 5, 2019 at 3:55 pm
Ok, interesting. Can you give an example of code that is indefinitely executing? Are you sure it is this sp_executesql code and not some other code in the proc?
[Yes, I...
December 4, 2019 at 8:53 pm
2. ... [H]ow to address this problem ?
That depends on the specific details in this situation.
2A. How many rows are in the remote table?
2B. How much data do you need...
December 4, 2019 at 7:37 pm
A basic numeric calculation should not take long to execute. Look at the @ParmDefinition and make sure that it is not a calling stored procedure or doing something else that...
December 4, 2019 at 6:33 pm
Viewing 15 posts - 2,581 through 2,595 (of 7,609 total)