I tried (using sql200, so ltrim is valid):
update tableOne
set name = (select ltrim(name) from tableOne)
I recevied the following error:
Subquery returned more than one value.
This is not permitted when the subquery follows =,!=,<,<=,>,>=
or when the subquery is used as an expression.
I...
I have a field in a table the has leading spaces.
How can I change the fields to remove any leading spaces?
I was thinking of something like below, but I dont think its correct.
---
update tableOne
set name = (select ltrim(name) from tableOne)
---
Any thoughts on how I should do this?
Thanks.
Hello everyone,
I have a Windows 2000 andvanced server running, with windows2000 and windows ME clients.
My boss wants me to set up a company calander,
so everybody can see where eveyone is that day,
possibly to also share the contact list.
Looked into net folders, but he didn't like that...
Not sure if this is what you are looking for
because it is written for SQL SERVER 7.0,
but you might be able to modify it!?!
CREATE PROCEDURE spP_L
(@phrase varchar(1000))
AS
set nocount on
declare @array varchar(1000) /* sentance passed from Call of sp_*/
declare @separator char(1)
declare...
Terry,
That's what I was afraid of, but thanks for the help.
It gave a better understanding of _sp's, so it wasn't a waste.
Can anybody see a possible MIRACLE work-around?,
Michael
I have been woking with SQL Server 7.0 and
I need to produce a report of questions that are answered by users:
User A_1 A_2 A_3 A_n
101 0,0,0,0 1 1 0
22 1,2,3,4 5 3 1
3110 0,1,2,1 7 <NULL> 1
A_1 is a string...
I got the stored procedure to work as a stand alone procedure, but it is not exactly what I am looking for.
what I have is a list of questions answered by users:
User A_1 A_2 A_3 A_n
101 0,0,0,0 1 1 0
22 1,2,3,4 5 3 1
3110...
Another way is to link the table to itself, as in:
SELECT D1.StID AS StId,
D1.Degree as D_1,
D2.Degree as D_2,
D3.Degree as D_3,
Q4.Degree as D_4
FROM
educate as D1, educate as D2, educate as D3, educate as D4
WHERE
D1.StId=D2.StId and
D1.StId=D3.StId and
D1.StId=D4.StId;
Hope this helps...
tlbroadbent,
I think that is exactly what I'm looking for,
but unfortunately I'm BRAND NEW to SP's and have spent the past few days reading BOL, without luck.
Could you show me an example of how to Call or execute the sp from a query
I'm assuming(but rather clueless)that I have to pass the...
I need to run a job twice a week to gather users that have joined since the previous run date?
I want to run the job every Tuesday morning at 3:00am and every Friday at 3:00am.
on TblAnswers with the datetime field being Ans_AnsweredTime
[code]
So I need to run:
Friday 05/04/2001 and collect...
Hello everyone,
I've got another strange one for you.(using SQL Server 7.0)
Is it possible to break apart a string that is delimited by comma's?
User Fred --> Ans_String_Val = '0,1,2,3,4'
User Wilma --> Ans_String_Val = '6,5,1,2,0'
A)I want to put the values in between the commas into...
I'm sure that this is more than JavaScript, but:
Can anybody lead me in the direction on how to learn how to code a way to create either:
1)Drop-Down Menu (File, Edit, View, Ect.)
2)Icon(Print, Refresh button)
into a users WebBrowser.
Michael
Hello All,
Is there a function to create a pop-up box that has
three items:
1) Yes Button
2) No Button
3) Checkbox to ask if they want to see this Box again.
Thanks for your help,
Michael
Hi again,
First off, let me state that I've been told(and agree) that there should be some re-design of dBase, but:
I need a count of Married/Single/divorced Users who have ordered Product X, and all of the info is in one table:
TblAnswers(No Primary Key)
Ans_QuestionnaireID |----->Question...
Thanks Vancouverite,
This is what I needed.
Good catch Andel, got rid of that Extra 'WHEN'in the Second Case.
FlutePlr,
You're ABSOLUTLY correct.
I understand that it is not a correct design, if you can't retrieve the information. 1/2 of the point of a dBase id to put info into it, the other...
The dBase has already been implemented into our site(not designed by myself). Can anybody help with this query, without a re-design of the entire dBase(over 40+ tables)?
The functionality of it works great for storage, but retreival(analysis) of the info is a problem!!!!
Thanks,
Michael.
The Dbase is running on SQL Server 7.0.
I have a field that is broken into subset's of data seperated by comma's.
table looks like:
tblAnswers
Ans_QuestionnaireID = Relates to Product
Ans_Question = Relates to Question Number
Ans_String_Val(varChar1024)= Is the answer to the...
Here is what I came up with:
select cast(Usr_CreatedOn as char(10)) as Reg_Date,
count(Usr_CreatedOn)as Total
from tblusers
group by
cast(Usr_CreatedOn as char(10));
But, I am always looking for ways to improve my coding,
so any other suggestions are welcome
THANKS for your...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.