Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Friday, March 30, 2012

Numerous SSIS and SSAS problems

First, in SSIS I cannot delete the data viewer from a connection between two tasks in the data flow without crashing BIDS. Even if I delete the connector or the tasks, BIDS crashes.

Second, in SSAS I accidentally deleted an attribute and the undo does not work in SSAS/BIDS. I put the attribute back and the dim won't deploy. It just runs forever.

Finally, in ProClarity my drill to detail is not displaying the fact rows I want. Plus the column headers are not easy to read. How can I make SSAS reference the correct data and corresponding column headers.

TJ

> Second, in SSAS I accidentally deleted an attribute and the undo does not work in SSAS/BIDS.

> I put the attribute back and the dim won't deploy. It just runs forever.

Indeed, undo is not yet implemented. After putting back the attribute, when you deploy, do you get an error or the deployment takes a long time ? If the deployment takes a long time, it's probably because the data is re-processed (although you put back the attribute, I believe its ID changed and will trigger a re-processing of the dimension). To stop re-processing on each deployment, right click on the project node -> Properties -> Deployment tab -> Processing Option.

Things to check/recover when putting back the attribute: was the attribute involved in hierarchies (was it source of levels in hierarchies ?) or attribute relationships or was used as granularity in measure groups ? (by default, the key attribute is the granularity)

Adrian Dumitrascu

Monday, March 12, 2012

Nulls vs Blanks

Until yesterday it was imposible to delete a field that did not allow nulls
in Enterprise manager (SQL2000) the InfoPath Clients connected to such tables
saw red asterisks in all the required fields according to the information
provided by the SQL schema.
This has now changed on all instances and all servers without apparant
reason. now I can delete a field that does not allow nulls and it is
registered as a blank. Infopath clients are not forced to include all
required fields prior to submitting.
What could have changed?
Thanks
IT PHYTOSANThis is a multi-part message in MIME format.
--080302080803080309060001
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
This might be better off posted to an InfoPath newsgroup (like
microsoft.public.infopath).
--
*mike hodgson*
http://sqlnerd.blogspot.com
IT PHYTOSAN wrote:
>Until yesterday it was imposible to delete a field that did not allow nulls
>in Enterprise manager (SQL2000) the InfoPath Clients connected to such tables
>saw red asterisks in all the required fields according to the information
>provided by the SQL schema.
>This has now changed on all instances and all servers without apparant
>reason. now I can delete a field that does not allow nulls and it is
>registered as a blank. Infopath clients are not forced to include all
>required fields prior to submitting.
>What could have changed?
>Thanks
>IT PHYTOSAN
>
--080302080803080309060001
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>This might be better off posted to an InfoPath newsgroup (like
microsoft.public.infopath).</tt><br>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
IT PHYTOSAN wrote:
<blockquote cite="mid6513D024-96EB-4CF5-82B8-7134F4812D09@.microsoft.com"
type="cite">
<pre wrap="">Until yesterday it was imposible to delete a field that did not allow nulls
in Enterprise manager (SQL2000) the InfoPath Clients connected to such tables
saw red asterisks in all the required fields according to the information
provided by the SQL schema.
This has now changed on all instances and all servers without apparant
reason. now I can delete a field that does not allow nulls and it is
registered as a blank. Infopath clients are not forced to include all
required fields prior to submitting.
What could have changed?
Thanks
IT PHYTOSAN
</pre>
</blockquote>
</body>
</html>
--080302080803080309060001--

Nulls vs Blanks

Until yesterday it was imposible to delete a field that did not allow nulls
in Enterprise manager (SQL2000) the InfoPath Clients connected to such table
s
saw red asterisks in all the required fields according to the information
provided by the SQL schema.
This has now changed on all instances and all servers without apparant
reason. now I can delete a field that does not allow nulls and it is
registered as a blank. Infopath clients are not forced to include all
required fields prior to submitting.
What could have changed?
Thanks
IT PHYTOSANThis might be better off posted to an InfoPath newsgroup (like
microsoft.public.infopath).
*mike hodgson*
http://sqlnerd.blogspot.com
IT PHYTOSAN wrote:

>Until yesterday it was imposible to delete a field that did not allow nulls
>in Enterprise manager (SQL2000) the InfoPath Clients connected to such tabl
es
>saw red asterisks in all the required fields according to the information
>provided by the SQL schema.
>This has now changed on all instances and all servers without apparant
>reason. now I can delete a field that does not allow nulls and it is
>registered as a blank. Infopath clients are not forced to include all
>required fields prior to submitting.
>What could have changed?
>Thanks
>IT PHYTOSAN
>

Friday, March 9, 2012

Nulls

Can someone tell me what to do if several NULLS are showing up within tables. Is there an easy step to locate all NULLS and delete them within the table?

Can someone provide detailed infromation on how to delete NULLS within tables. I'm new o the SQL side so I hope I have explained what it is that I'm looking to do. Our in house programmer said that the NULLS maybe causing a problem with the software communicating with the SQL Server software.to locate all records having nulls in a talbe:
select * from table where column_name is null

to delete all rows that contain nulls:
delete from table where column_name is null

Richard

Originally posted by Arra2
Can someone tell me what to do if several NULLS are showing up within tables. Is there an easy step to locate all NULLS and delete them within the table?

Can someone provide detailed infromation on how to delete NULLS within tables. I'm new o the SQL side so I hope I have explained what it is that I'm looking to do. Our in house programmer said that the NULLS maybe causing a problem with the software communicating with the SQL Server software.|||Originally posted by Arra2
Can someone tell me what to do if several NULLS are showing up within tables. Is there an easy step to locate all NULLS and delete them within the table?

Can someone provide detailed infromation on how to delete NULLS within tables. I'm new o the SQL side so I hope I have explained what it is that I'm looking to do. Our in house programmer said that the NULLS maybe causing a problem with the software communicating with the SQL Server software.

Do you want to delete the whole record that contains the nulls?

you can find all teh nulls by usuing:

select * from tableName
where whateverField = '0'

Just fill in the tableName part with the table that you are looking in and
fill in the whateverField part with the name of the column that the nulls appear in.|||Originally posted by estefex
Do you want to delete the whole record that contains the nulls?

you can find all teh nulls by usuing:

select * from tableName
where whateverField = '0'

Just fill in the tableName part with the table that you are looking in and
fill in the whateverField part with the name of the column that the nulls appear in.

Correction on how to find nulls:

select * from tableName
where whateverField is null|||Sory i didn't explain in more detail. i can find the NULLS no problem.
Once I find the NULLS I would like to delete the NULLS ONLY and not the whole column where the NULLS are located. I want to replace the viewable NULL with nothing.

I would like to delete the NULL but keep everything else intact.|||The only way to make the NULL values go away without deleting the row is to replace the NULL with another value, something likeUPDATE myTable
SET dateCol = GetDate()
WHERE dateCol IS NULLThe only way to make the NULL value "go away" is to put something else in its place.

-PatP|||Originally posted by Arra2
I want to replace the viewable NULL with nothing.

i think this is the real problem

Arra2 is using some software to display table contents, and that software is substituting something for the nulls

e.g. the word NULL

how about using COALESCE in your queries?
select coalesce(nullablecharfield,'') as displayablecharfield

of course, if you have a nullable numeric field, you have another problem on your hands, don't you|||I've tested your information and it's what I'm looking for. Thanks.

But what if I what the NULL to be replaced with nothing. I want a blank field.

If I try

Update My_table_name
Set My_Column_name =
Where My_Column_Name is Null

I recieve an error. I want to replace the Null with a blank field.

Thanks for the help up to this point.|||Yup, numeric, datetime, and bit will be a problem. But I think he's talking about character NULLs. How about char(39)+char(39)?|||Originally posted by Arra2
But what if I what the NULL to be replaced with nothing.
um, i think you might want to re-think this

NULL is nothing

a "blank" field contains a string

it's a zero-length string to be sure, but it's not nothing
I want to replace the Null with a blank field.
ah, well, if you insist --update my_table_name
set my_column_name = ''
where my_column_name is null
you're still gonna have trouble with numeric fields, though|||If you are going to go through all this trouble:

1. Redesign so you don't have NULL attributes in your entities.
or
2. Just learn how to use NULL. Especially if you are wanting to use this for all kinds of datatypes like integer, money, etc.|||Correction on how to find nulls:
select * from tableName
where whateverField is null

It is extremely important to notice the fundamental difference between the original test (whateverField = '0') and this, correct one.

NULL is defined as "the absence of any value at all." The value in the field is not zero, nor any other value: it is, "no value at all." Therefore, it is not "equal to" (nor, for that matter, "unequal to") any value at all.

Consider a table with a person's name and his age. Tom is 50 and Dick is 30, but Mary declined to tell us her age. Therefore, the age-column in her record is for the moment NULL. If we then "SELECT ... AVERGAE(AGE)" we'll get the correct value: 40. SQL took the two values which did exist (50 and 30), added them up, divided by the count of values which did exist (2, not 3), and produced the expected result. This is fundamentally important in statistics, where NULL conveniently represents a "missing value."|||Thanks for all those who have helped. I think I have it under control.

Thanks,

SQL Rookie

Nullable foreign keys

In my SQL Server 2005 T-SQL book, it mentions that SQL Server 2005 now allows you to set Foreign Key Update/Delete Rules to "Set Null" and "Set Default". In Management Studio, I only see "No Action" and "Cascade" as options. I wish to have the foreign key field set to null when the Primary key in the other table is deleted. Does anyone know why these options aren't showing up, or what I can do to achieve this result? Thanks.

Al

Hi,

simply navigate to Modify Foreign key, the following screen should come up:

http://www.sqlserver2005.de/SharedFiles/FKSetNull.JPG

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||That's what I am talking about. The only options are No Action and Cascade. I am using SQL Server 2005 Express (The one shipped with VS 2005) in my devlopment environment, but I don't see why this feature wouldn't be there.

Saturday, February 25, 2012

NULL Values

I imported an excel spreadsheet and it loaded a ton of records with NULL
values. When I try to delete them, it tells me To many rows will be
affected.
what is a SQL statement that I can type that will delete all the records
that has NULL in a particular field?DELETE FROM YourTable
WHERE YourColumn IS NULL
... and quit using EM to edit your data... it's not designed for that and
will definitely cause you problems in the long run (like this one)
"johnfli" <john@.here.com> wrote in message
news:OuGGCt7qEHA.3712@.TK2MSFTNGP15.phx.gbl...
> I imported an excel spreadsheet and it loaded a ton of records with NULL
> values. When I try to delete them, it tells me To many rows will be
> affected.
> what is a SQL statement that I can type that will delete all the records
> that has NULL in a particular field?
>
>|||what would you propose instead?
Thank you for your assistance.
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:OR333v7qEHA.3700@.TK2MSFTNGP15.phx.gbl...
> DELETE FROM YourTable
> WHERE YourColumn IS NULL
> ... and quit using EM to edit your data... it's not designed for that and
> will definitely cause you problems in the long run (like this one)
>
> "johnfli" <john@.here.com> wrote in message
> news:OuGGCt7qEHA.3712@.TK2MSFTNGP15.phx.gbl...
> > I imported an excel spreadsheet and it loaded a ton of records with NULL
> > values. When I try to delete them, it tells me To many rows will be
> > affected.
> > what is a SQL statement that I can type that will delete all the records
> > that has NULL in a particular field?
> >
> >
> >
>|||"johnfli" <john@.here.com> wrote in message
news:OgX4Ly7qEHA.3868@.TK2MSFTNGP15.phx.gbl...
> what would you propose instead?
> Thank you for your assistance.
Script your data modifications and run them from QA.|||I don't use sql that much, so I have no idea on how to write scripts to
import data from other files.
if you could assist me with that, that would be great.
I have a workbook with several sheets.
All sheets are the same format.
what would the script be? I have the table in sql all setup (there are
only 10 fields)
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:eVf3az7qEHA.556@.tk2msftngp13.phx.gbl...
> "johnfli" <john@.here.com> wrote in message
> news:OgX4Ly7qEHA.3868@.TK2MSFTNGP15.phx.gbl...
> > what would you propose instead?
> >
> > Thank you for your assistance.
> Script your data modifications and run them from QA.
>|||Try this article:
http://support.microsoft.com/?id=321686
"johnfli" <john@.here.com> wrote in message
news:uFZ04B8qEHA.348@.TK2MSFTNGP15.phx.gbl...
> I don't use sql that much, so I have no idea on how to write scripts to
> import data from other files.
> if you could assist me with that, that would be great.
> I have a workbook with several sheets.
> All sheets are the same format.
> what would the script be? I have the table in sql all setup (there are
> only 10 fields)
>

NULL Values

I imported an excel spreadsheet and it loaded a ton of records with NULL
values. When I try to delete them, it tells me To many rows will be
affected.
what is a SQL statement that I can type that will delete all the records
that has NULL in a particular field?
DELETE FROM YourTable
WHERE YourColumn IS NULL
... and quit using EM to edit your data... it's not designed for that and
will definitely cause you problems in the long run (like this one)
"johnfli" <john@.here.com> wrote in message
news:OuGGCt7qEHA.3712@.TK2MSFTNGP15.phx.gbl...
> I imported an excel spreadsheet and it loaded a ton of records with NULL
> values. When I try to delete them, it tells me To many rows will be
> affected.
> what is a SQL statement that I can type that will delete all the records
> that has NULL in a particular field?
>
>
|||what would you propose instead?
Thank you for your assistance.
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:OR333v7qEHA.3700@.TK2MSFTNGP15.phx.gbl...
> DELETE FROM YourTable
> WHERE YourColumn IS NULL
> ... and quit using EM to edit your data... it's not designed for that and
> will definitely cause you problems in the long run (like this one)
>
> "johnfli" <john@.here.com> wrote in message
> news:OuGGCt7qEHA.3712@.TK2MSFTNGP15.phx.gbl...
>
|||"johnfli" <john@.here.com> wrote in message
news:OgX4Ly7qEHA.3868@.TK2MSFTNGP15.phx.gbl...
> what would you propose instead?
> Thank you for your assistance.
Script your data modifications and run them from QA.
|||I don't use sql that much, so I have no idea on how to write scripts to
import data from other files.
if you could assist me with that, that would be great.
I have a workbook with several sheets.
All sheets are the same format.
what would the script be? I have the table in sql all setup (there are
only 10 fields)
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:eVf3az7qEHA.556@.tk2msftngp13.phx.gbl...
> "johnfli" <john@.here.com> wrote in message
> news:OgX4Ly7qEHA.3868@.TK2MSFTNGP15.phx.gbl...
> Script your data modifications and run them from QA.
>
|||Try this article:
http://support.microsoft.com/?id=321686
"johnfli" <john@.here.com> wrote in message
news:uFZ04B8qEHA.348@.TK2MSFTNGP15.phx.gbl...
> I don't use sql that much, so I have no idea on how to write scripts to
> import data from other files.
> if you could assist me with that, that would be great.
> I have a workbook with several sheets.
> All sheets are the same format.
> what would the script be? I have the table in sql all setup (there are
> only 10 fields)
>