Viewing 15 posts - 271 through 285 (of 748 total)
You have an adjacency list model. If there are not too many levels of hierarchy, querying can be handled via CTE. But you might want to consider nested sets:
September 29, 2022 at 7:46 pm
You've practically written simple list already:
SELECT cus_no, address, city, state, zip
FROM table
WHERE cus_no IN (cus1, cus2, cus3)
Since you're not on SQL 2017+, STRING_AGG() function isn't available if...
September 29, 2022 at 6:05 pm
My experience in the past was that many email clients didn't handle CSS well, & I ended up needing to rely on tables & HTML formatting tags rather than CSS...
September 29, 2022 at 1:26 pm
You said "they will later export to a production database in the same server". Are you saying they will export tables in their own schema to their own schema in...
September 26, 2022 at 9:31 pm
This will get you the first day of the current year:
DECLARE @StartDate DATE = DATEADD(year, DATEDIFF(year, 0, GETDATE()), 0);
Do you want only completed months, or everything through...
September 26, 2022 at 4:55 pm
Removing the table article from the distribution and then re-adding would allow it to re-synch (assuming it drops/deletes/truncates & recreates). You said you don't even have permission to view replication,...
September 26, 2022 at 4:35 pm
You can definitely do that. What are the roles of these users? What are the uses of the tables they would create? Do they really need their own permanent tables,...
September 26, 2022 at 4:26 pm
You might be able to resolve the problem, but need to make absolutely sure that you re-insert only the rows that you deleted, and not any new rows, or you...
September 26, 2022 at 3:56 pm
The GetTheStanine procedure you posted is not setting a return value, it is doing a select. How are you not just getting zero from these calls?
EXEC @Energy...
September 9, 2022 at 10:29 pm
Sorry... Didn't notice it before. The syntax to set a variable equal to the return code of a proc is
EXEC @Energy = GetTheStanine @AppID,1,8;
EXEC @Flex...
September 9, 2022 at 7:55 pm
What is your definition of duplicates in this scenario? Please provide an actual example of multiple rows that comprise a duplicate (obfuscated if necessary).
There should be only one row for...
September 9, 2022 at 7:51 pm
What is "a standard nine value"?
You didn't provide code for GetTheStanine. Does the GetTheStanine procedure return (not select) an integer value that you want in @Energy, @Flex, @Develop, & @Distort?...
September 9, 2022 at 7:22 pm
Is the query optimized? Do you have the necessary indexes? If you provide DDL for the tables & views involved, the proc logic, & execution plan (obfuscate if needed to...
September 9, 2022 at 3:30 pm
Why do you want to use such a non-standard format instead of just a standard CSV with column names in a header row? Or no header row if the data...
September 8, 2022 at 8:38 pm
Viewing 15 posts - 271 through 285 (of 748 total)