Viewing 15 posts - 61 through 75 (of 100 total)
SELECT Div_Cat, Contract, [MNAllowable per TRVU], cnt AS mntrvu_mode
FROM (
SELECT Div_Cat, Contract, [MNAllowable per TRVU], count(*) AS cnt
FROM [2004 Single CPT Inv Summary db]p
WHERE [MNAllowable per...
December 20, 2004 at 9:59 am
not sure if you can count on the first 3 columns acting as keys, but something like this might work:
select sub.name,sub.lname, sub.mname,subAge.age,subPhone.phone,subLocation.location from
(select name,lname, mname from
group by name,lname)sub,
(select...
December 17, 2004 at 1:08 pm
Thanks for the quick response. I grow tired of managing the username.object situation. Not all users are careful about placing 'dbo.' in front of objects. It makes user and object...
December 9, 2004 at 11:56 am
The only cause will be security settings. I would recheck the domain user account one more time (I know this is tedious). One very simple check you can perform is...
December 7, 2004 at 2:00 pm
I would try something like:
I used @time for an example based on getdate(), yous would be much simpler to use.
Select row_id from table
where (select cast(datepart(hh,@time)as varchar)+':'+cast(datepart(mi,@time)as varchar)) <TIME_COL1 and (select...
December 1, 2004 at 12:49 pm
select merchantpayorprovider.*, Payor.Name
from merchantpayorprovider, Payor, Merchantpayors
where merchantpayorprovider.merchantpayorsid=merchantpayors.merchantid
and Payor.PayorID=merchantpayors.merchantid
November 22, 2004 at 1:33 pm
select case when datepart(mm,getdate())<=9 then '0'+cast(datepart(mm,getdate())as varchar)
else cast(datepart(mm,getdate())as varchar) end
November 22, 2004 at 1:27 pm
I would do the following if you're doing this on the same server. The database copy wizard doesn't allow database renaming within the procedure:
1) Backup your DB_original
2) Create DB_copy
3) Choose...
November 17, 2004 at 11:05 am
Assuming you want something like this in the reult set:
1stquery.COL1, 1stquery.COL2, 2ndquery.COL3......
Then try:
select A.COL1, A.COL2, B.COL1, B.COL2
from (1st query) A, (2nd query) B
where A.ID=B.ID
I know this appears to over-simplify the...
November 17, 2004 at 10:13 am
try this out in query analyzer(it doesn't paste well in the thread)....
declare @op int
declare @paramvalue int
(set variables to a value for test)
declare @sql_script varchar(2000)
set @sql_script='select table_id from my_table where
November 16, 2004 at 11:50 am
If you want to store the date as MM/YYYY, then you will need to store it as a varchar.
If you need to parse out the MM/YYYY in SQL:
cast(datepart(mm,getdate())as varchar)+'/'+cast(datepart(yy,getdate())as varchar)
November 10, 2004 at 11:25 am
OK,
you have SQL Mail working. one of two mail options (of course not the one that works with job alerts which is what you want)
Under SQL Server Agent Properties, under...
November 10, 2004 at 10:39 am
I'd start with this article: http://www.sqlservercentral.com/columnists/sjones/sqlmailresources.asp
and then look through some of the discussion forums on this site. very helpful info. don't forget that the mail profile needs to be...
November 10, 2004 at 10:24 am
Place your SQL statement as normal, but where you want to use the global variable use the following: (?)
For example: select * from
where id=(?)
Then select the "parameters" button...
November 10, 2004 at 10:02 am
can you live with this?:
select identity(int) as line_number,[column] into #temp from
select * from #temp
drop table #temp
November 9, 2004 at 3:39 pm
Viewing 15 posts - 61 through 75 (of 100 total)