all groups > sql server programming > august 2003 > threads for sunday august 17
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Problem from a view
Posted by shine at 8/17/2003 11:17:03 PM
Dear All
I got a problem when i am implementing a view. I have
built a full text index in one table and tried to access it through a view.
When i try to select rows from the view, error message stated that the table
is not full text indexed.
For example,
create view test_view as
select ar... more >>
SUM on subquery error
Posted by Carol Cox at 8/17/2003 9:34:17 PM
When I try to SUM a subquery I get an error that says "Cannot perform an
aggregate function on an expression containing an aggregate or a
subquery."
For example:
select sum(cast(
select value
from table2 t2
where t2.column2 = t1.column2
)as int) as Result
from table t1
Than... more >>
no more lock classes available from transaction
Posted by Uma at 8/17/2003 9:20:53 PM
Hello,
I am trying to query 78 tables, I use a query some thing
like this
"select * from table1 union all select * from table2 union
all select * from table3 union all ........ "
When I try to execute the query, I get this error
" No more lock classes available from transaction" . I do
... more >>
trying to join on a computed value
Posted by maxhodges NO[at]SPAM hotmail.com at 8/17/2003 8:59:09 PM
need an answer quick, so I really appreciate your help.
I'm trying to join table A with table B, but the data in the column
I'm joining on in table 'B' needs to be modified/computed. All the IDs
in 'B' have been prefixed with "S0" so I need to first strip these
characters off before I can join... more >>
Help with SQLServer trigger
Posted by scohen at 8/17/2003 8:48:58 PM
I'm having trouble compiling this trigger. Can anyone help me?
CREATE TRIGGER calculate_sus ON [dbo].[JOB_TEJAS]
AFTER INSERT
AS
BEGIN
DECLARE @sus INT;
DECLARE @unix_start_date INT;
DECLARE @unix_end_date INT;
DECLARE @nodes_reserved INT;
DECLARE @status VARCHAR... more >>
Order By, Case & Multiple Columns
Posted by Rasika at 8/17/2003 6:50:04 PM
Hi
I am trying to use multiple columns when doing an 'order
by'. The 'order by' is in a case statement. I get the
this error (Incorrect syntax near ','). The code is
below, can someone pls tell me how to get around this?
=====
order by
case
when @sortby = 'address' then
Address, ... more >>
QA
Posted by bindu at 8/17/2003 6:04:23 PM
also how to toggle between the 3 panes in a session of QA.
Thanks alot.
... more >>
QA
Posted by bindu at 8/17/2003 6:01:48 PM
Hi,
what is shoutcut to select a single/2 line statement on QA
Thnaks.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
newb question on data model
Posted by bindu at 8/17/2003 5:51:51 PM
Hi ,
Recently I saw a data model. It had PK,FK and and I on it.
e.g. a table has a PK1, FK!,FK2 and FK3. it also has a
field with I1. I could not understand what this I1 means.
Thnaks.
... more >>
Trigger Update Question
Posted by heebe NO[at]SPAM hotmail.com at 8/17/2003 5:15:09 PM
Help :)
I am trying to write a trigger to copy a record from one table to
another when a record is created, or inserted. There will be several
fields but I am trying to work with just two for now. Here is the
deal:
1) Old table is originaltable_USER and new table is newtable_user
2) want... more >>
automatic rollback a transaction
Posted by Mr. J. at 8/17/2003 3:49:44 PM
Hello,
I have sql-server 2000.
I have 2 programs,
that each one start a transaction (do execsql on the adoquery :
"begin transaction" ).
I have marked that I am in a transaction after begin transaction of one
program,
but when I need to do : rollback the transaction in one program (rollba... more >>
Calculation across date periods
Posted by AndrewM at 8/17/2003 3:22:31 PM
Hello,
I need to calculate a total based on a date period. My input values are 10
August to 25 September. As you can see from this example the date period
goes across 4 price periods.
Your help will be much appreciated.
Thanks,
Andrew.
CREATE TABLE priceTBL
(fromDate [datetime] NULL,... more >>
sql select query - pls help
Posted by priya at 8/17/2003 3:12:07 PM
Hello,
Pls help with the following SQL:
I have a table
create table contract
(id int ,
type char(2),
name char(20))
with id and type as key.
The data in the table is as follows:
ID type name
-----------------------------
1 g4 N1
1 m3 N2
1... more >>
newbie insert question
Posted by bbxrider at 8/17/2003 2:24:43 PM
after 2 hrs and all my manuals, google, and sql tutorial sites now realize
this wont work
INSERT INTO MyTable (F1, F2, F3) VALUES (V1, V2, V3) where v1, v2 and v3 are
program variables
but something like this should work
INSERT INTO MyTable (F1, F2, F3) VALUES ( " _
& MyInteger & ", '" &... more >>
SQL Group by Question
Posted by John Davis at 8/17/2003 2:02:24 PM
Given this table Orders:
Cust_id Amount
100 $100
100 $80
101 $500
101 $400
102 $200
What is the SQL code to return this result:
Cust_id Amount
100 $180
101 $900
102 $200
Please advice, thanks!
Joh... more >>
Reseting Identity
Posted by Roy Goldhammer at 8/17/2003 1:17:39 PM
Hello there
I have some table that i would like to have field that provide always the
field record number. For this i used Identity but when i delete all records
from the table how can i also reset the identity so it will start from 1
again?
... more >>
how to toggle between QA windows ?
Posted by Hassan at 8/17/2003 1:04:59 PM
Whats the shortcut key to toggle between multiple QA sessions open through
QA. ?
... more >>
Change Collation
Posted by Ricardo Lopez Celani at 8/17/2003 12:50:37 PM
Hello.
I need to change the COLLATE sequence on TEMPDB database, change it from de
Latin1_General to Modern_Spanish.
I don´t have here the SQLServer CD to make a Rebuildm because I´m on a trip
and the database I have is in Modern_Spanish and the server is
Latin1_General.
What can I do ?
I tri... more >>
An easier way to Transpose?
Posted by Travis Neale at 8/17/2003 11:54:50 AM
I was wondering if their is an easier way to do a simple rotating of a
column into a row. I looked through past post and most people recomend
cross-tab queries or Pivot tables, but I don't think that gives me what I
want.
I have two columns (Date, Value1) and I want to return one row with 24
c... more >>
Join problem in a view
Posted by Vincent Hsieh at 8/17/2003 11:14:22 AM
Dear friends,
I am not familiar with self join or other join. If anybody can
give me an example to figure out this question, it would be
greatly appreciated.
I have a table Item(Item_No, Item_Name). Now how
do I create a view with sequentially incrementing field "INDEX_"
by self join or othe... more >>
Looking to contract a small job out
Posted by AndrewM at 8/17/2003 10:50:12 AM
Hello,
I need to have a couple of stored procedures written and maybe some table
design modified as part of the process. The database we have is for selling
accommodation. Now I would imagine that as long as our objective is clearly
noted and the table structures are included this shouldn't ta... more >>
Update table with condition
Posted by NiitMalad at 8/17/2003 5:24:53 AM
Dear Friends
I have two database and i want to update one of the
database on the basis of userinput.
The procedure should ask the user for the range of
invoice number to transfer and then the other database
should get updated.
INSERT INTO Database2..TargetTable (keycol,col1,col2,col3... more >>
Default Stored Procs Parameters value
Posted by Roberto Moro at 8/17/2003 4:13:11 AM
In which system table are stored the defaults values defined for the
parameters on stored procedures? I know the parameters are stored on
syscolumns table, but I can't find where are the default parameters values.
Thanx Roberto
... more >>
|