Number Appearance
Jul 30, 1998When i make a qeury with some data of the type numeric, how do i make the output come with digit grouping symbol. Like 1.000.000,00.
Now the output looks like 1000000,00.
When i make a qeury with some data of the type numeric, how do i make the output come with digit grouping symbol. Like 1.000.000,00.
Now the output looks like 1000000,00.
I have written a query to search for a string in an expression by the number of it's appearance. Script is like this:
DECLARE @Expression VARCHAR(8000) = 'abcd_e_fgh',
@SearchString VARCHAR(10)= '_',
@OccuranceNumber SMALLINT = 1
DECLARE @SearchIndex INT = 0, @SearchIndexPrevious INT = 0, @Sno INT = 0
WHILE @Sno < @OccuranceNumber BEGIN
[Code] .....
Here i'm trying to search "_" in expression "abcd_e_fgh" where it is appearing for first time. it gives me 5 correctly. Now when i change the @OccurenceNumber to 2 or 3, it gives correct values 7 and -1 respectively. However now when i change it to 4, it gives me 5. So when it's trying to check for fifth appearance of "_", it's not actually giving 0 or -1 but repeating the value 5.
I realise this'll probably seem like a very silly question, but is there any way of changing the font and font size in a query window in MS SQL Server Management Studio Express?
It would just make life a lot easier if I could see more of the text!
I have 2 issues wih the appearance of my report both in the preview tab and when I deploy.
1. My report contains a subreport and the subreport appears indented from the left edge of the main report. How can I stop this? I won't the subreport to be aligned with the main report.
2. The last column of my report is stretched to the edge of the page even though I have all my cells set to CanGrow = false. How can I stop this?
Any help is appreciated.
Hi,
Is it possible in SSRS to change the appearance of a Hyperlink based on a MouseOver event? For example can I show the text as say, underlined, only when the Mouse pointer hovers over it.. and normal otherwise?
Hello,
I'm hoping someone can help me out with this. In order to add an sequence dimension in an ssas cube, I need to rank chronological item in a t-sql data set in order of their distinct appearance. I've tried to do this in mdx and there's just no easy way. I've also tried various ways in t-sql to achive, includeing ranking functions, custom udf, etc. To no avail.
The original dataset would look like this.
date, member_id, action
1/1/2008, 123, register
1/2/2008, 123, create_item_a
1/3/2008, 123, create_item_b
1/4/2008, 123, create_item_a
1/5/2008, 123, create_item_c
1/6/2008, 123, create_item_b
I need another column that flags the action in order of appearance, like so
date, member_id, action, appearance_rank
1/1/2008, 123, register, 1
1/2/2008, 123, create_item_a, 2
1/3/2008, 123, create_item_b, 3
1/4/2008, 123, create_item_a,2
1/5/2008, 123, create_item_c,4
1/6/2008, 123, create_item_b,3
So the "register" action would be the first thing a user did, "create_item_a" the second, create_item_b the third. However, the next occurrance of create_item_a would still retain the rank of 2 as it's not a new action for this user. The ranks would be unique to the actions, based on the first time they occurred.
This has been perplexing, but I feel like there is simple way to do this using some of the ranking functions, but just haven't been able to get it figure out.
Any help would be appreciated.
Regards...
Hello,
I am attempting to modify an existing matrix report into something a bit more diverse and aesthetically appealing to our users. The problem is changing the size of columns, rows, border types, etc.
So far I have not yet been able to locate any custom code samples that refer to ways of changing the overall appearance and properties of the matrix. I am not concerned with the data but in some cases a column's width will need to be larger or smaller based on the size of the data inside it.
The strings can range from 3 characters to 15 or more and the number of columns can be just as dynamic in number. If that happens I need to shrink or expand a column to match.
I am familiar with using custom code just not in using it to access the matrix properties.
Thanks.
I have created a local user on Report Server Computer and the user has the administrative rights.
When i try to connect Report Server (http://xxx.xxx.xxx.xxx/reportserver) with this user's credantials. (ReportServer directory security is set -only- to Basic Authentication. ).
I get the following error.
Reporting Services Error
--------------------------------------------------------------------------------
The number of requests for "XXXServerXXXUser" has exceeded the maximum number allowed for a single user.
--------------------------------------------------------------------------------
SQL Server Reporting Services
Then i try to login using a different user with administrative rights on the machine, i can logon successfully.
The system is up for a month but this problem occured today?!? What could be the problem?!?
Hi
I want to enter rows into a table having more number of columns
For example : I have one employee table having columns (name ,address,salary etc )
then, how can i enter 100 employees data at a time ?
Suppose i am having my data in .txt file (or ) in .xls
( SQL Server 2005)
Got this query and I need the following result;
declare @NumberToCompareTo int
set @NumberToCompareTo = 8
declare @table table
(
number int
)
insert into @tableĀ
select 4
[Code] ....
The query selects 4 and 5 of course. Now what I'm looking for is to retrieve the number less or equal to @NumberToCompareTo, I mean the most immediate less number than the parameter. So in this case 5
in my sql, i want to change a decimal number to percent format number, just so it is convenient for users. for example there is a decimal number 0.98, i want to change it to 98%, how can i complete it?
thks
Hi,
I am currently designing a SSIS package to integrate data into a data warehouse fact table. This fact table has about 70 columns among which 17 are foreign keys for dimension tables.
To insert data in that table, I have to make several transformations and lookups. Given the fact that the lookups I have to make are a little complicated, I have about 70 tasks in my Data Flow.
I know it's a lot, but I can't find a way to make it simpler. It seems I really need all these tasks.
Now, the problem is that every new action I try to make on the package takes a lot of time. At design time, everything is very slow. My processor is eavily loaded each time I change a single setting in one of the tasks, and executing the package in debug mode takes for ages. If I take a look at the size of my package file on disk, it's more than 3MB.
Hence my question : Are there any limitations in terms of number of columns or number of tasks that can be processed within a Data Flow ?
If not, then do you have any idea why it's so slow ?
Thanks in advance for any answer.
I have a large table of customers. I would like to add a column that contains an integer, unique to that customer. The trick is that this file contains many duplicate customers, so I want the duplicates to all have the same number between them.the numbers dont have to be sequential or anything, just like customers having the same one.
View 8 Replies View RelatedI have a table that has a street number field.
if the user types in a street number of '2' i would like to return all street numbers the begin with 2 (2,20,21, 200, 201,205,2009,...)
how can this be done.
Hello people,I might sound a little bit crazy, but is there any possibility that youcan incorporate 4^15 (1,073,741,824) tables into a SQL Database?I mean, is it possible at all? There might be a question of whereanyone would want so many tables, but i'm a bioinformatics guy and I'mtrying to deal with genomic sequences and was coming up with a newalgorithm, where the only limit is the number of tables I can put intoa Database.So, can you please advise if its possible to put in so many tables intoa SQL database? Or is the Bekerley DB better?
View 3 Replies View Related1. how to show page number & total page number in report body?
2. how to show total records number?
I want to format a number like "#,##0.00" in order to handle it in Excel as a number (i.e. compute a sum).
Excel is able to show a number in a specail format and still allow to compute with ...
Thanks in advance,
Peter
I am testing something in Visual Basic
that talks to a database and I want to
filter results by -> field1 like "###".
However, that 'like' and '#' is VB syntax.
How do you say that in SQL?
i am an asp programer trying to program in aspx c#
i have a litle problem geting the id number from my sql db and put it into an intiger
what i am doing is that i am trying to make the picture have the same name as the id number in the db
String sql = "SELECT id ";
sql += " FROM PictureLibrary";
sql += " ORDER BY id desc";
int pictureNR = ??
I have tryed to find a way to include the row number in a querry but without result.
I have a table select some rows ordered and now I will add a column called rank
How do I get the rownumber in the field rank ?
Thanks in advance
Jan O
Hi,
I need to add row number to my query result and I know how to do that in SQl2005 but the row number function is not working in 2000.Please help me to figure out how should I do that in SQl2000.The query that I have is kind of a big query with 162 columns. It is coming from another view.
Thanks.
Sep
Hi all,
Does anybody know why SQL server gives the wrong weeknumber when I enter the following syntax in my query analyzer.
select Datepart (wk,getdate())
It should give week 46, but it gives 47
What is wrong ?
Are the settings of SQL server wrong
It does give the correct day, month and year.
Thanks in advance
Is there a way to take the row number from my code and put that into a column I have code that returns the top 50 of sales and I want to put those row numbers into columns that they coordinate with.
View 6 Replies View RelatedHow to generate a seq number in TSQL. My need is for every recordinsert ,I need to insert a seq number paded with letter 'I'.Please help me.Adv Thanks mate--Posted via http://dbforums.com
View 3 Replies View RelatedAll I am trying to do is return the row number (calculated field?)with each row returned from an SQL query. I think I have done this inthe past but am a bit rusty after not using SQL for a while. Ifanyone could help with a code snippet this would be gretlyappreciated.
View 3 Replies View RelatedCan someone tell me why I'm not getting .9375?
declare @MyFloat1 float
set @MyFloat1 = 30/32
select @MyFloat1
returns 0
declare @MyFloat2 real
set @MyFloat2 = 30/32
select @MyFloat2
returns 0
declare @MyFloat3 decimal(2,2)
set @MyFloat3 = 30/32
select @MyFloat3
returns 0.00
update [Costing].[dbo].[Supplier]
set n =
(
SELECT (ROW_NUMBER() OVER (ORDER BY suppliercode) + 1000 )
as RowNumber from [Costing].[dbo].[Supplier] as t
where t.suppliercode = Supplier.suppliercode
)
hi i cannot update a column with the row number,
it is all taking 1001, supposed to be 1001,1002 and so on .
thanks.
Hello all,
I have, what i think, is a unique problem that i'm hoping some of you can help me on.
I need to create a record number that is incremented by 1 whenever someone adds a new record to the database. For example, records numbering 1,2,3 are in the database. When the users adds a new record, SQL takes the last recordno, 3 in this case, and adds 1 to it thus producing 4.
Also, i need to have the ability to replace deleted record numbers with new ones. Using the example above, say a user deletes record number 2. Whenever someone adds a new record, sql would see the missing number and assign the new record that number.
I hope i'm making sense here. Does anyone have any ideas about this? Any articles on the web that someone could point me to?
Thanks.
Richard M.
G'day,
I have a table with a primary key being a bigint and its set to auto increment (or identity or whatever ms calls it). Is there anyway I can get the ID number that will be assigned to the next Insert before I insert it? I want to use that ID number within another field when inserted.
I hope that makes sense.
Thanks for any help.
Robbo
I have a string in form "abcdefg 12355 ijklmn"Now I want get only the number 12355 within the string !!Is there any function available in T-SQL of Sql server 2K??Thanksfor any help
View 6 Replies View RelatedI have a few stored procedures that returns @@error. If I understand correctly, @@error should be set to 0 if there is no error. However, my procedures are returning 1 and 2 yet working just fine as far as I can tell. There is not exception popping up in SQL Profiler either. What does this mean, and is it something I should be concerned about?
View 7 Replies View RelatedI need to change a number that looks like 1365 and make it look like 1,365 without any decimal or trailing zeros. Then number can even be a 7 digit number. It seems like the only way I know is the money to varchar conversion using style 1, but this adds trailing zeros and a decimal point. Can anyone help on this
Thanks,
Hemal
Hi, I've a question, if I've the LSN (Log Sequence Number) of a transaction, keep with the program "Log Explorer", can I know which is the IP of the user that have do the transaction (perhaps serching in a log file of the Win 2000 Server) ?
10x,
Clara