Click here to Skip to main content
       

Database

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionEXEC sp_helptextmemberjojoba201126 Nov '12 - 22:43 
my stored procedure is :
 
USE [CRM-CMSAlmas]
GO
/****** Object:  StoredProcedure [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId]    Script Date: 11/27/2012 13:07:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
ALTER PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId] 
(@RecordId INT,@JobId INT,@StepId int)
AS
BEGIN
 
SELECT     WF.Cartable.JobId, Forms.tblVacationDaily.Id,  Forms.tblVacationDaily.IsWorkFlow, Forms.tblVacationDaily.CreateUserID, 
                      Forms.tblVacationDaily.CreateDate, Forms.tblVacationDaily.StepId, Forms.tblVacationDaily.RecordId, Forms.tblVacationDaily.OrderId, Forms.tblVacationDaily.PersonId, 
                      WF.Cartable.ForwardedUserId, WF.Cartable.RecieveUserId, WF.Cartable.IsDeleted, p1.FullName AS RecieveUserName, p2.FullName AS ForwardedUserName, 
                      WF.Cartable.IsBack
FROM         WF.Cartable INNER JOIN
                      WF.JobFormConjuction ON WF.JobFormConjuction.JobId = WF.Cartable.JobId INNER JOIN
                      Forms.tblVacationDaily ON Forms.tblVacationDaily.RecordId = WF.JobFormConjuction.RecordId AND Forms.tblVacationDaily.StepId = WF.Cartable.StepID - 1 INNER JOIN
                      Persons.People AS p1 ON p1.Id = WF.Cartable.RecieveUserId INNER JOIN
                      Persons.People AS p2 ON p2.Id = WF.Cartable.ForwardedUserId
WHERE     (Forms.tblVacationDaily.RecordId = @RecordId) AND (WF.Cartable.JobId = @JobId) AND (Forms.tblVacationDaily.StepId<=@StepId)
END
 
but when i use
EXEC sp_helptext [dbo.tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId]
 
the result is :[Note: I have change Create ----> Alert

 
Alter PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsforSenderAndReciversbyRecordIdANDJobId] 
(@RecordId INT,@JobId INT,@StepId int)
AS
BEGIN
 
SELECT     WF.Cartable.JobId, Forms.tblVacationDaily.Id,  Forms.tblVacationDaily.IsWorkFlow, Forms.tblVacationDaily.CreateUserID, 
                      Forms.tblVacationDaily.CreateDate, Forms.tblVacationDaily.StepId, Forms.tblVacationDaily.RecordId, Forms.tblVacationDaily.OrderId, Forms.tblVacationDaily.PersonId, 
                      WF.Cartable.ForwardedUserId, WF.Cartable.RecieveUserId, WF.Cartable.IsDeleted, p1.FullName AS RecieveUserName, p2.FullName AS ForwardedUserName, 
                      WF.Cartable.IsBack
FROM         WF.Cartable INNER JOIN
                      WF.JobFormConjuction ON WF.JobFormConjuction.JobId = WF.Cartable.JobId INNER JOIN
                      Forms.tblVacationDaily ON Forms.tblVacationDaily.RecordId = WF.JobFormConjuction.RecordId AND Forms.tblVacationDaily.StepId = WF.Cartable.StepID - 1 INNER JOIN
                      Persons.People AS p1 ON p1.Id = WF.Cartable.RecieveUserId INNER JOIN
                      Persons.People AS p2 ON p2.Id = WF.Cartable.ForwardedUserId
WHERE     (Forms.tblVacationDaily.RecordId = @RecordId) AND (WF.Cartable.JobId = @JobId) AND (Forms.tblVacationDaily.StepId<=@StepId)
END
 Go
 
Now the BUG/ERROR :
The content is same but the names are diffrent :
[dbo].[tblVacationDaily_GetAllDetailsforSenderAndReciversbyRecordIdANDJobId] 
 
but the sp is :
 
[dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId]
 
why the names are different ?

AnswerRe: EXEC sp_helptextmemberMycroft Holmes26 Nov '12 - 23:30 
You probably renamed the proc and the sp_help has not refreshed the name.
 
If one of my devs named a proc like that he would get a first warning, there would be no second.
Never underestimate the power of human stupidity
RAH

QuestionRe: EXEC sp_helptextmemberjojoba201126 Nov '12 - 23:38 
Thanks in advanced but the sp was renamed before and now its working properly!
but when i right click the sp and click on modify is diffrent from sp_helptext. and event the name of it in sp list is also different from sp_helptext !
 
But i dont get why this is happing@
AnswerRe: EXEC sp_helptextmemberdjj5527 Nov '12 - 0:59 
Try updating your statistics, "UPDATE STATISTICS..." This may not do anything but it might help
QuestionRe: EXEC sp_helptext [modified]memberjojoba201127 Nov '12 - 3:09 
thanks but no use ...
on google :
should update :sys.object/sys.storedprocedures/sys.sql_modules
 
https://www.google.com/search?hl=en&tbo=d&q=sp_helptext+renamed+stored+procedures++%2B+sql&oq=sp_helptext+renamed+stored+procedures++%2B+sql&gs_l=serp.3...8091.13502.0.13693.20.20.0.0.0.0.488.3055.7j7j2j2j1.19.0.les%3B..0.0...1c.1.MmW-E40j8mE[^]
 
I dont know how

modified 27 Nov '12 - 9:20.

AnswerRe: EXEC sp_helptextmemberEddy Vluggen27 Nov '12 - 13:33 
Try logic; you renamed it?
 
Drop it, and create it anew?
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

QuestionRECORD VALIDATION IN ACCESSmemberteto26 Nov '12 - 5:19 
HOW TO MAKE ACCESS CHECK THE WHOLE RECORD FORM THE OTHER TABLES
I WANT TO CHECK THREE FIELDS IN TABLE FROM ANOTHER TABLE DURING DATA ENTRY
SuggestionRe: RECORD VALIDATION IN ACCESSmemberAndré Kraak26 Nov '12 - 5:56 
DO NOT SHOUT when asking a question. When you use all capital letters it is seen as shouting on the Internet and considered rude. Next time when posting a question please use proper capitalization.
0100000101101110011001000111001011101001

AnswerRe: RECORD VALIDATION IN ACCESSmemberdjj5526 Nov '12 - 6:05 
What have you tried?
Questionhow to compare an operation in where expression In sql [modified]memberGREG_DORIANcod26 Nov '12 - 4:29 
hi everybody I need to do something like that:
 
select x.ProductName, sum(x.field1+y.field2) as Mysum, y.field2 from tablexxx as x inner join tableyyy as y on x.id =y.id where as Mysum - y.field2 > 0
 
obviously it doesnt work!, but I'm looking for suggestions

modified 26 Nov '12 - 10:42.

AnswerRe: how to compare an operation in where expression In sqlmembers_magus26 Nov '12 - 5:20 
Something like this should do the trick.
 
Select ProductName, MySum, field2
From   (Select x.ProductName, SUM(x.field1 + y.field2) as MySum, y.field2
        From tablexxx as x inner join
             tableyyy as y on x.id = y.id) as q
Where MySum - field2 > 0

AnswerRe: how to compare an operation in where expression In sqlmemberMycroft Holmes26 Nov '12 - 11:56 
Add Group By ProductName, Field2
after the where clause
Never underestimate the power of human stupidity
RAH

Questiongrant permission on table in another databasememberDan_K26 Nov '12 - 3:55 
Hi everyone! I need to grant permission on a table in a database to a database role in another database.
 
I have client database containing information about clients. In another database, I have roles for different departments. Now I need to grant permission on specific tables in the client database to roles or departments which are located in another database.
 
I have been struggling for a solution but have not succeeded. Is there any way to accomplish this task? Please help.
QuestionRe: grant permission on table in another databasememberChris Meech26 Nov '12 - 8:25 
Dan_K wrote:
Now I need to grant permission

 
Confused | :confused: Is some kind of permission problem ocurring now that wasn't occuring before? Maybe I'm missing the obvious. Smile | :)
Chris Meech
I am Canadian. [heard in a local bar]
 
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
 
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

QuestionHow to mearge local database with server databasememberJitendra Parida198723 Nov '12 - 22:00 
I use two database one is local server because there internet is not available. another is on global server my problem is that how to update local database on global database.
AnswerRe: How to mearge local database with server databasememberMycroft Holmes23 Nov '12 - 22:17 
Do some research into "replication" this may meet your needs or you can script the data transfer. There is no simple way to "merge" 2 databases. You may also look into Data Compare from Red Gate but I don't think that is going to be the tool.
Never underestimate the power of human stupidity
RAH

AnswerRe: How to mearge local database with server databasememberdjj5525 Nov '12 - 2:48 
What database server are you using?
GeneralRe: How to mearge local database with server databasememberJitendra Parida198725 Nov '12 - 18:13 
sql server 2008 r2
GeneralRe: How to mearge local database with server databasememberGREG_DORIANcod26 Nov '12 - 5:56 
Try Sync Framework
 
http://msdn.microsoft.com/en-us/sync/bb736753.aspx[^]
AnswerRe: How to mearge local database with server databasememberDeepak Kumar1128 Nov '12 - 1:31 
You can also user the SQL import Export wizard to transfer the data from one database to other database either table wise of bulk
RantStupid bloody idiotmemberMycroft Holmes18 Nov '12 - 21:25 
Yeah that's me, I have sql server express installed on my local machine so I can test stuff without polluting the development server. So I have not needed it for ages, not trying anything new on a database level recently.
 
Well now I want to create a test database and I mislaid the blasted sa password and I don't have enough rights on the dammed thing. Apparently the only was is to re install the database Gggrrrr Mad | :mad:
Never underestimate the power of human stupidity
RAH

GeneralRe: Stupid bloody idiotmemberJ4amieC18 Nov '12 - 22:39 
Which is why you dont use SQL Authentication.
 
I feel your pain. Been there.
GeneralRe: Stupid bloody idiotmemberRichard Deeming19 Nov '12 - 1:46 
Alternatively, if you're a local administrator, you can restart SQL in single-user mode, log in using Windows authentication, and either reset the sa password or add yourself to the sysadmin role.
http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Stupid bloody idiotmemberMycroft Holmes19 Nov '12 - 11:43 
Now that I did not know, have 5 for he link, thank you, you have justified the rant...
Never underestimate the power of human stupidity
RAH

Questionlogin with another user faile problemgroupmehdi.sabet18 Nov '12 - 21:11 
hi every buddy
i hav e a problem to create new user in sql server 2008 r2
i create a user and my user created.
and i logined with this user succesfully. but when i want to create a new database in sqlserver authentication mode
i facing with this problem
 
"Create Database permission Denied in DataBase master.[error 262]"
thanks for any help.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 17 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid