Viewing 15 posts - 601 through 615 (of 670 total)
The where vctmovementmonth = jan-10 is limiting what is coming back, so you won't be able to compare the MovementMonth calc the way you have it. Try using an...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 2, 2010 at 10:34 am
Your first query is different from your second one. I used the first one.
On an insert, I don't believe you can access the table you are selecting from, but...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 8, 2010 at 6:02 am
This works
DECLARE @temp TABLE(
id INT,
Name VARCHAR(50)
)
INSERT INTO @temp
SELECT 1, 'Nizam' UNION ALL
SELECT 2, 'Sandeep' UNION ALL
SELECT 3, 'Ravi' UNION ALL
SELECT...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 7, 2010 at 10:37 am
the value with the plus sign is actually a numeric value. It's the same as -6, but we usually don't put the + in front of positive numbers. ...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 7, 2010 at 10:32 am
here's a link to how to create this. when you're done, you can just run Select dbo.CreateRandomString(5) to get the value
http://blog.webmart.de/2007/10/22/sql-server-2005-function-to-create-a-random-string/
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 7, 2010 at 10:19 am
There's a couple of problems with your query. First you're not inserting anything into the ScheduleID field so it will always be null. You are inserting the scheduleID...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 7, 2010 at 9:45 am
here's a link to some things you can try
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 7, 2010 at 9:22 am
you need to put the Use statement in the Exec call.
SELECT * FROM OPENQUERY( [linked server],'SET FMTONLY OFF; EXEC (''USE DATABASE; DBCC showfilestats WITH NO_INFOMSGS '')')
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 7, 2010 at 6:44 am
I explained it wrong. I am deleting from the parent table and expecting a cascade delete on the child table. But this was a PICNIC (problem in chair...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 6, 2010 at 9:44 am
I'm not sure what you're talking about. Do you have an example? Based on the data you provided, it updated all duplicate records. The only records not...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 31, 2009 at 6:30 am
You can changes Lowell's code to order by quantity as well
--create a temp table with a bunch o union all statements
SELECT 'A' AS PART,'XYZ' AS TYPE,16 AS QTY INTO...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 30, 2009 at 1:21 pm
does the proc you're calling have a commit in it? Can you post some code so we can see?
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 30, 2009 at 12:41 pm
I was able to get the results I think you were looking for. It had to do with the order in which the variables were set. Try this....
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 30, 2009 at 12:34 pm
I ran your code and it's not working the way you think it is. When I ran it without modifications, it just added the NAV to the return. ...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 30, 2009 at 10:00 am
I use a free package from ssms tools pack it plugs into SSMS. I can create/modify templates before creating the CRUD procs, so they can be properly documented. ...
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
December 30, 2009 at 9:25 am
Viewing 15 posts - 601 through 615 (of 670 total)