Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008


all groups > sql server programming > february 2004 > threads for sunday february 22

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

Please help me with this query...thanks
Posted by Kim at 2/22/2004 8:55:45 PM
How can I do this in one query I've got a table like this ID RESOURCEID DATE QUANTITY The Id is unique (but just a counter not of interest here), there may be one resourceid for each date and then an asscoiated quantity. I want to select all resourceid (distinct) and I just want just the ...more >>

'Parameters' question
Posted by Suzanne at 2/22/2004 7:18:01 PM
Hi...This is another problem that is eluding me. Suggestions on how this should be coded in Sql 2000? I receive 'incorrect syntax' for 'text' on line 1 and 'tblApTransInvoiceTax' on line 4. PARAMETERS pTransId Text ( 255 ); DELETE DISTINCTROW tblApTransInvoiceTax.*, tblApTransInvoice...more >>

Help needed with IIF syntax
Posted by Suzanne at 2/22/2004 7:12:41 PM
Hi...I'm converting this database to SQL Server 2000. I have this query that is checking if a field contains a value or not..if not, then set the value to zero. However, Query Analyzer is giving me the error "syntax error near the keyword Not'" on the first line (the Select statement). ...more >>

BCP from a database that has a "." in the database name
Posted by Martin Zachs at 2/22/2004 4:56:14 PM
I'm trying to execute a BCP command against a database that has a "." in the database name. In the statement below, 'somecompany.com' is the database name. The statement is running on the same server as where SQL Server is installed, so the -S, -U, -P flags aren't needed. bcp [somecompan...more >>

use of INSERT with Dynamic SQL
Posted by Edi Fellmann at 2/22/2004 4:16:07 PM
I need to execute with INSERT to a table which name changes I supose the only way is to use dynamic SQL. First we create the MyTable table The spInsertMyTable inserts the values, no problems The spInsertMyTableDynamic does not work. I send the error message Is there a way to execute an INSERT s...more >>

string in a query
Posted by Paul at 2/22/2004 2:41:06 PM
I have a table named a_Users_Portfolios that has a column named Portfolio_Symbols of type NVarChar 150 in which I've stored strings in the format 'a', 'c', 'f that I'm returning in the WHERE clause belo via the subquer (SELECT Portfolio_Symbols FROM a_Users_Portfolios WHERE (UserID = @UserID) ...more >>

Problems with date and other countries
Posted by Greg at 2/22/2004 1:43:20 PM
How can I specify a date that will work every regional setting with MS SQL Server 2000? After searching I found the following code but it isn't doing it... the problem still remains: CONVERT(datetime,'" & NOW & "',120) ...more >>

Truncating, Deleting or Shrinking Log File
Posted by martino rivaplata at 2/22/2004 12:35:26 PM
Hello There. I have a SQL database whose log file has grown so big that i cannot even perform a backup because error 112, lack of space. Problem is i do not have disk space anywhere else. I really do not care about the log file since my database is not a intensinve daily inserts tran...more >>



Pass SQL function as stored procedure param?
Posted by Jeremy Collins at 2/22/2004 11:35:43 AM
Hi all, Is it possible to create a stored procedure where I can pass "SUM" or "AVG" etc as a parameter? Something like CREATE PROCEDURE astp_summary @ItemID int, @Func varchar(3) AS SELECT ItemID, @Func(Score) AS TotalScore FROM tb_table WHERE ItemID = @ItemID GROUP BY Item...more >>

Programming DDL
Posted by Morpheus at 2/22/2004 9:31:05 AM
I'm not sure that this is the right fourm, but here goes I've written an application in Delphi that generatres SQL Statements quickly and easily It is looking more and more like SQL Query Analyser, but it has more and different functionailty I ma busy implementing an object browser similar to the...more >>

Top Caluse With Variables without SET ROWCOUNT
Posted by Muhammed Fawzy at 2/22/2004 2:44:28 AM
Hi, I Want to use the top caluse with variables in a stored procedure or UDF but in sql server 2000 this is not allowed . how can i do this without making dynamic sql using exec, ,using spexecquery or using SET ROWCOUNT thanks alot ...more >>


DevelopmentNow Blog