Viewing 15 posts - 466 through 480 (of 1,464 total)
You cannot reference the new alias as it does not exist yet.
Below is 1 way of accessing it
WITH cteBase AS (
SELECT DISTINCT
...
September 25, 2019 at 2:17 pm
@desnorton Thanks very much for the help! Using EXISTS ended up being a few seconds faster and I haven't seen it used this way soo also nice.
The EXISTS was...
September 24, 2019 at 5:46 pm
Again, this code is untested, as there is no sample structure or data to work with.
Using a Join
WITH cteBase AS (
SELECT b."start_dtg", b."end_dtg"
FROM...
September 24, 2019 at 5:03 am
Without sample data, this is untested code. That said, it appears to be a very simple update
UPDATE b
SET [invalid] = 0
FROM tableB AS b
INNER JOIN tableA AS...
September 21, 2019 at 6:28 am
Hi DesNorton,
It's almost working; at least it is appending Year_ to EventYear.
However, I am getting the following error:
Msg 207, Level 16, State 1, Line 30
Invalid column name 'Year_2019'.
Do I...
September 19, 2019 at 6:46 am
You could look at simply adding the "Year_" prefix at the point where you substitute it into the DSQL. I have removed most of the meat from your query to...
September 19, 2019 at 4:26 am
There aren't too many people that will open an Excel file.
Please provide your sample data and requirements as SQL scripts.
September 17, 2019 at 5:41 pm
I suspect that the implicit conversion is causing an issue.
Does this work?
WHERE vaoq.Questionnaire_ID = CONVERT(uniqueidentifier, '09C4C7B4-1275-460A-AE23-FFA9256B1ABE')
September 12, 2019 at 11:27 am
September 12, 2019 at 4:24 am
To see if that problem may be present, please execute the following code and report the results, please.
SELECT MinLen = MIN(DATALENGTH(log_message))
...
September 5, 2019 at 6:30 am
You could also try outputting the results directly to file
September 4, 2019 at 3:03 pm
Also, do not prefix your stored procedure with sp_.
This has a performance impact, as SQL assumes that your proc is in the master DB.
September 4, 2019 at 8:16 am
What is the data type of your DOB field?
September 2, 2019 at 4:36 am
Viewing 15 posts - 466 through 480 (of 1,464 total)