Viewing 15 posts - 31 through 45 (of 87 total)
if you want to do an UPDATE (overwrite) query it would look like this:
Note that this query will...
March 24, 2004 at 3:14 pm
That message is OK to ignore. It just means that Query analyzer can't display it in the Query By Example (QBE) area. The CASE statements are too complex for it to...
March 24, 2004 at 11:58 am
You can also use the RIGHT function with LEN for pretty much the same effect.
DECLARE @mystring VARCHAR(10)
SET @mystring = '123456789'
SELECT RIGHT(@mystring, LEN(@mystring) - 3)
Of course you can substitute a column name...
March 24, 2004 at 11:54 am
Double check the tablename, SQLServer doesn't think that table is in your DB. (you typed rFQ_files at top, but rQF_files in SQL statement...)
I bet if you do a simple 'SELECT TOP...
March 24, 2004 at 9:54 am
Hey that's cool! As long as we're making it shorter, why not:
DATENAME(yyyy, summary_date ) + '-' + RIGHT('0' + DATENAME( wk, summary_date ) ,2)
DATEPART returns INT while DATENAME returns...
March 24, 2004 at 9:41 am
Thanks for that very strong pro SP post Jack.
I'm afraid that I'm dealing with some IT folks who either A) have Stored Procedures confused with some other feature of...
March 24, 2004 at 9:23 am
Here you go:
SELECT #t.ProjectID, mud, uploaddate, [Filename] FROM #t INNER JOIN (SELECT ProjectID, MAX(uploaddate) mud FROM #t GROUP BY ProjectID) s ON #t.ProjectID = s.ProjectID ORDER BY mud DESC,...
March 23, 2004 at 4:17 pm
Heh heh...
I was working on a slightly different solution involving REPLICATE() when I thought of using RIGHT(), I left in that outside convert by accident. You're right Antares, it turns it into...
March 23, 2004 at 3:58 pm
Or you could do something confusing to read like:
CAST(DATEPART(yyyy, MyDateCol) AS VarChar(4))
+ '-'
+ CAST( RIGHT(CAST('0' as VarChar(1)) + CAST(DATEPART( ww, MyDateCol) AS VarChar(2)),2) AS VarChar(2))
Which...
March 23, 2004 at 2:02 pm
Peter, I think you're right even though it was a tongue in cheek statement you made. I'm also running up against the 'We don't understand it so therefore it must be simple'...
March 23, 2004 at 8:34 am
Yes, I suppose that they may favor updatable views. Since my db is much more of a reporting db, updating is practically moot though. almost all data insert is done by the...
March 22, 2004 at 3:06 pm
RE: Temp table vs @table var...As always I guess I'll have to test for myself whether #Temp beats @table or reverse in My scenario. My typical temp table has few rows,...
March 22, 2004 at 10:51 am
Thanks all for your responses. I hope to uncover some more details about this anti-sp attitude later on this week.
In response to Antares, Yes I think there's either an agenda...
March 21, 2004 at 10:57 pm
This website: http://www.users.drew.edu/skass/sql/TextDriver.htm outlines a way to use ODBC text driver to read/write text files. I've been meaning to give it a try but haven't gotten to it...
March 20, 2004 at 2:29 pm
Thanks Prasad! It's what I believe. I'd sure like to hear from others on the topic...Thanks in advance.
March 20, 2004 at 1:56 pm
Viewing 15 posts - 31 through 45 (of 87 total)