Quantcast
Channel: Transact-SQL forum
Browsing all 23857 articles
Browse latest View live

multi-part identifier "jg.GroupId" could not be bound

How do I solve the following problem? Thanks.Update cmp12.dbo.tAccounting set WinLossFlag='1' from cmp12.dbo.tJunketType jk, cmp12.dbo.tArea a, cmp12.dbo.tLocn l, cmp12.dbo.tAccounting ac where EXISTS(...

View Article


NEED A QUERY

I need help on below query. Consider the Student table mentioned below Student NameMarksGradeBrad92 Spence73 Todd52 Jesse48  Generate/Fill the Grade column based on the grade table given below. Case...

View Article


add 0 befor float datatype value

Hi I have Phone Column with float datatype.I need to add 0 before .How can i do this?Let say i have 222222222I need 0222222222.Thanks

View Article

Record Locking Question

hi All,I was oracle plsql programmer and now just started doing sql server stored procedure programming. seem like i can't find answer any where at this moment for some of my requirement.i have the...

View Article

how to loop record in stored procedure

hi all,i am newbie in sql server. i have a scenario as below:1. i have new pricing table for all the products2. i need to update sales order details table where sales order created 3 days backhow do i...

View Article


optimize my query

Hi,I wonder how would the query like if (data is included at the bottom):For a given person, if he/she has Plan A, in my output, I will replace F1 with Plan B's F1 value.In this case, Person1's  Plan A...

View Article

Filtered index columns

What is more reccomended approach for filtered index? There is table with 10 milions of records. Record has 130 columns. I need 40 columns (some of them are joind with other tables). Filtered index...

View Article

Sql help

After getting some help here with some sql, I have populated a table with some data that I now need to present in a particular way. I don't think using a pivot will do the trick. I have four phone...

View Article


INSERT + ORDER BY

Hi.I have a table which has only one field - "Name", that's it. I need to insert all names from other table into this one which must be ordered by a numeric field. Is it possible? I've tried some...

View Article


Counting several specific rows (using where) in the same column

Hi everyone, SQL Server 2008 newbie here!The subject says it all really, I hope! I would like the count the number of rows in a column with a specific id, several times. So:SELECT COUNT (*)FROM...WHERE...

View Article

Nested Recursive Query

I have a recursive query that gets me half way to where I need to be.   The only way I can see to get the result I need is to run that query recursively.Is there a way to do this and then dump the...

View Article

combine three columns

Hello Professionals,                              I have three columns Provider_First_Name,Provider_last_name,Provider_middle_nameNow I want to combines this three into single column to check the same...

View Article

getting an error while running SP with OPENQUERY

Hello,             I am running one openquery like,SELECT TOP 10 query.* FROM OPENQUERY([SERVER],'SET FMTONLY OFF; exec dbo.sp ''product'', ''age''') but getting an error like,Msg 11514, Level 16,...

View Article


Put multi record in one field output

I need get multi records data in to one field output for report purpose.I would like to know are there any easier way to do it without using cursor for SQL 2008.For example, I have following data and...

View Article

What does BACKUP TRANSACTION WITH TRUNCATE_ONLY do?

Hi all,I have a developer working before me who used BACKUP TRANSACTION DB_Name WITH TRUNCATE_ONLYin one of our ETL processes in SQL Server 2000. I've never come across this before and was wondering...

View Article


identity column

Hello Professionals,I think i have a problem with reseed. Please let me know how to reset. here is my situation.There are total 4 rows in my table, one of the column is identity(1,1) column.when I...

View Article

Linking data from within field

HiI have a table with a column which contains data like:YYNYNpF123/NNNYNpF434/YNNYYpF333The pF numbers relates to people in another table like so: Id NamepF123 Paul Smith pF434 Abby Bennett pF333...

View Article


disaster recovery in SQL 2008

we have full back up every day 12:00am and differential  back up every 2 hours. our disk fail @3:45am. how will I restore till 3:45 am. Please help, Thanks in advance

View Article

Insert a specific values based on a condition

Hello,I am trying to insert into a log table that stores the reason behind the non execution of a stored proc. The stored proc runs only if a specific condition is met and for that to execute I am...

View Article

sp_trace_setstatus question

I have some existing server side traces for blocked processes and deadlocks that I would like to reset the history for.  Can I just stop the traces then delete the .trc output files then restart the...

View Article
Browsing all 23857 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>