all groups > sql server new users > march 2005 > threads for march 29 - 31, 2005
Filter by week: 1 2 3 4 5
Update at group
Posted by Philip L Holmes at 3/31/2005 2:08:22 PM
Is it possible to update for a group statement, I want to do the following
but keep getting errors :
CREATE PROCEDURE ARCustomerRebalance AS
begin
update cust_detail
set curr_bal = (select(sum(ar_master.bal_amt))
from cust_detail, ar_master
where (cust_detail.cust_code = ar_ma... more >>
add "order" col in query?
Posted by r at 3/31/2005 9:52:36 AM
How can I create a column in a query that simply creates an number listing
the order of the rows? Row 1 would contain 1, 2 would contain 2, etc. I
need to sort a table based on a bunch of fields and then "rank" the results.
Thanks.
... more >>
Casting as datetime
Posted by Christoph at 3/31/2005 7:46:08 AM
I can do the following
SELECT CAST( '20050331' as datetime)
and I will get back
3/31/2005
How can I format the string being cast to include the time as well?
I've tried
SELECT CAST( '20050331T115959' as datetime)
SELECT CAST( '20050331115959PM' as datetime)
SELECT CAST( '2005033123... more >>
Querie & subquerie
Posted by Luiz Horacio at 3/30/2005 4:38:03 PM
Hi,
I'm trying to create a subquerie but it is returning a weird result.
Queries:
Querie 1: select grupos_tipos from tipo where num_abs = 8
Result 1: 33010013,33010021,33010030,33010048,33010056,33010064
Querie 2: select mne from laudos_amb
where codigo in
... more >>
Max() question
Posted by r at 3/30/2005 4:30:14 PM
I have a table with the following fields:
ID
SalesAmt
SalesMonth
Every month the table gets updated with sales values from the previous
month. If a particular ID doesn't have sales, there is no record.
I need a query/view showing ONLY the records for the latest month posted for
each ID.... more >>
how to refer to col names?
Posted by r at 3/30/2005 1:27:11 PM
I am creating a VIEW, and in it I can successfully create a column named
YTD_OSO. The data in this column is created by doing calculations on two
other fields that are money-type (in another test they were float). So
far, so good. See snip of code below:
CASE
WHEN aipdn.D017_all.YTD_TotO... more >>
why cannot just backup the log
Posted by Michael at 3/30/2005 11:35:54 AM
When I tried to backup the log of the database, found the option for backup
log is disabled, why this happened?
... more >>
Modify sp_helpdb output
Posted by isabelle at 3/30/2005 11:31:11 AM
Hi,
Is there any way to modify the output of sp_helpdb? Sometimes I would like
to run it and only see a few of the columns instead of the complete output so
I can save to a file for reporting purposes. Is there anyway to specify what
columns you want it to return instead of everything?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
error converting varchar to col of data type int
Posted by r at 3/30/2005 11:28:09 AM
I'm finally getting somewhere, but getting an error message and not sure how
to get around it. I'm guessing it's a text/numeric issue, but not sure what
to do to fix it. Anyone know what I can do?
Here's the message:
Server: Msg 245, Level 16, State 1, Line 1
Syntax error converting the v... more >>
Error handling
Posted by Ramakant at 3/30/2005 10:31:31 AM
hi,
I am sort of new at this...is there a way of handling errors using
try..catch in sql server? I know of @@error and @@rowCount but is there an
option for try-catch kind of stuff?
thanks in advance.
Ramakant
... more >>
Cross-database relationships
Posted by TJ LaPierre at 3/30/2005 7:33:05 AM
Can this be done or do all of your company tables have to be put into one
large database? I can't find anything in the SQL Help files.
--
Hey, I've got some books and I'm doing my best...... more >>
Best way to insert data to MSDE
Posted by Eli at 3/30/2005 2:01:02 AM
Hello.
I'm creating a stand-alone windows application using the MSDE server.
Performance issues in this application are big-deal to my client.
I need to insert data to the database in rate of – 2MB / sec.
Each insert action should insert ~ 10-40 MB to the database.
My questions are:
1. Wha... more >>
help with CASE
Posted by r at 3/29/2005 9:48:36 AM
Hello,
I posted yesterday not understanding why the sql from Access wasn't working
in sql. As was explained, IIF doesn't exist in sql and I must use CASE. I
have looked through the link that was provided, and see the samples use
other statements like "Use" and "Go" and it doesn't look like I... more >>
|