Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
One of my old query started throwing error very recently. When I investigated I found that SQL statement SELECT * FROM TABLE is not fetching all Fields from Table. Issue was corrected when I mentioned Field Names instead of *
I faced this issue on MSSQL 2008 DB. Has any one faced similar challenge? What could be best practise?
Can you share the error msg (Image), by this we can help you to identify which error exactly it is.
Wrong result means it pulls no rows, only some rows, only some fields?
Easiest way to check is using the assistant in the script editor > Connect > then Select and see if the fields you see there are the same ones you see using MSSQL Studio.
Maybe there are more fields or fieldnames with special chars or something similar within your database-table as the driver could handle - the use of Select * is always a bit risky.
- Marcus