|
More site info...
Transact-SQL (2005) | Forum profile
|
|
Forum profile page for Transact-SQL (2005) on http://www.sqlteam.com.
This report page is the aggregated overview from a single forum: Transact-SQL (2005), located on the Message Board at http://www.sqlteam.com.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "Transact-SQL (2005)" on the Message Board at http://www.sqlteam.com is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on Transact-SQL (2005):
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
158
|
401
|
914
|
|
Post:
|
428
|
1,192
|
2,840
|
|
|
Transact-SQL (2005) Posting activity graph:
|
Top authors during last week:
user's latest post:
a better way to write this code
Published (2009-11-29 12:55:00)
> you can simply use INSERT INTO tblTrucking (BolNumber, Rate) SELECT BOL_Number,jdistdev.dbo.spiritTruckRate(state,sumCtns,SumPallets,client) FROM ( SELECT [BOL Header].BOL_Number, [BOL Header].client, SUM([BOL line items].CTNS) AS sumCtns, SUM([BOL line items].palletsBL) AS SumPallets, [BOL Header].state FROM [BOL Header] INNER JOIN [BOL line items] ON [BOL Header].BOL_Number = [BOL line items].BOL_Number LEFT OUTER JOIN tblTrucking ON...
user's latest post:
convert sqlServer varchar date...
Published (2009-11-27 08:35:00)
> set dateformat dmy select userid, cast(delivery_end_date as datetime) from db_registration where cast(delivery_end_date as datetime) <=dateadd(day,15,getdate()) Make it as a stored procedure Madhivanan Failing to plan is Planning to fail
user's latest post:
Need help with a complicated...
Published (2009-11-29 14:40:00)
> Not complicated, but this should be done in the presentation layer instead. You should only return firstname and lastname as separate columns and then concatenate them for display in your application. SELECT id, firstname, lastname, firstname + lastname AS fullname FROM contacts ORDER BY lastname Tara Kizer Microsoft MVP for Windows Server System - SQL Server http://weblogs.sqlteam.com/tarad/ Subscribe to my blog "Let's begin...
user's latest post:
How to list out the differences...
Published (2009-11-25 23:59:00)
> i had used my database names insted of db1 n db2 like xyz.sys.objects, but still error is same One can never consent to creep,when one feels an impulse to soar RAMMOHAN
user's latest post:
A script that creates too many...
Published (2009-11-27 08:34:00)
> Hi, Anyone got any ideas how I can resolve this issue? Have no idea what to do next after working for a week creating the script in the first place - I cannot see any logical reason why this script is creating more records than I require. It knows from variable @NumRecords how may loops to do with exception to the last record which it does using a different routine before it finishes. After it finishes, it goes to fetch NEXT CURSOR and...
user's latest post:
Average of n subsequent records
Published (2009-11-28 13:41:00)
> quote: Originally posted by X002548 You can also use centrifuges centrifuges? biconical solid bowl screw-type centrifuge No, you're never too old to Yak'n'Roll if you're too young to die.
user's latest post:
Combine 2 select quyers
Published (2009-11-28 05:33:00)
> Ow, found it, :) a ')' too much in select 1 ty :D
user's latest post:
Selective Sum
Published (2009-11-23 13:57:00)
> Aha. That's the issue right there. Thank you! I just looked again and that second row has a Status = 0. I need to change my query. Thank you for all your help, especially the explanation. I will get the hang of Partitions soon....! Thank you, LadyReader
user's latest post:
Merge 2 collumns
Published (2009-11-27 12:29:00)
> convert both fields to "text" on the fly and then proceed. select (convert(cola, char(3)) + convert (colb, char(4)) from mytable i'm rushing home now, so play around with the syntax of the convert....
user's latest post:
Average of n subsequent records
Published (2009-11-28 10:53:00)
> Post the DDL of the table You can also use centrifuges Brett 8-) Hint: Want your questions answered fast? Follow the direction in this link http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx Add yourself! http://www.frappr.com/sqlteam
|
|
|
|
Latest active threads on Transact-SQL (2005)::
Started 1 day, 14 hours ago (2009-11-30 03:06:00)
by waterduck
>
select id,COALESCE(authorfirstname,'')+' ' + authorlastname as name from authors order by authorlastname Hope can help...but advise to wait pros with confirmation...
Started 1 day, 16 hours ago (2009-11-30 01:24:00)
by vikky
>
hi, post ur required output. Thanks, vikky.
Started 1 day, 17 hours ago (2009-11-30 00:28:00)
by kbhere
>
SELECT PERSON_CODE, (SELECT SUM(AMOUNT) FROM Table WHERE DR_CR LIKE 'C') - (SELECT SUM(AMOUNT) FROM Table WHERE DR_CR LIKE 'D') FROM Table Balaji.K
Started 1 day, 16 hours ago (2009-11-30 00:36:00)
by bklr
>
try with these statments SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE Table_Name = 'tablename' SELECT DISTINCT OBJECT_NAME(id) FROM SYS.SYSCOMMENTS WHERE TEXT LIKE '%tablename%' EXEC SP_DEPENDS 'tablename' EXEC SP_RENAME 'tablename','newtablename'
Started 1 day, 16 hours ago (2009-11-30 01:22:00)
by PeterNeo
>
U can get the info by using INFORMATION_SCHEMA views. start with this SELECT C.TABLE_NAME, C.COLUMN_NAME, CP.TABLE_NAME AS PK_TABLE_NAME, CP.COLUMN_NAME AS PK_COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS C
INNER JOIN INFORMATION_SCHEMA.COLUMNS CP ON C.TABLE_NAME <> CP.TABLE_NAME
AND C.COLUMN_NAME = CP.COLUMN_NAME
INNER JOIN INFORMATION_SCHEMA.CONSTRAINT_...
Started 1 day, 17 hours ago (2009-11-30 00:31:00)
by rajdaksha
>
Hi You want this...
CREATE TABLE #TEMP(ID INT, TEXT VARCHAR(1), DATE DATETIME)
INSERT INTO #TEMP
SELECT 1,'M', '1/1/2009' UNION ALL
SELECT 2,'N', '2/2/2009' UNION ALL
SELECT 1,'P', '3/2/2009' UNION ALL
SELECT 3,'R', '4/2/2008' UNION ALL
SELECT 2,'L', '5/2/2007'
SELECT ID, MIN(TEXT)AS TEXT,MIN(DATE) AS DATE
FROM #TEMP
GROUP BY ID
SELECT ID, ...
Started 2 days, 4 hours ago (2009-11-29 12:55:00)
by visakh16
>
you can simply use
INSERT INTO tblTrucking
(BolNumber, Rate)
SELECT BOL_Number,jdistdev.dbo.spiritTruckRate(state,sumC tns,SumPallets,client)
FROM
(
SELECT [BOL Header].BOL_Number, [BOL Header].client, SUM([BOL line items]. CTNS) AS sumCtns, SUM([BOL line items].palletsBL) AS SumPallets,
[BOL Header].state
FROM [BOL Header] INNER JOIN
[BOL line items] ON ...
Started 4 days, 4 hours ago (2009-11-27 12:50:00)
by tkizer
>
You don't restore multiple differentials, just one and then the tlog chain after that if needed. So you can not restore that last differential at that point, but you could instead restore the last full backup and then that last diff. Tara Kizer Microsoft MVP for Windows Server System - SQL Server http://weblogs.sqlteam.com/tarad/ Subscribe to my blog "Let's...
|
|
Hot threads for last week on Transact-SQL (2005)::
Started 1 week, 1 day ago (2009-11-23 09:19:00)
by khtan
>
it will be easier if you can post your table DDL, sample records and expected result KH Time is always against us
Started 1 week ago (2009-11-24 05:56:00)
by mattlightbourn
>
oops, I meant:
SELECT T1.YearNum,
T1.MonthNum,
sum(T1.Revenue) AS Revenue,
sum(T1.Revenue)-sum(T2.Revenue) AS Demand
FROM T1
LEFT OUTER JOIN
T1 AS T2 ON
T1.YearNum = T2.YearNum AND
T1.MonthNum -1 = T2.MonthNum
GROUP BY T1.YearNum, T1.MonthNum
ORDER BY T1 YearNum, T1, MonthNum
Started 6 days, 22 hours ago (2009-11-24 19:06:00)
by tkizer
>
You can use nvarchar(max) with sp_executesql or you could concatenate multiple varchar(8000)s together with EXEC @SQL. Tara Kizer Microsoft MVP for Windows Server System - SQL Server http://weblogs.sqlteam.com/tarad/ Subscribe to my blog "Let's begin with the premise that everything you've done up until this point is wrong."
Started 4 days, 9 hours ago (2009-11-27 08:00:00)
by madhivanan
>
1 Always use proper DATETIME datatype to store dates 2 set dateformat dmy Your select query that convert the date to datetime ex set dateformat dmy select cast('19-12-2009' as datetime) Madhivanan Failing to plan is Planning to fail
Started 1 week ago (2009-11-23 23:35:00)
by tkizer
>
You can use BACKUP/RESTORE or detach/attach. Tara Kizer Microsoft MVP for Windows Server System - SQL Server http://weblogs.sqlteam.com/tarad/ Subscribe to my blog "Let's begin with the premise that everything you've done up until this point is wrong."
Started 1 week ago (2009-11-24 02:00:00)
by kbhere
>
can you post the table structure?? So that, it will be easy for me to try my level best and post some relevant query which meets your requirements... Balaji.K
Started 5 days, 17 hours ago (2009-11-25 23:35:00)
by khtan
>
select db1.name, db1.type, db2.name, db2.type,
in_db1 = case when db1.name is not null then 'Y' else 'N' end,
in_db2 = case when db2.name is not null then 'Y' else 'N' end
from db1.sys.objects db1
full outer join db2.sys.objects db2 on db1.name = db2.name
KH Time is always against us
Started 4 days, 17 hours ago (2009-11-27 00:32:00)
by vikky
>
hi, Please Explain Clearly. Thanks, vikky.
Started 4 days, 5 hours ago (2009-11-27 12:18:00)
by IBoonZ
hi :D I got following code
select
(CONVERT( VARCHAR(50),boeken.uitg_id)+
CONVERT(VARCHAR(50),boeken.cat_id)) as BUitCaID,
uitgever,
titel
from boeken
left join uitgever
on uitgever.uitg_id = boeken.uitg_id)
select
(CONVERT(VARCHAR(50),uitg_id) +
CONVERT(VARCHAR(50),cat_id) )as UitCaID,
uitgever.uitgever,
categorie.categorie
from categorie,uitgever
Now, what i ...
Started 1 week, 2 days ago (2009-11-22 01:08:00)
by visakh16
>
SELECT TransactionDate,Dept,
SUM(CASE WHEN TransactionType='CHARGE' THEN TransactionAmount ELSE 0 END) AS Charge,
SUM(CASE WHEN TransactionType='PAYMENT' THEN TransactionAmount ELSE 0 END) AS Payment,
SUM(CASE WHEN TransactionType='ADJUSTMENT' THEN TransactionAmount ELSE 0 END) AS Adjustment,
t1.Balance + SUM(CASE WHEN TransactionType IN ('PAYMENT','ADJUSTMENT'...
|
|