Viewing 15 posts - 26,296 through 26,310 (of 26,484 total)
Unfortunately, that is DB2 syntax. You have to use T-SQL syntax with MS SQL Server. Even in your own code you used T-SQL.
Original post:
The DB2 equivalent would be:
select * from...
November 15, 2006 at 2:25 pm
Since you are using a temp (#) table, change them from a local temp table (#) to a global temp table (##).
hth
Lynn
![]()
November 15, 2006 at 10:01 am
An update:
1st, Edwin's query was this:
Select * From Table
Where Date(timestamp_column) >= DateAdd(Day, 1, DateAdd(Month, -1, Convert(Char(10), GetDate(), 120)))
I don't see where you included this query into your test.
You remind me...
November 15, 2006 at 9:41 am
Using your own terms:
Challenge met!
Oh, I get it, if the results don't match what is expected, change the requirements of the challenge!
I met the requirements, 100000 records in the table. Pulled...
November 15, 2006 at 7:58 am
Sergiy,
I took your challenge and created a table (actually 2) with 100000 rows. I then used 2 queries one using Edwin's method of determining the starting date and one with...
November 14, 2006 at 11:47 pm
Sergiy,
Tactfully pointing out a better way of doing things is one thing. The way you approached this particular situation was anything but tactful. Using words like "stupid", '"liar", etc. is not...
November 14, 2006 at 5:47 pm
Edwin,
Personally, I'd rather get it right first then work on enhancing performance. If doing a date conversion in a query makes it clearer what you are trying to do, then...
November 14, 2006 at 3:05 pm
Looking at BOL, you need to but the dd in double quotes: "dd"
![]()
November 14, 2006 at 2:18 pm
There are several ways to change fields. In place as was originally provided; using a temporary table; and a third is to add two new columns, copy the data from...
November 14, 2006 at 2:14 pm
Just an alternative, and it ensures you don't lose data if that is a concern.
November 14, 2006 at 1:42 pm
Another alternative to try in development first is this:
1. Create a new table called tmp_tablename that is identical to your existing table, but with the columns your are changing defined...
November 14, 2006 at 1:20 pm
Not sure if this will work as advertised, but it is worth a try:
select
a.*,
b.pob_system_date,
b.pob_company,
b.pob_site,
b.pob_po_nbr,
b.pob_line_nbr
from
dbo.SALES a
left join dbo.PO b
on (a.company = b.pob_so_company...
November 14, 2006 at 1:05 pm
The answer was wrong, yes, but the principle behind it was correct. The rest is up to the user.
November 9, 2006 at 11:21 pm
Good teachers make themselves unnecessary by helping the student to learn without having to hold thier hand all the time. I would prefer to have someone show me the way,...
November 9, 2006 at 11:11 pm
No, he didn't. But I think he noticed, as his experimenting used 14 instead of 21. And he did indicate that my solution was slick, and simplier than what he...
November 9, 2006 at 10:54 pm
Viewing 15 posts - 26,296 through 26,310 (of 26,484 total)