all groups > sql server programming > august 2003 > threads for sunday august 24
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
str function adds a space
Posted by Browser at 8/24/2003 10:40:42 PM
Hello there,
I can't figure out why there is a space added in this query result:
SELECT Isbn + '-' + STR(Specimen) AS IsbnX
suppose Isbn (varchar 20) is "1234567890"
and Specimen (bigint) is 25
the expected result is "1234567890-25"
instead I get "1234567890- 25"
what gives?
... more >>
ISNULL(MyTextColumn, '') returns error in View editor
Posted by Michael Carr at 8/24/2003 9:59:38 PM
I have a column of TEXT data type named MyTextColumn. When I try to create a
view with this expression
ISNULL(MyTextColumn, '')
the View editor gives me an error that says, "Data type error in
expression." The same clause works perfectly in a stored procedure or in
Query Analyzer. I've also... more >>
Group by query
Posted by Hassan at 8/24/2003 8:49:25 PM
Create table #test
(Name varchar(30),
Value int)
Insert #test values('exec sproc 1 ',1)
Insert #test values('exec sproc 2,2 ',1)
Insert #test values('exec sproc 3',1)
Insert #test values('exec sproc 4,1 ',1)
Insert #test values('exec storedproc 1',1)
Insert #test values('exec storedproc 3... more >>
Need some assistance in determining the next ID
Posted by msnews.microsoft.com at 8/24/2003 8:46:55 PM
I have a procedure that will pass in an ID and I need to determine the next
and previous ID's based on that ID. So for example, lets say I have a
table:
CREATE TABLE [dbo].[Topics] (
[Topic_ID] [int] IDENTITY (1, 1) NOT NULL ,
[T_Date] [datetime]
)
Given a Topic_ID, how can I best retr... more >>
need help with string manipulation
Posted by john at 8/24/2003 8:45:31 PM
i'm sure this has been ask a million time but don't seem
to find it any where anyway...
is there a way to change a caracter in a string in all
rows of the db ex:
changing all 'd' for all 'u' or all '#' for '&' etc
thankx all... more >>
dynamic sql security
Posted by Ondrej Sevecek at 8/24/2003 6:35:46 PM
Hello,
as I understand this topic, the statements placed in EXEC() or
sp_executesql will be running under calling user permissions - so it works
like stored procedure owned by the user, doesn't it?
Nice day
Ondra.
... more >>
WHERE clause error
Posted by Scott at 8/24/2003 5:43:53 PM
Below, I'm trying to restrict my results in the USERNOTES field if there is
a numeric value in the first 2 characters. The ISNUMERIC part works within
the main query because I'm using the same syntax with a CASE statement. I
only get an error with my query if I add the ISNUMERIC part.
Shouldn'... more >>
##tables
Posted by sam at 8/24/2003 5:28:01 PM
I tried but could not usderstand in which scenario these
temptable can be useful over #temptables.
Has any body used ##table in real life situation.
Thanks.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
table variable vs temptable
Posted by sam at 8/24/2003 5:25:45 PM
Is there any performance/any other advantage of using a
table variable over temptable.
Thanks.
... more >>
stress testing
Posted by sam at 8/24/2003 5:13:27 PM
Hi,
I have heard this term a lot. what exactly this mean and
how can we do stress testing.
thanks.
... more >>
Need help comparing number in two tables
Posted by larmonte1 NO[at]SPAM yahoo.com at 8/24/2003 5:11:16 PM
Here is what I'm trying to do.
lets say table1 has 10 columns with the numbers 210 - 220
and table2 has 14 columns with the numbers 210 - 224
I need to write a query that would be able to compare table1 and
table2 then only display what is not in table1.
any help is appreciated... more >>
Unique Index for two columns in a table
Posted by jungewum NO[at]SPAM yahoo.com.au at 8/24/2003 4:34:49 PM
Hi,
I would like to add a unique index that consists of two fields in a
table.
e.g. tbl_A (field1,field2) -- field1 & field2 Indexed and combination
must be Unique.
Can anyone tell me the actual sql syntax to create this index?
Thanks,
June.... more >>
Nested Queries - MS SQL
Posted by michael at 8/24/2003 3:02:59 PM
I am in dire need of either a high-quality SQL utility or
a solution that I've missed.
I have been using Access97 for some time. The graphical
query utility and the Jet database enable me to create
database solutions quickly and efficiently. However,
Access97 is ill suited for our expand... more >>
SQL query help
Posted by silk at 8/24/2003 2:29:51 PM
Hi
I am trying to do a query as follows
i have a table with several columns, what i want to do is something like
this
select distinct (desc), id, enddate from table
where id = 12
order by enddate desc
unfortunately the distinct seems to work across all columns ie it will pick
all ro... more >>
Help with SQL Program
Posted by DK 1983 at 8/24/2003 12:22:45 PM
Can anyone please tell me how I would get this done. I
have 6 columes c1,c2,c3,c4,c5,c6 in a talbe names iteams.
If i was to do a "select * from iteams" it would show
everything. So is there a way to show only the things that
match, by that I mean if the whole row was to match with
anothe... more >>
SP_SPACEUSED
Posted by Roberto Carrasco at 8/24/2003 10:47:15 AM
Hi,
Is there a way to create a stored procedured or an object
that reads all tables in a specific database using
sp_spaceused and insert the results in a table to be
consult later ! I tried but I couldn't do it !
Thank's ... more >>
USE @variablename
Posted by Ondrej Sevecek at 8/24/2003 10:25:26 AM
This cannot be run? Where's the problem?
DECLARE @DatabaseName varchar(10)
SET @DatabaseName = 'pubs'
USE @DatabaseName
Thanks Ondra.
... more >>
How to determine temporary table existance
Posted by Ondrej Sevecek at 8/24/2003 10:09:33 AM
Hello,
I need to determine, whether some TEMPORARY table exists (I, perhaps, have
created it before and now want to drop this table).
Thanks Ondra.
... more >>
Need a Book about Database Design
Posted by Krist Lioe at 8/24/2003 4:13:17 AM
Hi SQL Gurus,
I need a Book about how to design a good database.
I never have any course on Database before. Now I realize just using My
intuitive feeling and read the BOL to design a database is not enough.
What kind of Book should I read ?
Is that a 'neutral' Book on database Concept (... more >>
sql server encryption
Posted by Jerry Maguire at 8/24/2003 3:23:34 AM
Hi,
Is there any function in sql server to encrypt a column data? If not, then
is it possible in ASP?
Thanks
jerry
... more >>
asp file upload
Posted by Jerry Maguire at 8/24/2003 1:20:55 AM
Hi,
I am using sql server 8 and IIS 5 on windows XP. I would like to develop a
asp function to upload a file to the database. I have few queries.
1: What is the datatype to store file in sql server database?
2: How can I put a browse button which can get a file from client computer?
3: What fun... more >>
error in user defined function?
Posted by Kristofer Gafvert at 8/24/2003 1:06:43 AM
Is there any way to return an error from a user defined function? Say that i
have this:
CREATE FUNCTION doNothing(@param1 char(1) )
RETURNS nchar(10)
AS
BEGIN
IF @param1 = 'A'
/* do something */
ELSE IF @param1 = 'B'
/*do something else */
ELSE
/* Error, in... more >>
wrong print
Posted by u128845214 NO[at]SPAM spawnkill.ip-mobilphone.net at 8/24/2003 12:57:57 AM
Degree Occupation Salary count
----- ---------- ------ -----
MS
MS engineer1 40k 1
MS engineer2 30k 5
MS enginner2 35k 4
BS
BS operator2 25k 6
BS operator2 18k 7
BS operator3 10k 4
HS
HS operator ... more >>
|