Viewing 15 posts - 1,081 through 1,095 (of 2,894 total)
Skanda (10/8/2012)
Function is working fine,
but when ever i call the function, it should return single value only,
if i call 10 times - 10 alphanumeric values should be written...
October 8, 2012 at 9:46 am
Ok, you may find it difficult to grab the idea of what you need to from the thread about n-base encoding.
Here we go. You can create the following UDF:
CREATE...
October 8, 2012 at 9:00 am
Skanda (10/8/2012)
CREATE PROCEDURE tsp_alpha_num_test
as
begin
SELECT a.Chr+b.Chr+c.Chr AS AlphaNumeric
FROM (VALUES
('SPA-'))a(Chr)
CROSS JOIN (VALUES
('0'),('1'),('2'),('3'),('4'),('5'),('6'), ('7'),('8'),('9'),('A'),('B'),('C'),('D'),
('E'),('F'),('G'),('H'),('I'),('J'),('K'), ('L'),('M'),('N'),('O'),('P'),('Q'),('R'),
('S'),('T'),('U'),('V'),('W'),('X'),('Y'), ('Z'))b(Chr)
CROSS JOIN (VALUES
('10'),('20'),('30'),('40'),('50'),('60'), ('70'),('80'),('90'))c(Chr)
ORDER BY a.Chr, b.Chr...
October 8, 2012 at 8:38 am
Doesn't look like SQL query to me. What curve-brackets are doing there?
October 8, 2012 at 7:32 am
shilpaprele (10/8/2012)
If @p= null & table abc has many rows with col1 = null, then following select does not reurn the...
October 8, 2012 at 7:24 am
Cadavre (10/8/2012)
Skanda (10/8/2012)
Thank U Boss,It is looking great...
but i need every record should have a numeric and alpabet,
in present code, some records are only alphabetic....
In your original post, you said:...
October 8, 2012 at 7:17 am
That is known as "return value". It is of INT type and by default stored proc returns 0 (zero).
If you want to read it from within T-SQL you can use...
October 5, 2012 at 10:13 am
I've not checked when OP did post original question...
🙂
October 4, 2012 at 10:10 am
ScottPletcher (10/4/2012)
I don't think such extremely simplistic rules always work well in tables, large or small.
Choosing the best indexes takes a lot of careful consideration of your data distribution and...
October 4, 2012 at 9:02 am
ChrisM@Work (10/4/2012)
Eugene Elutin (10/4/2012)
dwain.c (10/4/2012)
...
This is kinda obscure too.
SELECT IDENTITY(INT,1,1) AS N
INTO #t
FROM (VALUES($),($),($),($),($),($),($),($),($),($))a(N)
CROSS JOIN (VALUES($),($),($),($),($),($),($),($),($),($))b(N);
There I go thinking about fortune and glory again! Well fortune anyway. 😛
No way...
October 4, 2012 at 8:52 am
SQL_NuB (10/4/2012)
really?I have someone else looking at it.
Anyway, salesman, FromMonth, FromYear, ToMonth, ToYear are variables that are passed into it so it returns data.
Yes, definitely!
As far as I'm aware,...
October 4, 2012 at 8:43 am
dwain.c (10/4/2012)
...
This is kinda obscure too.
SELECT IDENTITY(INT,1,1) AS N
INTO #t
FROM (VALUES($),($),($),($),($),($),($),($),($),($))a(N)
CROSS JOIN (VALUES($),($),($),($),($),($),($),($),($),($))b(N);
There I go thinking about fortune and glory again! Well fortune anyway. 😛
No way you can win...
October 4, 2012 at 8:33 am
bicky1980 (10/4/2012)
Can someone help me with the following:
I need to take the duplicate rows and merge the telephone data onto the original record as additional columns.
drop table temp
create table...
October 4, 2012 at 7:43 am
ChrisM@Work (10/4/2012)
Eugene Elutin (10/4/2012)
ChrisM@Work (10/4/2012)
No undocumented vapourtables, no sort:
SELECT n = a.n+b.n
FROM (VALUES(0),(10),(20),(30),(40),(50),(60),(70),(80),(90))b(n)
CROSS JOIN (VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10))a(n)
😉
No sort? I would suggest to add ORDER BY, otherwise order is not guaranteed, so you...
October 4, 2012 at 7:32 am
Your query doesn't make any sense!
What are Salesman, ToMonth, ToYear, FromMonth, FromYear you are passing into function?
are they supposed to be variables/input parameters or what?
You better use aliases in the...
October 4, 2012 at 7:28 am
Viewing 15 posts - 1,081 through 1,095 (of 2,894 total)