Viewing 15 posts - 151 through 165 (of 297 total)
At a guess you have one too many single quotes (apostrophes) at the end of this line, i.e. four where it should have been only three:
SET @sqlZ = 'USE ['...
May 15, 2022 at 11:18 pm
This query will only work if there is exactly one part. I added one more record for a different part, and now I am getting no records at all.
May 12, 2022 at 5:54 pm
Instead of using the apply approach you can also try a reworked query, which works wth the minimal test data you provided:
declare @v_po_history table (
...
May 12, 2022 at 11:21 am
Okay, since we now have learned that you're using Pervasive SQL (BTrieve based) that changes things.
I don't know anything about...
May 12, 2022 at 7:05 am
I fully agree with the comments made by others, but if the OP would like to try anyway, this will work with the test data provided:
select...
May 11, 2022 at 6:29 pm
Something like this perhaps?
declare @v_po_history table (
Part varchar(20),
Lowest_Cost dec(9,6),
Date_Received date
)
insert into...
May 11, 2022 at 5:57 pm
What is it you want to achieve?
PING is a tool that checks a connection to a destination server using ICMP packets. Many firewalls block ICMP from the internet by default.
https://en.wikipedia.org/wiki/Ping_(networking_utility)
But...
May 11, 2022 at 5:06 pm
;WITH test_data AS (
SELECT '100' AS Input UNION ALL
SELECT '1.1' UNION ALL
SELECT '1.10' UNION ALL
...
May 11, 2022 at 4:17 pm
All true, but it's equally true that you can turn a cross join into what is in reallity an inner join by moving the ON join criteria of an INNER...
April 12, 2022 at 10:19 am
The issue is that I need to select the MAX date when:
If the Max Date from my_column is equal to today's date, I need to select the Max Date...
April 12, 2022 at 9:14 am
Also worth mentioning is that you should (almost certainly) never use a DELETE on the whole table. TRUNCATE is much more efficient, and frees up the allocated resources + it...
April 5, 2022 at 8:33 pm
I would check the system stored procedure, i.e. msdb.dbo.sp_send_dbmail, to see if the sp has been modified to append a fixed mail address to any list of email addresses passed...
March 3, 2022 at 7:32 pm
I have to agree with Phil, your replies don't make much sense, and I am also on the verge of despair about you inablility to state your requirements in a...
February 28, 2022 at 12:10 pm
Download NAD in csv format, import it into a table, then select random entries from there?
February 25, 2022 at 2:47 pm
You have to re-throw the error from the catch section of the inner sp, so that it may be caught by the calling outer sp.
February 25, 2022 at 1:41 pm
Viewing 15 posts - 151 through 165 (of 297 total)