all groups > sql server programming > recent posts
RE: Problem with sp_tables_rowset
Posted by surendra yadav at 2/26/2010 5:15:59 AM
i was running the profilier to fine tune and view the events and found that each 7/8 row is call the procude exec dbname..sp_table_rowset;2 null , N'table'. i am not clear why this many times a sp is being called off. one more table with single row and three columns is called if every 4/5 row. i nee... more >>
RE: Using xp_fixeddrives on a linked server
Posted by Hema Shankar at 2/24/2010 3:24:13 AM
Thanks Anit..this helped me a lot.
From http://www.developmentnow.com/g/113_2005_5_0_0_526805/Using-xp-fixeddrives-on-a-linked-server.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: How to increment a column with varchar data type
Posted by ganesh at 2/23/2010 4:03:10 AM
please sens answer to me
From http://www.developmentnow.com/g/113_2006_4_0_0_737400/How-to-increment-a-column-with-varchar-data-type.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: Assignment of @owner_login_name for scripted jobs
Posted by tabita at 1/11/2010 6:58:30 AM
DECLARE @jobowner nvarchar(50)
SELECT @jobowner = SYSTEM_USER
From http://www.developmentnow.com/g/113_2005_6_0_0_551052/Assignment-of-owner-login-name-for-scripted-jobs.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
what is legacy?
Posted by ravi at 11/18/2009 1:49:41 AM
hello,
This is ravisankar could u plz explane about lagacy?
what is lagacy?
why we use lagacy in 2005?
when we use it?
From http://www.developmentnow.com/g/113_2009_... more >>
RE: SQL MSDE Engine 2000 " import dbf & xls file problems "
Posted by damian at 11/10/2009 9:13:23 AM
Hi folks. Hope that you have already resolved the issue, but anyway. I can recommend trying the [url=http://www.recoverytoolbox.com/when_does_database_recovery_sql_server_2005_occur.html]recover mssql[/url] program that automatically eliminates dbf errors. It is a good solution, if you experience di... more >>
RE: format number with thousand-separator
Posted by Les at 11/10/2009 8:05:50 AM
try
Select convert(varchar,cast(123456.01 as money),1)
works only for Money (2 decimal)
From http://www.developmentnow.com/g/113_2009_3_0_0_925917/format-number-with-thousand-separator.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: OPENROWSET/OPENDATASOURCE with Excel 2007/SQL 2005
Posted by Thomas G at 11/6/2009 8:29:47 AM
Hi I have been having the same issue and found a solution for reading Data in from Excel Files. To achive this, The Sheet name in Excell must not have spaces, The Directory the file is in must be accessible to the SQL Server Service user Account The 'Ad Hoc Distributed Queries' Advanced SQL Config o... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
RE: OPENROWSET/OPENDATASOURCE with Excel 2007/SQL 2005
Posted by Thomas G at 11/6/2009 8:28:43 AM
Hi I have been having the same issue and found a solution for reading Data in from Excel Files. To achive this, The Sheet name in Excell must not have spaces, The Directory the file is in must be accessible to the SQL Server Service user Account The 'Ad Hoc Distributed Queries' Advanced SQL Config o... more >>
RE: A way to disable ALL constraints in all tables temperary?
Posted by Deepankar at 11/4/2009 2:09:26 AM
You can use-
EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL"
From http://www.developmentnow.com/g/113_2006_12_0_0_863765/A-way-to-disable-ALL-constraints-in-all-tables-temperary.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: rename all Primary Keys in db
Posted by Maitre Geek at 10/27/2009 3:08:54 AM
-- Try this to get the Primary Key list (my tables are name tbl_...):
SELECT
s2.name AS tablename,
s1.name AS PKname
FROM sysobjects s1
INNER JOIN sysobjects s2 ON s2.id = s1.parent_obj
WHERE OBJECTPROPERTY(s1.id, N'IsPrimaryKey') = 1
AND s2.name LIKE 'tbl_%'
ORDER BY s1.name;
... more >>
RE: DECLARE cur CURSOR FOR EXEC ('SELECT....') does not work. Any solutions?
Posted by Avi at 10/21/2009 7:30:04 AM
Thank you !!!! its very help me
From http://www.developmentnow.com/g/113_2004_2_0_0_423429/DECLARE-cur-CURSOR-FOR-EXEC-SELECT---does-not-work-Any-solutions.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
converting ip to hex
Posted by Catty at 9/30/2009 11:58:03 AM
Hello!
I need to convert ip-address (varchar) to a hex value.
Example: 10.1.20.41->000.0A01.1428.
Can everybody help with this?
Thanks.
From http://www.developmentnow.com/g/113_0_0_0_0_0/sql-server-programming.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: SQL Server 2005 - CREATE ASSEMBLY
Posted by Sandeep at 9/22/2009 10:15:21 PM
Hi,
i had same problem.I tried the below mentioned steps and when i ran sp_server_info 2
i got the following output
2 DBMS_VER Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
From http://www.google.co.in/search?hl=en&q=ASSEMBLY+is+not+in+blue+in+that+it+does'nt... more >>
SQL Server DELETE statement taking an abnormally long time
Posted by Craig at 9/9/2009 9:28:28 AM
Here is my statement I'm trying to run. The subtree costs on the queries are really fast (.22), but it is still taking an insanely long time to run, upwards of 3 min to delete 5k rows. There is only about 2.5 million records in the detail table.
I see that the average disk queue length on the ser... more >>
RE: Declare in a view
Posted by David Wainwright at 9/9/2009 6:42:19 AM
Tracy McKibben, lay off. This person was asking a question, thats all, not murdering anyone, not even insulting anyone, just asking a question.
From http://www.developmentnow.com/g/113_2006_6_0_0_781883/Declare-in-a-view.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: IRR calculation
Posted by Charlie at 9/4/2009 4:45:35 AM
You can find IRR, XIRR, and a library of other SQL CLR financial functions in a package called XLeratorDB which is at www.westclintech.com
From http://www.developmentnow.com/g/113_2004_7_0_0_429699/IRR-calculation.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: Calculate 30/360, 30/365 DateDiff
Posted by Peso at 8/20/2009 1:22:03 AM
It depends if you want the European calculation style or North American
calculation style.
See here for a complete function http://weblogs.sqlteam.com/peterl/archive/2009/03/15/Excel-DAYS360-clone.aspx
And no, your function doesn't work correctly.
No, it doesn't. Try with these three dates.... more >>
RE: Calculate 30/360, 30/365 DateDiff
Posted by Estuardo Boesche at 8/19/2009 3:50:42 PM
It absolutely works !!!
From http://www.developmentnow.com/g/113_2005_7_0_0_568087/Calculate-30360-30365-DateDiff.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: IRR calculation
Posted by MD at 7/2/2009 4:35:56 AM
Hi Guys,
I got the same problem like N.
Please do post if there is any Sql server program or somthing to calculate XIRR.
Thanks
MD
From http://www.developmentnow.com/g/113_2004_7_0_0_429699/IRR-calculation.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: Trigger + Access + Sql -- different values?
Posted by sudhindra at 6/29/2009 10:05:34 AM
can some one plz help me to convert the below code to sqlserver
CREATE OR REPLACE TRIGGER user_account_status_trg
AFTER INSERT OR UPDATE
OF STATUS
ON USER_ACCOUNT
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
c_job_id NUMERIC(16);
BEGIN
IF INSERTING THEN
INSERT INTO ... more >>
RE: Truncated INSERT statements when using sp_generate_inserts by Vyas
Posted by fred at 6/29/2009 6:19:34 AM
Steve, I tried your suggestion and changed all "8000" values I could find with "max",
but now the sp_generate_inserts doesn't work anymore
I get the em:
"Msg 536, Level 16, State 5, Procedure sp_generate_inserts_test, Line 234
Invalid length parameter passed to the SUBSTRING function.
Msg 536... more >>
RE: empty uniqueidentifier
Posted by zecompadre at 6/25/2009 3:47:12 AM
compare to "cast(cast(0 as binary) as uniqueidentifier)"
From http://www.developmentnow.com/g/113_2004_8_0_0_431975/empty-uniqueidentifier.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
Regarding case sensitivity of a database.
Posted by Ravi at 6/12/2009 1:44:11 AM
While installing database i have made it case sensitive later i have created few tables and have worked alot on it .
i wint now make it case insensitive the same should be applicaible for already available data . how can i do it ?
From http://www.developmentnow.com/g/113_0_0_0_0_0/sql-server-progr... more >>
RE: LoadFromSQLServer method has encountered OLE DB error code 0x80040E09 (EXECUTE permission denied on object 'sp_dts_getpackage',
Posted by deepa at 6/5/2009 2:42:55 AM
didnt get the answer
From http://www.google.com/cse?cx=015258194770007199679:e2pdvdvh7_8&q=The+LoadFromSQLServer+method+has+encountered+OLE+DB+error+code+0x80040E09+(EXECUTE+permission+denied+on+object+'sp_dts_getpackage',+database+'msdb',+schema+'dbo'.).++The+SQL+statement+that+was+issued+has+fail... more >>
RE: More than 255 bytes in Last TSQL Command batch?
Posted by cheng at 6/4/2009 5:02:22 PM
Please could you tell me how to see the complete message of the LAST TSQL Command message box.
From http://www.google.com.au/search?hl=en&q=+last+tsql+command+batch+message&btnG=Search&meta=
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: Truncated INSERT statements when using sp_generate_inserts by Vyas
Posted by Steve at 5/27/2009 2:50:13 AM
That's a bit ironic that now my post's been truncated! Well basically all you do is change varchar(8000) to varchar(max) throughout and then make sure you replace the INSERT lines with the following to replace quotes in table names:
IF @owner IS NULL
BEGIN
SET @Start_Insert = 'INSERT INTO... more >>
RE: Truncated INSERT statements when using sp_generate_inserts by Vyas
Posted by Steve at 5/27/2009 2:47:16 AM
I know this thread's very old but just for the record I came across the same problem and have made a few modifications to the script to cope with very long strings and quote characters in table names. In case of any further errors, this script also prints out the SELECT statement (the bit that does ... more >>
RE: Problem with full text index in farsi language
Posted by mohadeseh at 5/19/2009 8:46:56 PM
wf
From http://www.google.com/search?hl=en&q=farsi+language+in+sql+server+2005&aq=o&oq=
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/... more >>
RE: Insert row and retrieve identity using stored procedures
Posted by Rargie at 4/5/2009 12:08:40 AM
Insert=Yes also solved my problems, thank you so much, as this has been doing my head in for the last 2 hours!!!!
From http://www.developmentnow.com/g/113_2005_3_0_0_441429/Insert-row-and-retrieve-identity-using-stored-procedures.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.c... more >>
|